Standard library / math
math.Pow()
Raises x to y; negative finite base and noninteger finite exponent produce NaN. Expected stdout: '1024\n'.
Formal Syntax & Structure
go syntaxgo
func Pow(x, y float64) float64Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| x | float64 | First input operand (or sole input if unary). |
| y | float64 | Second input operand. |
Return Value
float64
Raises x to y; negative finite base and noninteger finite exponent produce NaN.
Working Example
Example Snippetgo
package main
import ( "fmt" "math")
func main() { fmt.Println(math.Pow(2, 10))}