Exponential and Root Functions

POWER( <expr1>, <expr2> )

Returns the value of expr1 raised to the power of expr2.

> select power(3.15, 0.5);
1.775

FACTORIAL( <expr>)

Computes the factorial of its input

Supported datatype: Integer

> select factorial(5);
120

NOTE - The input must be an integer expression within the inclusive range of 0 to 20.

CBRT( <expr> )

Calculates the cubic root of a numerical value.

Support datatype: Integer, Double

> select cbrt(125);
5
> select cbrt(5);
1.709975946676697

SQRT( <expr> )

Calculates the square root of a numerical value.

Support datatype: Integer, Double

> select sqrt(4);
2
> select sqrt(-1);
nan

EXP( <expr> )

Calculates the exponential function of a floating-point value, with Euler's number e as the base

Support datatype: Integer, Double

> select exp(1);
2.7182818284590455

Last updated