\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{1}{\frac{x + y}{\frac{x}{x + y}}} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r536976 = x;
double r536977 = y;
double r536978 = r536976 * r536977;
double r536979 = r536976 + r536977;
double r536980 = r536979 * r536979;
double r536981 = 1.0;
double r536982 = r536979 + r536981;
double r536983 = r536980 * r536982;
double r536984 = r536978 / r536983;
return r536984;
}
double f(double x, double y) {
double r536985 = 1.0;
double r536986 = x;
double r536987 = y;
double r536988 = r536986 + r536987;
double r536989 = r536986 / r536988;
double r536990 = r536988 / r536989;
double r536991 = r536985 / r536990;
double r536992 = 1.0;
double r536993 = r536988 + r536992;
double r536994 = r536987 / r536993;
double r536995 = r536991 * r536994;
return r536995;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.5 |
Initial program 19.7
rmApplied times-frac7.5
rmApplied associate-/r*0.2
rmApplied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Applied associate-/l*0.5
Final simplification0.5
herbie shell --seed 2020001
(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))))