\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 r433833 = x;
double r433834 = y;
double r433835 = r433833 * r433834;
double r433836 = r433833 + r433834;
double r433837 = r433836 * r433836;
double r433838 = 1.0;
double r433839 = r433836 + r433838;
double r433840 = r433837 * r433839;
double r433841 = r433835 / r433840;
return r433841;
}
double f(double x, double y) {
double r433842 = x;
double r433843 = y;
double r433844 = r433842 + r433843;
double r433845 = r433842 / r433844;
double r433846 = r433845 / r433844;
double r433847 = 1.0;
double r433848 = r433844 + r433847;
double r433849 = r433843 / r433848;
double r433850 = r433846 * r433849;
return r433850;
}




Bits error versus x




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