POW()

All functions > MATH > POW()

Returns a number raised to the power of another number.

Signatures

Power

Returns: Base raised to the power of exponent

POW(base: T, exponent: T) → T
sql
ParameterTypeRequiredDescription
baseTYesThe base number
exponentTYesThe exponent

With:

  • T : Any numeric type

Signature notes:

  • Same-type numeric pairs, or a floating/DECIMAL base with an integer exponent
  • POW(x, 0) = 1 for any non-zero x
  • POW(0, y) = 0 for positive y
  • Returns NULL if either input is NULL
  • Alias: POWER

Aliases

  • POWER

Related operators

Examples

POW(...)

FeatureQL
RETURN
    -- Function call
    f1 := POW(2, 3)
;
Result
f1 BIGINT
8

.POW(...) — chained

FeatureQL
RETURN
    -- Integer literal: parenthesize for `.POW` on BIGINT
    f1 := (2).POW(3)
;
Result
f1 BIGINT
8

Edge cases

FeatureQL
RETURN
    -- DOUBLE operands: chain without extra parentheses (same-type floating-point power)
    f1 := 2e0.POW(3e0)
;
Result
f1 DECIMAL
8.0