\frac{x \cdot y}{y + 1}\frac{x}{\frac{y + 1}{y}}double f(double x, double y) {
double r390886 = x;
double r390887 = y;
double r390888 = r390886 * r390887;
double r390889 = 1.0;
double r390890 = r390887 + r390889;
double r390891 = r390888 / r390890;
return r390891;
}
double f(double x, double y) {
double r390892 = x;
double r390893 = y;
double r390894 = 1.0;
double r390895 = r390893 + r390894;
double r390896 = r390895 / r390893;
double r390897 = r390892 / r390896;
return r390897;
}




Bits error versus x




Bits error versus y
Results
| Original | 7.9 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 7.9
rmApplied associate-/l*0.1
Final simplification0.1
herbie shell --seed 2019326 +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)))