\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{\frac{x}{x + y}}{x + y} \cdot y}{\left(x + y\right) + 1}double f(double x, double y) {
double r448568 = x;
double r448569 = y;
double r448570 = r448568 * r448569;
double r448571 = r448568 + r448569;
double r448572 = r448571 * r448571;
double r448573 = 1.0;
double r448574 = r448571 + r448573;
double r448575 = r448572 * r448574;
double r448576 = r448570 / r448575;
return r448576;
}
double f(double x, double y) {
double r448577 = x;
double r448578 = y;
double r448579 = r448577 + r448578;
double r448580 = r448577 / r448579;
double r448581 = r448580 / r448579;
double r448582 = r448581 * r448578;
double r448583 = 1.0;
double r448584 = r448579 + r448583;
double r448585 = r448582 / r448584;
return r448585;
}




Bits error versus x




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