\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} \cdot y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r415743 = x;
double r415744 = y;
double r415745 = r415743 * r415744;
double r415746 = r415743 + r415744;
double r415747 = r415746 * r415746;
double r415748 = 1.0;
double r415749 = r415746 + r415748;
double r415750 = r415747 * r415749;
double r415751 = r415745 / r415750;
return r415751;
}
double f(double x, double y) {
double r415752 = x;
double r415753 = y;
double r415754 = r415752 + r415753;
double r415755 = r415752 / r415754;
double r415756 = r415755 * r415753;
double r415757 = 1.0;
double r415758 = r415754 + r415757;
double r415759 = r415756 / r415758;
double r415760 = r415759 / r415754;
return r415760;
}




Bits error versus x




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