\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1.0\right)}\frac{\frac{x}{y + x}}{y + x} \cdot \frac{1}{\frac{\left(y + x\right) + 1.0}{y}}double f(double x, double y) {
double r20274734 = x;
double r20274735 = y;
double r20274736 = r20274734 * r20274735;
double r20274737 = r20274734 + r20274735;
double r20274738 = r20274737 * r20274737;
double r20274739 = 1.0;
double r20274740 = r20274737 + r20274739;
double r20274741 = r20274738 * r20274740;
double r20274742 = r20274736 / r20274741;
return r20274742;
}
double f(double x, double y) {
double r20274743 = x;
double r20274744 = y;
double r20274745 = r20274744 + r20274743;
double r20274746 = r20274743 / r20274745;
double r20274747 = r20274746 / r20274745;
double r20274748 = 1.0;
double r20274749 = 1.0;
double r20274750 = r20274745 + r20274749;
double r20274751 = r20274750 / r20274744;
double r20274752 = r20274748 / r20274751;
double r20274753 = r20274747 * r20274752;
return r20274753;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.2
rmApplied times-frac7.7
rmApplied associate-/r*0.2
rmApplied clear-num0.2
Final simplification0.2
herbie shell --seed 2019158 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))