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




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 13.0 |
|---|---|
| Target | 3.1 |
| Herbie | 3.4 |
Initial program 13.0
rmApplied *-un-lft-identity_binary64_1187213.0
Applied times-frac_binary64_118783.4
Simplified3.4
Final simplification3.4
herbie shell --seed 2020292
(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))