\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{\frac{x}{x + y}}{x + y} \cdot y}{\left(x + y\right) + 1}double f(double x, double y) {
double r472715 = x;
double r472716 = y;
double r472717 = r472715 * r472716;
double r472718 = r472715 + r472716;
double r472719 = r472718 * r472718;
double r472720 = 1.0;
double r472721 = r472718 + r472720;
double r472722 = r472719 * r472721;
double r472723 = r472717 / r472722;
return r472723;
}
double f(double x, double y) {
double r472724 = x;
double r472725 = y;
double r472726 = r472724 + r472725;
double r472727 = r472724 / r472726;
double r472728 = r472727 / r472726;
double r472729 = r472728 * r472725;
double r472730 = 1.0;
double r472731 = r472726 + r472730;
double r472732 = r472729 / r472731;
return r472732;
}




Bits error versus x




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