Standard library / math

math.Exp()

Natural exponential e raised to x. Expected stdout: '1\n'.

Formal Syntax & Structure

go syntaxgo
func Exp(x float64) float64

Parameters & Attributes

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

Return Value

float64

Natural exponential e raised to x.

Working Example

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