Average Error: 0.0 → 0.1
Time: 24.0s
Precision: 64
Internal Precision: 128
\[\frac{2}{e^{x} + e^{-x}}\]
\[\log \left(e^{\frac{2}{e^{x} + e^{-x}}}\right)\]

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\frac{2}{e^{x} + e^{-x}}\]
  2. Using strategy rm
  3. Applied add-log-exp0.1

    \[\leadsto \color{blue}{\log \left(e^{\frac{2}{e^{x} + e^{-x}}}\right)}\]
  4. Final simplification0.1

    \[\leadsto \log \left(e^{\frac{2}{e^{x} + e^{-x}}}\right)\]

Reproduce

herbie shell --seed 2019051 
(FPCore (x)
  :name "Hyperbolic secant"
  (/ 2 (+ (exp x) (exp (- x)))))