My Math Forum  

Go Back   My Math Forum > College Math Forum > Calculus

Calculus Calculus Math Forum

LinkBack Thread Tools Display Modes
July 23rd, 2011, 03:15 PM   #1
Joined: Jul 2011

Posts: 1
Thanks: 0

Logaritm expression simplification

Hi im trying to make a better expression to this logaritm problem, but i couldnt understand what im 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 cant 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 im 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: ... 1&type=pdf

Best Regards,

b2kguga is offline  
July 23rd, 2011, 03:41 PM   #2
Global Moderator
greg1313's Avatar
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

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 ... _functions for information on the arctan function and ... ng-arctan/

for information about coding it. (Read the entire topic).

See for information on handling logarithms.
greg1313 is offline  

  My Math Forum > College Math Forum > Calculus

expression, logaritm, simplification

Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
The length of a curve with logaritm (Natural) Riazy Calculus 1 February 16th, 2011 11:37 PM
Curve integral - expression simplification honzik Real Analysis 1 December 26th, 2009 04:16 PM
Logaritm-Integration Problem geyikrali Real Analysis 1 February 23rd, 2008 02:14 AM
Logaritm H/W help Xcel Algebra 1 September 6th, 2007 08:29 AM
Logaritm ananda Calculus 0 December 31st, 1969 04:00 PM

Copyright © 2019 My Math Forum. All rights reserved.