\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} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r455496 = x;
double r455497 = y;
double r455498 = r455496 * r455497;
double r455499 = r455496 + r455497;
double r455500 = r455499 * r455499;
double r455501 = 1.0;
double r455502 = r455499 + r455501;
double r455503 = r455500 * r455502;
double r455504 = r455498 / r455503;
return r455504;
}
double f(double x, double y) {
double r455505 = x;
double r455506 = y;
double r455507 = r455505 + r455506;
double r455508 = r455505 / r455507;
double r455509 = 1.0;
double r455510 = r455507 + r455509;
double r455511 = r455506 / r455510;
double r455512 = r455508 * r455511;
double r455513 = r455512 / r455507;
return r455513;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.2
rmApplied times-frac7.7
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2020027 +o rules:numerics
(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))))