\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 r259061 = x;
double r259062 = y;
double r259063 = r259061 * r259062;
double r259064 = r259061 + r259062;
double r259065 = r259064 * r259064;
double r259066 = 1.0;
double r259067 = r259064 + r259066;
double r259068 = r259065 * r259067;
double r259069 = r259063 / r259068;
return r259069;
}
double f(double x, double y) {
double r259070 = x;
double r259071 = y;
double r259072 = r259070 + r259071;
double r259073 = r259070 / r259072;
double r259074 = r259073 / r259072;
double r259075 = 1.0;
double r259076 = r259072 + r259075;
double r259077 = r259071 / r259076;
double r259078 = r259074 * r259077;
return r259078;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 20.1
rmApplied times-frac8.0
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2019304
(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))))