\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}}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r563055 = x;
double r563056 = y;
double r563057 = r563055 * r563056;
double r563058 = r563055 + r563056;
double r563059 = r563058 * r563058;
double r563060 = 1.0;
double r563061 = r563058 + r563060;
double r563062 = r563059 * r563061;
double r563063 = r563057 / r563062;
return r563063;
}
double f(double x, double y) {
double r563064 = x;
double r563065 = y;
double r563066 = r563064 + r563065;
double r563067 = r563064 / r563066;
double r563068 = r563067 / r563066;
double r563069 = 1.0;
double r563070 = r563066 + r563069;
double r563071 = r563065 / r563070;
double r563072 = r563068 * r563071;
return r563072;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.5 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 19.5
rmApplied times-frac7.8
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020045
(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))))