Average Error: 58.0 → 1.7
Time: 52.7s
Precision: 64
Internal Precision: 1344
\[\frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}\]
\[\left(\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)\right) \cdot \frac{1}{e^{x} + e^{-x}}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 58.0

    \[\frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}\]
  2. Taylor expanded around 0 1.7

    \[\leadsto \frac{\color{blue}{\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)}}{e^{x} + e^{-x}}\]
  3. Using strategy rm
  4. Applied div-inv1.7

    \[\leadsto \color{blue}{\left(\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)\right) \cdot \frac{1}{e^{x} + e^{-x}}}\]

Runtime

Time bar (total: 52.7s)Debug logProfile

herbie shell --seed 2018193 
(FPCore (x)
  :name "Hyperbolic tangent"
  (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))))