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

Error

Bits error versus x

Derivation

  1. Initial program 0.0

    \[\frac{2}{e^{x} + e^{-x}}\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.0

    \[\leadsto \color{blue}{\sqrt{\frac{2}{e^{x} + e^{-x}}} \cdot \sqrt{\frac{2}{e^{x} + e^{-x}}}}\]
  4. Using strategy rm
  5. Applied log1p-expm1-u0.0

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

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

Reproduce

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