HUGO
Menu
GitHub 90206 stars Mastodon

math.Pow

Returns the first number raised to the power of the second number.
Syntax
math.Pow VALUE1 VALUE2
Returns
float64
Alias
pow

Usage

The math.Pow function returns the first number raised to the power of the second number.

Examples

{{ math.Pow 2 3 }} → 8

With a negative or fractional exponent:

{{ math.Pow 2 -1 }} → 0.5
{{ math.Pow 4 0.5 }} → 2