\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 r407906 = x;
double r407907 = y;
double r407908 = r407906 * r407907;
double r407909 = r407906 + r407907;
double r407910 = r407909 * r407909;
double r407911 = 1.0;
double r407912 = r407909 + r407911;
double r407913 = r407910 * r407912;
double r407914 = r407908 / r407913;
return r407914;
}
double f(double x, double y) {
double r407915 = x;
double r407916 = y;
double r407917 = r407915 + r407916;
double r407918 = r407915 / r407917;
double r407919 = 1.0;
double r407920 = r407917 + r407919;
double r407921 = r407916 / r407920;
double r407922 = r407918 * r407921;
double r407923 = r407922 / r407917;
return r407923;
}




Bits error versus x




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