\frac{e^{x}}{e^{x} - 1}\frac{e^{x}}{x + x \cdot \left(x \cdot \left(0.5 + x \cdot 0.16666666666666666\right)\right)}(FPCore (x) :precision binary64 (/ (exp x) (- (exp x) 1.0)))
(FPCore (x) :precision binary64 (/ (exp x) (+ x (* x (* x (+ 0.5 (* x 0.16666666666666666)))))))
double code(double x) {
return (((double) exp(x)) / ((double) (((double) exp(x)) - 1.0)));
}
double code(double x) {
return (((double) exp(x)) / ((double) (x + ((double) (x * ((double) (x * ((double) (0.5 + ((double) (x * 0.16666666666666666)))))))))));
}




Bits error versus x
Results
| Original | 41.1 |
|---|---|
| Target | 40.7 |
| Herbie | 1.0 |
Initial program Error: 41.1 bits
Taylor expanded around 0 Error: 11.5 bits
SimplifiedError: 1.0 bits
Final simplificationError: 1.0 bits
herbie shell --seed 2020203
(FPCore (x)
:name "expq2 (section 3.11)"
:precision binary64
:herbie-target
(/ 1.0 (- 1.0 (exp (- x))))
(/ (exp x) (- (exp x) 1.0)))