Calculates the value of a number raised to a power. pow() can be used to raise a number to a fractional power. This is useful for generating exponential mapping of values or curves.


pow(base, exponent)


base: the number (float)

exponent: the power to which the base is raised (float)


The result of the exponentiation (double)

Example Code

Calculate the value of x raised to the power of y:

z = pow(x, y);

See the (fscale) sketch for a more complex example of the use of pow().

See also

  • Language abs()

  • Language constrain()

  • Language map()

  • Language max()

  • Language min()

  • Language sq()

  • Language sqrt()