\frac{e^{x}}{e^{x} - 1}\frac{1}{\frac{{x}^{2} \cdot \left(x \cdot \frac{1}{6} + \frac{1}{2}\right) + x}{e^{x}}}double code(double x) {
return (exp(x) / (exp(x) - 1.0));
}
double code(double x) {
return (1.0 / (((pow(x, 2.0) * ((x * 0.16666666666666666) + 0.5)) + x) / exp(x)));
}




Bits error versus x
Results
| Original | 41.2 |
|---|---|
| Target | 40.7 |
| Herbie | 1.0 |
Initial program 41.2
Taylor expanded around 0 11.8
Simplified1.0
rmApplied clear-num1.0
Final simplification1.0
herbie shell --seed 2020078
(FPCore (x)
:name "expq2 (section 3.11)"
:precision binary64
:herbie-target
(/ 1 (- 1 (exp (- x))))
(/ (exp x) (- (exp x) 1)))