Average Error: 34.4 → 0.1
Time: 1.2m
Precision: 64
Ground Truth: 128
\[\left(e^{x} - 2\right) + e^{-x}\]
\[{x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)\]

Error

Bits error versus x

Target

Original34.4
Comparison8.7
Herbie0.1
\[ 4 \cdot {\left(\sinh \left(\frac{x}{2}\right)\right)}^2 \]

Derivation

  1. Initial program 34.4

    \[\left(e^{x} - 2\right) + e^{-x}\]
  2. Applied taylor 0.1

    \[\leadsto {x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)\]
  3. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{{x}^2 + \left(\frac{1}{12} \cdot {x}^{4} + \frac{1}{360} \cdot {x}^{6}\right)}\]
  4. Removed slow pow expressions

Runtime

Total time: 1.2m Debug log

Please include this information when filing a bug report:

herbie --seed '#(3924153209 579209584 998965921 1418678395 3996233737 3722675809)'
(FPCore (x)
  :name "NMSE problem 3.3.7"

  :target
  (* 4 (sqr (sinh (/ x 2))))

  (+ (- (exp x) 2) (exp (- x))))