Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference > Siebel eScript Commands > The Math Object >
Math.log() Method
This function returns an implementation-dependent approximation of the natural logarithm of its parameter.
Syntax
Math.log(number)
Returns
An implementation-dependent approximation of the natural logarithm of number.
Example
This example uses the Math.log() function to determine which number is larger: 999^1000 (999 to the 1000th power) or 1000^999 (1000 to the 999th power). Note that if you attempt to use the Math.pow() function instead of the Math.log() function with numbers this large, the result returned would be
Infinity
.function Test_Click ()
{
var x = 999;
var y = 1000;
var a = y*(Math.log(x));
var b = x*(Math.log(y))
if ( a > b )
TheApplication().
RaiseErrorText("999^1000 is greater than 1000^999.");
else
TheApplication().
RaiseErrorText("1000^999 is greater than 999^1000.");
}See Also
Math.E Property, Math.exp() Method, Math.LN10 Property, Math.LN2 Property, Math.LOG2E Property, Math.LOG10E Property, and Math.pow() Method
Bookshelf Home | Contents | Index | Search | PDF |
Siebel eScript Language Reference Published: 18 April 2003 |