\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{y \cdot \frac{x}{x + y}}{x + y}}{\left(x + y\right) + 1}double f(double x, double y) {
double r317722 = x;
double r317723 = y;
double r317724 = r317722 * r317723;
double r317725 = r317722 + r317723;
double r317726 = r317725 * r317725;
double r317727 = 1.0;
double r317728 = r317725 + r317727;
double r317729 = r317726 * r317728;
double r317730 = r317724 / r317729;
return r317730;
}
double f(double x, double y) {
double r317731 = y;
double r317732 = x;
double r317733 = r317732 + r317731;
double r317734 = r317732 / r317733;
double r317735 = r317731 * r317734;
double r317736 = r317735 / r317733;
double r317737 = 1.0;
double r317738 = r317733 + r317737;
double r317739 = r317736 / r317738;
return r317739;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.5
rmApplied times-frac7.7
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*r*0.2
rmApplied div-inv0.2
Final simplification0.1
herbie shell --seed 2019291
(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))))