Standard library / math

math.Exp2()

Two raised to x. Expected stdout: '32\n'.

Formal Syntax & Structure

go syntaxgo
func Exp2(x float64) float64

Parameters & Attributes

NameTypeDescription
xfloat64First input operand (or sole input if unary).

Return Value

float64

Two raised to x.

Working Example

Example Snippetgo
package main
import (  "fmt"  "math")
func main() {  fmt.Println(math.Exp2(5))}
Go Reference