\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 r323564 = x;
double r323565 = y;
double r323566 = r323564 * r323565;
double r323567 = r323564 + r323565;
double r323568 = r323567 * r323567;
double r323569 = 1.0;
double r323570 = r323567 + r323569;
double r323571 = r323568 * r323570;
double r323572 = r323566 / r323571;
return r323572;
}
double f(double x, double y) {
double r323573 = x;
double r323574 = y;
double r323575 = r323573 + r323574;
double r323576 = r323573 / r323575;
double r323577 = r323576 / r323575;
double r323578 = r323577 * r323574;
double r323579 = 1.0;
double r323580 = r323575 + r323579;
double r323581 = r323578 / r323580;
return r323581;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.8
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied clear-num0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019303
(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))))