Standard library / math

math.Tanh()

Hyperbolic tangent. Expected stdout: '0\n'.

Formal Syntax & Structure

go syntaxgo
func Tanh(x float64) float64

Parameters & Attributes

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

Return Value

float64

Hyperbolic tangent.

Working Example

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