Average Error: 60.3 → 0.0
Time: 13.9s
Precision: 64
Internal precision: 128
\[\frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}\]
\[\tanh x\]

Error

Bits error versus x

Derivation

  1. Initial program 60.3

    \[\frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}\]
  2. Using strategy rm
  3. Applied tanh-undef 0.0

    \[\leadsto \color{blue}{\tanh x}\]
  4. Removed slow pow expressions

Runtime

Time bar (total: 13.9s) Debug log

Please include this information when filing a bug report:

herbie --seed '#(3833187700 999368781 1669259031 1181779778 1320764402 3448336639)'
(FPCore (x)
  :name "Hyperbolic tangent"
  (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))))