\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 r438677 = x;
double r438678 = y;
double r438679 = r438677 * r438678;
double r438680 = r438677 + r438678;
double r438681 = r438680 * r438680;
double r438682 = 1.0;
double r438683 = r438680 + r438682;
double r438684 = r438681 * r438683;
double r438685 = r438679 / r438684;
return r438685;
}
double f(double x, double y) {
double r438686 = x;
double r438687 = y;
double r438688 = r438686 + r438687;
double r438689 = r438686 / r438688;
double r438690 = r438689 / r438688;
double r438691 = 1.0;
double r438692 = r438688 + r438691;
double r438693 = r438687 / r438692;
double r438694 = r438690 * r438693;
return r438694;
}




Bits error versus x




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