Calculus Calculus Math Forum

 July 23rd, 2011, 03:15 PM #1 Newbie   Joined: Jul 2011 Posts: 1 Thanks: 0 Logaritm expression simplification Hi iÇm trying to make a better expression to this logaritm problem, but i couldnÇt understand what iÇm doing wrong...Can someone help me solvingthis ? The expression is to compute the Hue from a RGB color data: Hue = tan-1( (log(R) - log (G)) / ( log (R) - log (G) +2*log(B) ) On the logaritm part i made a error that i canÇt solve..i achieve this: ( (log(R) - log (G)) / ( log (R) - log (G) +2*log(B) ) = log2(R/G)/log2(B*B*R/G) ? whit this is wrong ? What is the proper solution for the logaritm part ? The log part must be on a basis of 2, because iÇm trying to make a better approach to a assembly function. I achieved the result separating the quotients and dividends like this: quotient = log(R)-log(G) = log(R/G) = log2(R/G)*log10(2) dividend = (log(R)-log(G)+2*log(B)) = log(R/G)+log(B)+log(B) = log(B*B*R/G) = log2(B*B*R/G)*log10(2) Resulting in: log2(R/G) / log2(B*B*R/G) But this is wrong...why ? Note: After solving the logaritm part..what is the best solution for the tan-1(Result expression) ? Where tan-1 = tangent of a power of -1 = 1/tan = arctan ? or it is: 1/tan(( (log(R) - log (G)) / ( log (R) - log (G) +2*log(B) )) ??? Source of formula is: http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf Best Regards, guga July 23rd, 2011, 03:41 PM   #2
Global Moderator

Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,976
Thanks: 1158

Math Focus: Elementary mathematics and beyond
Re: Logaritm expression simplification

Quote:
 Originally Posted by b2kguga Hue = tan-1( (log(R) - log (G)) / ( log (R) - log (G) +2*log(B) )

arctan, that is, tan^(-1), is the inverse tangent function and it is not equivalent to 1/tan(x).

See http://en.wikipedia.org/wiki/Inverse_tr ... _functions for information on the arctan function and

http://www.programmersheaven.com/mb/x86 ... ng-arctan/

See http://www.purplemath.com/modules/logrules.htm for information on handling logarithms. Tags expression, logaritm, simplification Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post Riazy Calculus 1 February 16th, 2011 11:37 PM honzik Real Analysis 1 December 26th, 2009 04:16 PM geyikrali Real Analysis 1 February 23rd, 2008 02:14 AM Xcel Algebra 1 September 6th, 2007 08:29 AM ananda Calculus 0 December 31st, 1969 04:00 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top      