gitee.com/quant1x/num@v0.3.2/math32/cosh.go (about) 1 package math32 2 3 func Cosh(x float32) float32 { 4 x = Abs(x) 5 if x > 21 { 6 return Exp(x) * 0.5 7 } 8 ex := Exp(x) 9 return (ex + 1/ex) * 0.5 10 }