\frac{x \cdot 100}{x + y}100 \cdot \frac{x}{x + y}double f(double x, double y) {
double r530662 = x;
double r530663 = 100.0;
double r530664 = r530662 * r530663;
double r530665 = y;
double r530666 = r530662 + r530665;
double r530667 = r530664 / r530666;
return r530667;
}
double f(double x, double y) {
double r530668 = 100.0;
double r530669 = x;
double r530670 = y;
double r530671 = r530669 + r530670;
double r530672 = r530669 / r530671;
double r530673 = r530668 * r530672;
return r530673;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.4 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.4
rmApplied associate-/l*0.2
rmApplied add-sqr-sqrt0.2
Applied *-un-lft-identity0.2
Applied times-frac0.4
Applied *-un-lft-identity0.4
Applied times-frac0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019297
(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)))