\frac{x \cdot 100}{x + y}\frac{x}{x + y} \cdot 100double f(double x, double y) {
double r558414 = x;
double r558415 = 100.0;
double r558416 = r558414 * r558415;
double r558417 = y;
double r558418 = r558414 + r558417;
double r558419 = r558416 / r558418;
return r558419;
}
double f(double x, double y) {
double r558420 = x;
double r558421 = y;
double r558422 = r558420 + r558421;
double r558423 = r558420 / r558422;
double r558424 = 100.0;
double r558425 = r558423 * r558424;
return r558425;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.3
rmApplied clear-num0.7
Simplified0.5
rmApplied div-inv0.5
Applied add-sqr-sqrt0.5
Applied times-frac0.5
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019179 +o rules:numerics
(FPCore (x y)
:name "Development.Shake.Progress:message from shake-0.15.5"
:herbie-target
(* (/ x 1.0) (/ 100.0 (+ x y)))
(/ (* x 100.0) (+ x y)))