Returns the natural logarithm of a number. For an ErrorLogging object, this function can be used to write a string to the log file maintained by the object’s container.
To |
Use |
---|---|
Determine the natural logarithm of a number |
|
Write a string to a log file |
Determines the natural logarithm of a number.
Log ( n )
Argument |
Description |
---|---|
n |
The number for which you want the natural logarithm (base e). The value of n must be greater than 0. |
Double. Returns the natural logarithm of n. An execution error occurs if n is negative or zero. If n is null, Log returns null.
This statement returns 2.302585092:
Log(10)
This statement returns –.693147. . . :
Log(0.5)
Both these statements result in an error during execution:
Log(0)
Log(-2)
After the following statements execute, the value of a is 200:
double a, b = Log(200)
a = Exp(b)// a = 200
Writes a string to the log file maintained by the object’s container.
ErrorLogging objects
errorlogobj.Log ( message )
None.