My Math Forum  

Go Back   My Math Forum > College Math Forum > Calculus

Calculus Calculus Math Forum


Reply
 
LinkBack Thread Tools Display Modes
July 23rd, 2011, 02:15 PM   #1
Newbie
 
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:
http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf

Best Regards,

guga
b2kguga is offline  
 
July 23rd, 2011, 02:41 PM   #2
Global Moderator
 
greg1313's Avatar
 
Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,879
Thanks: 1087

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/

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

See http://www.purplemath.com/modules/logrules.htm for information on handling logarithms.
greg1313 is offline  
Reply

  My Math Forum > College Math Forum > Calculus

Tags
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 10:37 PM
Curve integral - expression simplification honzik Real Analysis 1 December 26th, 2009 03:16 PM
Logaritm-Integration Problem geyikrali Real Analysis 1 February 23rd, 2008 01:14 AM
Logaritm H/W help Xcel Algebra 1 September 6th, 2007 07:29 AM
Logaritm ananda Calculus 0 December 31st, 1969 04:00 PM





Copyright © 2018 My Math Forum. All rights reserved.