\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{\frac{x}{x + y} \cdot y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r418616 = x;
double r418617 = y;
double r418618 = r418616 * r418617;
double r418619 = r418616 + r418617;
double r418620 = r418619 * r418619;
double r418621 = 1.0;
double r418622 = r418619 + r418621;
double r418623 = r418620 * r418622;
double r418624 = r418618 / r418623;
return r418624;
}
double f(double x, double y) {
double r418625 = x;
double r418626 = y;
double r418627 = r418625 + r418626;
double r418628 = r418625 / r418627;
double r418629 = r418628 * r418626;
double r418630 = 1.0;
double r418631 = r418627 + r418630;
double r418632 = r418629 / r418631;
double r418633 = r418632 / r418627;
return r418633;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.9
rmApplied times-frac8.0
rmApplied *-un-lft-identity8.0
Applied times-frac0.2
Applied associate-*l*0.2
rmApplied associate-*l/7.6
Applied associate-*r/7.6
Simplified0.1
Final simplification0.1
herbie shell --seed 2020047 +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))))