November 2001
Intermediate to advanced
936 pages
68h 43m
English
Math.pow( ) — compute xy
JavaScript 1.0; JScript 1.0; ECMAScript v1
Math.pow(x,y)
x
The number to be raised to a power.
y
The power that x is to be raised to.
x to the power of
y,xy.
Math.pow( ) computes x
to the power of
y. Any values of
x and y may be
passed to Math.pow( ). However, if the result is
an imaginary or complex number, Math.pow( )
returns NaN. In practice, this means that if
x is negative,
y should be a positive or negative
integer. Also, bear in mind that large exponents can easily cause
floating-point overflow and return a value of
Infinity.