\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 r673901 = x;
double r673902 = y;
double r673903 = r673901 * r673902;
double r673904 = r673901 + r673902;
double r673905 = r673904 * r673904;
double r673906 = 1.0;
double r673907 = r673904 + r673906;
double r673908 = r673905 * r673907;
double r673909 = r673903 / r673908;
return r673909;
}
double f(double x, double y) {
double r673910 = x;
double r673911 = y;
double r673912 = r673910 + r673911;
double r673913 = r673910 / r673912;
double r673914 = 1.0;
double r673915 = r673912 + r673914;
double r673916 = r673911 / r673915;
double r673917 = r673913 * r673916;
double r673918 = r673917 / r673912;
return r673918;
}




Bits error versus x




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