\frac{x \cdot 100}{x + y}100 \cdot \frac{x}{x + y}double f(double x, double y) {
double r4004 = x;
double r4005 = 100.0;
double r4006 = r4004 * r4005;
double r4007 = y;
double r4008 = r4004 + r4007;
double r4009 = r4006 / r4008;
return r4009;
}
double f(double x, double y) {
double r4010 = 100.0;
double r4011 = x;
double r4012 = y;
double r4013 = r4011 + r4012;
double r4014 = r4011 / r4013;
double r4015 = r4010 * r4014;
return r4015;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.4
rmApplied *-un-lft-identity0.4
Applied times-frac0.2
Simplified0.2
rmApplied div-inv0.3
rmApplied associate-*r*0.5
Simplified0.5
rmApplied associate-*l*0.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2020025 +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)))