x + \frac{y}{1.12837916709551256 \cdot e^{z} - x \cdot y}x + \frac{1}{\mathsf{fma}\left(\frac{e^{z}}{y}, 1.12837916709551256, -x\right)}double code(double x, double y, double z) {
return (x + (y / ((1.1283791670955126 * exp(z)) - (x * y))));
}
double code(double x, double y, double z) {
return (x + (1.0 / fma((exp(z) / y), 1.1283791670955126, -x)));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.8 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 2.8
rmApplied clear-num2.8
Simplified0.1
Final simplification0.1
herbie shell --seed 2020092 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ x (/ 1 (- (* (/ 1.1283791670955126 y) (exp z)) x)))
(+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))