\frac{x \cdot \left(y + z\right)}{z}\frac{x}{\frac{z}{z + y}}(FPCore (x y z) :precision binary64 (/ (* x (+ y z)) z))
(FPCore (x y z) :precision binary64 (/ x (/ z (+ z y))))
double code(double x, double y, double z) {
return (x * (y + z)) / z;
}
double code(double x, double y, double z) {
return x / (z / (z + y));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.7 |
|---|---|
| Target | 2.9 |
| Herbie | 2.9 |
Initial program 12.7
rmApplied associate-/l*_binary642.9
Simplified2.9
Final simplification2.9
herbie shell --seed 2021118
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))