\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} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r585750 = x;
double r585751 = y;
double r585752 = r585750 * r585751;
double r585753 = r585750 + r585751;
double r585754 = r585753 * r585753;
double r585755 = 1.0;
double r585756 = r585753 + r585755;
double r585757 = r585754 * r585756;
double r585758 = r585752 / r585757;
return r585758;
}
double f(double x, double y) {
double r585759 = x;
double r585760 = y;
double r585761 = r585759 + r585760;
double r585762 = r585759 / r585761;
double r585763 = 1.0;
double r585764 = r585761 + r585763;
double r585765 = r585760 / r585764;
double r585766 = r585762 * r585765;
double r585767 = r585766 / r585761;
return r585767;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.9
rmApplied times-frac7.9
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
rmApplied associate-*r/0.1
Final simplification0.1
herbie shell --seed 2020042 +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))))