\frac{x \cdot y}{y + 1}\frac{x}{\frac{y + 1}{y}}double f(double x, double y) {
double r617516 = x;
double r617517 = y;
double r617518 = r617516 * r617517;
double r617519 = 1.0;
double r617520 = r617517 + r617519;
double r617521 = r617518 / r617520;
return r617521;
}
double f(double x, double y) {
double r617522 = x;
double r617523 = y;
double r617524 = 1.0;
double r617525 = r617523 + r617524;
double r617526 = r617525 / r617523;
double r617527 = r617522 / r617526;
return r617527;
}




Bits error versus x




Bits error versus y
Results
| Original | 8.3 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 8.3
rmApplied associate-/l*0.1
Final simplification0.1
herbie shell --seed 2020083 +o rules:numerics
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, B"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ x (* y y)) (- (/ x y) x)) (if (< y 6799310503.41891) (/ (* x y) (+ y 1)) (- (/ x (* y y)) (- (/ x y) x))))
(/ (* x y) (+ y 1)))