\frac{x \cdot y}{y + 1}\frac{x}{\frac{y + 1}{y}}double f(double x, double y) {
double r694246 = x;
double r694247 = y;
double r694248 = r694246 * r694247;
double r694249 = 1.0;
double r694250 = r694247 + r694249;
double r694251 = r694248 / r694250;
return r694251;
}
double f(double x, double y) {
double r694252 = x;
double r694253 = y;
double r694254 = 1.0;
double r694255 = r694253 + r694254;
double r694256 = r694255 / r694253;
double r694257 = r694252 / r694256;
return r694257;
}




Bits error versus x




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