\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 r453728 = x;
double r453729 = y;
double r453730 = r453728 * r453729;
double r453731 = r453728 + r453729;
double r453732 = r453731 * r453731;
double r453733 = 1.0;
double r453734 = r453731 + r453733;
double r453735 = r453732 * r453734;
double r453736 = r453730 / r453735;
return r453736;
}
double f(double x, double y) {
double r453737 = x;
double r453738 = y;
double r453739 = r453737 + r453738;
double r453740 = r453737 / r453739;
double r453741 = r453740 / r453739;
double r453742 = 1.0;
double r453743 = r453739 + r453742;
double r453744 = r453738 / r453743;
double r453745 = r453741 * r453744;
return r453745;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 20.0
rmApplied times-frac7.8
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020064 +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))))