\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 r442384 = x;
double r442385 = y;
double r442386 = r442384 * r442385;
double r442387 = r442384 + r442385;
double r442388 = r442387 * r442387;
double r442389 = 1.0;
double r442390 = r442387 + r442389;
double r442391 = r442388 * r442390;
double r442392 = r442386 / r442391;
return r442392;
}
double f(double x, double y) {
double r442393 = x;
double r442394 = y;
double r442395 = r442393 + r442394;
double r442396 = r442393 / r442395;
double r442397 = r442396 / r442395;
double r442398 = 1.0;
double r442399 = r442395 + r442398;
double r442400 = r442394 / r442399;
double r442401 = r442397 * r442400;
return r442401;
}




Bits error versus x




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