\frac{x \cdot y}{y + 1}\frac{x}{\frac{y + 1}{y}}double f(double x, double y) {
double r894230 = x;
double r894231 = y;
double r894232 = r894230 * r894231;
double r894233 = 1.0;
double r894234 = r894231 + r894233;
double r894235 = r894232 / r894234;
return r894235;
}
double f(double x, double y) {
double r894236 = x;
double r894237 = y;
double r894238 = 1.0;
double r894239 = r894237 + r894238;
double r894240 = r894239 / r894237;
double r894241 = r894236 / r894240;
return r894241;
}




Bits error versus x




Bits error versus y
Results
| Original | 7.7 |
|---|---|
| Target | 0.0 |
| Herbie | 0.1 |
Initial program 7.7
rmApplied associate-/l*0.1
Final simplification0.1
herbie shell --seed 2019305 +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.84827882972468) (- (/ x (* y y)) (- (/ x y) x)) (if (< y 6799310503.41891003) (/ (* x y) (+ y 1)) (- (/ x (* y y)) (- (/ x y) x))))
(/ (* x y) (+ y 1)))