\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{\frac{y}{\left(y + 1\right) + x}}{y + x} \cdot \frac{x}{y + x}double f(double x, double y) {
double r448602 = x;
double r448603 = y;
double r448604 = r448602 * r448603;
double r448605 = r448602 + r448603;
double r448606 = r448605 * r448605;
double r448607 = 1.0;
double r448608 = r448605 + r448607;
double r448609 = r448606 * r448608;
double r448610 = r448604 / r448609;
return r448610;
}
double f(double x, double y) {
double r448611 = y;
double r448612 = 1.0;
double r448613 = r448611 + r448612;
double r448614 = x;
double r448615 = r448613 + r448614;
double r448616 = r448611 / r448615;
double r448617 = r448611 + r448614;
double r448618 = r448616 / r448617;
double r448619 = r448614 / r448617;
double r448620 = r448618 * r448619;
return r448620;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.6
rmApplied times-frac7.8
Simplified0.2
Simplified0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))