\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x}{x + y} \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r364989 = x;
double r364990 = y;
double r364991 = r364989 * r364990;
double r364992 = r364989 + r364990;
double r364993 = r364992 * r364992;
double r364994 = 1.0;
double r364995 = r364992 + r364994;
double r364996 = r364993 * r364995;
double r364997 = r364991 / r364996;
return r364997;
}
double f(double x, double y) {
double r364998 = x;
double r364999 = y;
double r365000 = r364998 + r364999;
double r365001 = r364998 / r365000;
double r365002 = 1.0;
double r365003 = r365000 + r365002;
double r365004 = r364999 / r365003;
double r365005 = r365004 / r365000;
double r365006 = r365001 * r365005;
return r365006;
}




Bits error versus x




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