\frac{x \cdot y}{y + 1}\frac{x}{\frac{1}{y} + 1}double f(double x, double y) {
double r31901015 = x;
double r31901016 = y;
double r31901017 = r31901015 * r31901016;
double r31901018 = 1.0;
double r31901019 = r31901016 + r31901018;
double r31901020 = r31901017 / r31901019;
return r31901020;
}
double f(double x, double y) {
double r31901021 = x;
double r31901022 = 1.0;
double r31901023 = y;
double r31901024 = r31901022 / r31901023;
double r31901025 = 1.0;
double r31901026 = r31901024 + r31901025;
double r31901027 = r31901021 / r31901026;
return r31901027;
}




Bits error versus x




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