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)

Parameter Values

  • base: the number. Allowed data types: float.
  • exponent: the power to which the base is raised. Allowed data types: float.

Return Values

  • The result of the exponentiation. Data type: 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

Please note: These are affiliate links. If you buy the components through these links, We may get a commission at no extra cost to you. We appreciate it.