Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel eScript Language Reference > Siebel eScript Commands > The Math Object >
Math.pow() Method
This function returns the value of its first parameter raised to the power of its second parameter.
Syntax
Math.pow(x, y)
Returns
The value of x to the power of y.
Usage
This function returns the value of x raised to the power of y.
Example
This example uses the Math.pow() function to determine which number is larger: 99^100 (99 to the 100th power) or 100^99 (100 to the 99th power). Note that if you attempt to use the Math.pow() method with numbers as large as those used in the example in Math.log() Method, the result returned is
Infinity
.function Test_Click ()
{
var a = Math.pow(99, 100);
var b = Math.pow(100, 99);
if ( a > b )
TheApplication().RaiseErrorText("99^100 is greater than 100^99.");
else
TheApplication().RaiseErrorText("100^99 is greater than 99^100.");
}See Also
Math.exp() Method, Math.log() Method, and Math.sqrt() Method
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel eScript Language Reference Published: 18 April 2003 |