\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{x}{x + y}}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r444612 = x;
double r444613 = y;
double r444614 = r444612 * r444613;
double r444615 = r444612 + r444613;
double r444616 = r444615 * r444615;
double r444617 = 1.0;
double r444618 = r444615 + r444617;
double r444619 = r444616 * r444618;
double r444620 = r444614 / r444619;
return r444620;
}
double f(double x, double y) {
double r444621 = x;
double r444622 = y;
double r444623 = r444621 + r444622;
double r444624 = r444621 / r444623;
double r444625 = r444624 / r444623;
double r444626 = 1.0;
double r444627 = r444623 + r444626;
double r444628 = r444622 / r444627;
double r444629 = r444625 * r444628;
return r444629;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 20.1
rmApplied times-frac8.3
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020083 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1))))