Skip to content
Reference > Methods

power(value,exponent)

Definition

Double power(Number value, Number exponent)

Description

Returns a Double value of the first argument raised to the power of the exponent.

Parameter Definition

Name Type Description
value Number value to raise to exponent
exponent Number exponent to raise value to

Examples

1
2
3
4
Double r1 = power(10,1); // r1 == 10.0
Double r2 = power(10,0); // r2 == 1.0
Double r3 = power(10,3); // r3 == 1000.0
Double r4 = power(5.3D,4.2D); // r4 == 1101.434440782885