Power Functions

Contents

Power Functions#

pow(base, exponent)#

Power function.

Parameters:
  • base (Integer or Real) – The base of the power.

  • exponent (Integer or Real) – The exponent of the power.

Definition:

\(\mathrm{pow}(\mathrm{base}, \mathrm{exponent}) = \mathrm{base}^{\mathrm{exponent}}\)

Domain:

\(\mathrm{base} > 0\), or \(\mathrm{base} = 0\) and \(\mathrm{exponent} \geq 0\), or \(\mathrm{base} < 0\) and \(\mathrm{exponent}\) has an integer value. (Same restrictions as std::pow in C++.)

Range:

\((-\infty, \infty)\)

Returns:

The value of \(\mathrm{base}^{\mathrm{exponent}}\).

Return type:

Real

sqrt(x)#

Square root function.

Parameters:

x (Real) – The value to take the square root of.

Definition:

\(\mathrm{sqrt}(x) = \sqrt{x}\)

Domain:

\([0, \infty)\)

Range:

\([0, \infty)\)

Returns:

The value of \(\sqrt{x}\).

Return type:

Real

cbrt(x)#

Cube root function.

Parameters:

x (Real) – The value to take the cube root of.

Definition:

\(\mathrm{cbrt}(x) = \sqrt[3]{x}\)

Domain:

\((-\infty, \infty)\)

Range:

\((-\infty, \infty)\)

Returns:

The value of \(\sqrt[3]{x}\).

Return type:

Real