Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting a natural log value back into a number

Status
Not open for further replies.

chelseatech

Instructor
Aug 25, 2001
1,812
NZ
Crystal Reports has a log function, but it calculates a Natural log of the number. Fine as, I can use a log of any base to add up the values I need, and that solves the overflow problem I get by multiplying my numbers together.

However, I hit some difficulty in converting the log back into a number again. There doesn't seem to be a Exp function to get e to the power of my log value.

I can convert to a base 10 log by diving by log(10), and then can take that to a number with 10 ^ base10logvalue.

Does anyone have an easier way to do this?

I use these in my blog entry today at
Editor and Publisher of Crystal Clear
 
Hi,
Isn't this what you need?:
CR help said:
Exp (number)
Basic and Crystal syntax.

Arguments
Number value that specifies a power.
Returns
Number value.

Action
Exp returns a Number specifying e (the base of natural logarithms) raised to a power. The value of e is approximately 2.718282.

Example
The following example is applicable to both Basic and Crystal syntax:

Exp (1.5)

Returns the exponentiation of 1.5, which is approximately 4.48169.

Comments
This function is designed to work like the Visual Basic function of the same name.
Numeric overflow occurs if the given number argument is larger than approximately 705.

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top