\frac{x \cdot 100}{x + y}x \cdot \frac{100}{x + y}double f(double x, double y) {
double r695125 = x;
double r695126 = 100.0;
double r695127 = r695125 * r695126;
double r695128 = y;
double r695129 = r695125 + r695128;
double r695130 = r695127 / r695129;
return r695130;
}
double f(double x, double y) {
double r695131 = x;
double r695132 = 100.0;
double r695133 = y;
double r695134 = r695131 + r695133;
double r695135 = r695132 / r695134;
double r695136 = r695131 * r695135;
return r695136;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.3
rmApplied *-un-lft-identity0.3
Applied times-frac0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019305 +o rules:numerics
(FPCore (x y)
:name "Development.Shake.Progress:message from shake-0.15.5"
:precision binary64
:herbie-target
(* (/ x 1) (/ 100 (+ x y)))
(/ (* x 100) (+ x y)))