\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{\frac{1}{\left(x + y\right) + 1}}{\frac{1}{y}}double f(double x, double y) {
double r389742 = x;
double r389743 = y;
double r389744 = r389742 * r389743;
double r389745 = r389742 + r389743;
double r389746 = r389745 * r389745;
double r389747 = 1.0;
double r389748 = r389745 + r389747;
double r389749 = r389746 * r389748;
double r389750 = r389744 / r389749;
return r389750;
}
double f(double x, double y) {
double r389751 = x;
double r389752 = y;
double r389753 = r389751 + r389752;
double r389754 = r389751 / r389753;
double r389755 = r389754 / r389753;
double r389756 = 1.0;
double r389757 = 1.0;
double r389758 = r389753 + r389757;
double r389759 = r389756 / r389758;
double r389760 = r389756 / r389752;
double r389761 = r389759 / r389760;
double r389762 = r389755 * r389761;
return r389762;
}




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.3
rmApplied associate-/r*0.2
rmApplied clear-num0.2
rmApplied div-inv0.2
Applied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020056
(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))))