\frac{x \cdot 100}{x + y}100 \cdot \frac{x}{x + y}double f(double x, double y) {
double r526212 = x;
double r526213 = 100.0;
double r526214 = r526212 * r526213;
double r526215 = y;
double r526216 = r526212 + r526215;
double r526217 = r526214 / r526216;
return r526217;
}
double f(double x, double y) {
double r526218 = 100.0;
double r526219 = x;
double r526220 = y;
double r526221 = r526219 + r526220;
double r526222 = r526219 / r526221;
double r526223 = r526218 * r526222;
return r526223;
}




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 2019303
(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)))