\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 r410492 = x;
double r410493 = y;
double r410494 = r410492 * r410493;
double r410495 = r410492 + r410493;
double r410496 = r410495 * r410495;
double r410497 = 1.0;
double r410498 = r410495 + r410497;
double r410499 = r410496 * r410498;
double r410500 = r410494 / r410499;
return r410500;
}
double f(double x, double y) {
double r410501 = x;
double r410502 = y;
double r410503 = r410501 + r410502;
double r410504 = r410501 / r410503;
double r410505 = r410504 / r410503;
double r410506 = 1.0;
double r410507 = r410503 + r410506;
double r410508 = r410502 / r410507;
double r410509 = r410505 * r410508;
return r410509;
}




Bits error versus x




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