Calculate hyperbolic secant with sech
sech(x) is the reciprocal of hyperbolic cosine: 1 / cosh(x). For real x it is even, equals 1 at zero, and approaches zero as |x| grows.
Relationships
Use cosh for its denominator and tanh for the identity sech(x)^2 + tanh(x)^2 = 1. It appears in localized pulse and probability-shaped models.
Caveats
Unlike sec, sech is hyperbolic rather than circular. Complex inputs can encounter poles where cosh is zero. For exponential expressions, compare exp and take care with extreme values.