Average Error: 58.0 → 1.6
Time: 30.0s
Precision: 64
Internal Precision: 1408
\[\frac{e^{x} - e^{-x}}{e^{x} + e^{-x}}\]
\[\frac{\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)}{2 + \left({x}^{2} + e^{\left(\sqrt[3]{\log \left(\frac{1}{12} \cdot {x}^{4}\right)} \cdot \sqrt[3]{\log \left(\frac{1}{12} \cdot {x}^{4}\right)}\right) \cdot \sqrt[3]{\log \left(\frac{1}{12} \cdot {x}^{4}\right)}}\right)}\]

Error

Bits error versus x

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. Taylor expanded around 0 1.6

    \[\leadsto \frac{\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)}{\color{blue}{2 + \left({x}^{2} + \frac{1}{12} \cdot {x}^{4}\right)}}\]
  4. Using strategy rm
  5. Applied add-exp-log1.6

    \[\leadsto \frac{\frac{1}{3} \cdot {x}^{3} + \left(\frac{1}{60} \cdot {x}^{5} + 2 \cdot x\right)}{2 + \left({x}^{2} + \color{blue}{e^{\log \left(\frac{1}{12} \cdot {x}^{4}\right)}}\right)}\]
  6. Using strategy rm
  7. Applied add-cube-cbrt1.6

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

Runtime

Time bar (total: 30.0s)Debug logProfile

herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)' 
(FPCore (x)
  :name "Hyperbolic tangent"
  (/ (- (exp x) (exp (- x))) (+ (exp x) (exp (- x)))))