Average Error: 0.0 → 0.0
Time: 13.4s
Precision: 64
Internal Precision: 128
\[\frac{2}{e^{x} + e^{-x}}\]
\[(e^{\log_* (1 + \frac{2}{e^{x} + e^{-x}})} - 1)^*\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{2}{e^{x} + e^{-x}}\]
  2. Using strategy rm
  3. Applied expm1-log1p-u0.0

    \[\leadsto \color{blue}{(e^{\log_* (1 + \frac{2}{e^{x} + e^{-x}})} - 1)^*}\]
  4. Final simplification0.0

    \[\leadsto (e^{\log_* (1 + \frac{2}{e^{x} + e^{-x}})} - 1)^*\]

Reproduce

herbie shell --seed 2019030 +o rules:numerics
(FPCore (x)
  :name "Hyperbolic secant"
  (/ 2 (+ (exp x) (exp (- x)))))