Exponentiation (**)

The ** operator calculates an exponentiation.

Syntax

num-expr ** int-expr
  1. num-expr is a numeric expression.

Usage

The ** operator returns a value calculated by raising the left-hand operand to a power corresponding to the integer part of the right-hand operand.

If the right operand is a number with a decimal part, it is rounded to a whole integer before computing the exponentiation.

If one of the operands is NULL, the arithmetic expression evaluates to NULL.

Tip: The ** operator takes an integer as exponent. If you need to raise a number to an exponent that is a real number, use the fgl_decimal_power() utility function.

Example

MAIN
  DISPLAY 2 ** 8
  DISPLAY 10 ** 4
END MAIN