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

Error

Bits error versus x

Target

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

Derivation

  1. Initial program 33.8

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

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

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

Runtime

Total time: 17.2s Debug log

Please report a bug with the following info:

herbie --seed '#(524219494 658074825 2043952164 1561678977 2920293507 1136532615)'
(FPCore (x)
  :name "NMSE problem 3.3.7"

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

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