\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} \cdot y}{x + y}}{\left(x + y\right) + 1}double f(double x, double y) {
double r475359 = x;
double r475360 = y;
double r475361 = r475359 * r475360;
double r475362 = r475359 + r475360;
double r475363 = r475362 * r475362;
double r475364 = 1.0;
double r475365 = r475362 + r475364;
double r475366 = r475363 * r475365;
double r475367 = r475361 / r475366;
return r475367;
}
double f(double x, double y) {
double r475368 = x;
double r475369 = y;
double r475370 = r475368 + r475369;
double r475371 = r475368 / r475370;
double r475372 = r475371 * r475369;
double r475373 = r475372 / r475370;
double r475374 = 1.0;
double r475375 = r475370 + r475374;
double r475376 = r475373 / r475375;
return r475376;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.5 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
Initial program 19.5
rmApplied times-frac7.8
rmApplied *-un-lft-identity7.8
Applied times-frac0.2
Applied associate-*l*0.2
rmApplied associate-*r/0.2
Applied associate-*r/0.2
Simplified0.1
Final simplification0.1
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))))