\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x \cdot \frac{\frac{y}{x + y}}{x + y}}{1 + \left(x + y\right)}double f(double x, double y) {
double r367586 = x;
double r367587 = y;
double r367588 = r367586 * r367587;
double r367589 = r367586 + r367587;
double r367590 = r367589 * r367589;
double r367591 = 1.0;
double r367592 = r367589 + r367591;
double r367593 = r367590 * r367592;
double r367594 = r367588 / r367593;
return r367594;
}
double f(double x, double y) {
double r367595 = x;
double r367596 = y;
double r367597 = r367595 + r367596;
double r367598 = r367596 / r367597;
double r367599 = r367598 / r367597;
double r367600 = r367595 * r367599;
double r367601 = 1.0;
double r367602 = r367601 + r367597;
double r367603 = r367600 / r367602;
return r367603;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.8
Simplified19.8
rmApplied times-frac7.8
Simplified7.8
Simplified0.2
rmApplied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Applied associate-*l*0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019196 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))