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




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 2.9 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program Error: 2.9 bits
rmApplied clear-numError: 2.9 bits
SimplifiedError: 0.0 bits
rmApplied *-un-lft-identityError: 0.0 bits
Applied add-sqr-sqrtError: 0.1 bits
Applied times-fracError: 0.1 bits
Applied associate-*l*Error: 0.1 bits
SimplifiedError: 0.1 bits
Final simplificationError: 0.1 bits
herbie shell --seed 2020200
(FPCore (x y z)
:name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))
(+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))