HomeManualTopicsTypesSymbols

std::pow

computes the power of its first argument to the second argument

Parameters

base
a real number
exponent
a real number

Result

result
the computed power

Description

This function calls the pow-function of the C library.

Example

println! pow(2 3)

Output

8

Example

println! pow(2 -3)

Output

0.125

Topic

Numbers

See also

std::exp computes the exponential function of its argument
std::ln computes the logarithm to the base e
std::sqrt computes the square root of its argument