Tom Clement

Greenhorn

Posts: 26

Horatio Westock

Ranch Hand

Posts: 221

Tom Clement

Greenhorn

Posts: 26

posted 12 years ago

Have you read the javadoc for Math.log()?

The log of a number 'x' in a base 'c' given the log in a base 'b' can be computed using:

Assuming we don't know the base of Math.log(), we could remove it from the equation as an unknown and always compute:

Maybe the question is already answered, but I did something similar he other day and decided to share

Dave

[EDIT - hmm, no sub scripts. Oh well, you get the picture.]

[ February 27, 2005: Message edited by: David O'Meara ]

The log of a number 'x' in a base 'c' given the log in a base 'b' can be computed using:

Assuming we don't know the base of Math.log(), we could remove it from the equation as an unknown and always compute:

Maybe the question is already answered, but I did something similar he other day and decided to share

Dave

[EDIT - hmm, no sub scripts. Oh well, you get the picture.]

[ February 27, 2005: Message edited by: David O'Meara ]