POWER

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Returns a number raised to the power of another number.

Syntax 

1power(<a>, <b>)

Arguments 

Required 

  • <a>: The base.
  • <b>: The exponent.

Returns 

Returns a raised to the power of b as a double precision or numeric value.

Considerations 

  • power(0, 0) returns 1.
  • Raising zero to a negative power is undefined and returns an error.
  • Raising a negative number to a non-integer power yields a complex result and returns an error.

Examples 

Raise a Number to a Power 

Compute a value raised to a power.

1SELECT power(9.0, 3.0) AS result;

Returns 729.

Zero to the Zero Power 

1SELECT power(0, 0) AS result;

Returns 1.

Related Documentation