Standard library / math

math.Atanh()

Inverse hyperbolic tangent; ±1 yields signed infinity, outside [-1,1] yields NaN. Expected stdout: '0\n'.

Formal Syntax & Structure

go syntaxgo
func Atanh(x float64) float64

Parameters & Attributes

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

Return Value

float64

Inverse hyperbolic tangent; ±1 yields signed infinity, outside [-1,1] yields NaN.

Working Example

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