\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} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r437881 = x;
double r437882 = y;
double r437883 = r437881 * r437882;
double r437884 = r437881 + r437882;
double r437885 = r437884 * r437884;
double r437886 = 1.0;
double r437887 = r437884 + r437886;
double r437888 = r437885 * r437887;
double r437889 = r437883 / r437888;
return r437889;
}
double f(double x, double y) {
double r437890 = x;
double r437891 = y;
double r437892 = r437890 + r437891;
double r437893 = r437890 / r437892;
double r437894 = 1.0;
double r437895 = r437892 + r437894;
double r437896 = r437891 / r437895;
double r437897 = r437893 * r437896;
double r437898 = r437897 / r437892;
return r437898;
}




Bits error versus x




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