\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{1}{\frac{\left(x + y\right) + 1}{y}}double f(double x, double y) {
double r408972 = x;
double r408973 = y;
double r408974 = r408972 * r408973;
double r408975 = r408972 + r408973;
double r408976 = r408975 * r408975;
double r408977 = 1.0;
double r408978 = r408975 + r408977;
double r408979 = r408976 * r408978;
double r408980 = r408974 / r408979;
return r408980;
}
double f(double x, double y) {
double r408981 = x;
double r408982 = y;
double r408983 = r408981 + r408982;
double r408984 = r408981 / r408983;
double r408985 = r408984 / r408983;
double r408986 = 1.0;
double r408987 = 1.0;
double r408988 = r408983 + r408987;
double r408989 = r408988 / r408982;
double r408990 = r408986 / r408989;
double r408991 = r408985 * r408990;
return r408991;
}




Bits error versus x




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