- All Implemented Interfaces:
- Function
public class PowerFunction
extends FunctionBase
implements Function
http://docs.jsonata.org/numeric-functions.html
$power(base, exponent)
Returns the value of base raised to the power of exponent (baseexponent).
If base is not specified (i.e. this function is invoked with one argument),
then the context value is used as the value of base.
An error is thrown if the values of base and exponent lead to a value that
cannot be represented as a JSON number (e.g. Infinity, complex numbers).
Examples
$power(2, 8)==8 $power(2, 0.5)==1.414213562373 $power(2, -2)==0.25