\left(e^{x} - 2\right) + e^{-x}x \cdot x + \left(0.002777777777777778 \cdot {x}^{6} + 0.08333333333333333 \cdot {x}^{4}\right)(FPCore (x) :precision binary64 (+ (- (exp x) 2.0) (exp (- x))))
(FPCore (x) :precision binary64 (+ (* x x) (+ (* 0.002777777777777778 (pow x 6.0)) (* 0.08333333333333333 (pow x 4.0)))))
double code(double x) {
return ((double) (((double) (((double) exp(x)) - 2.0)) + ((double) exp(((double) -(x))))));
}
double code(double x) {
return ((double) (((double) (x * x)) + ((double) (((double) (0.002777777777777778 * ((double) pow(x, 6.0)))) + ((double) (0.08333333333333333 * ((double) pow(x, 4.0))))))));
}




Bits error versus x
Results
| Original | 29.9 |
|---|---|
| Target | 0.0 |
| Herbie | 0.7 |
Initial program Error: 29.9 bits
SimplifiedError: 29.9 bits
Taylor expanded around 0 Error: 0.7 bits
SimplifiedError: 0.7 bits
Final simplificationError: 0.7 bits
herbie shell --seed 2020204
(FPCore (x)
:name "exp2 (problem 3.3.7)"
:precision binary64
:herbie-expected 1.5
:herbie-target
(* 4.0 (pow (sinh (/ x 2.0)) 2.0))
(+ (- (exp x) 2.0) (exp (- x))))