\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{1}{\frac{x + y}{x}} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r520878 = x;
double r520879 = y;
double r520880 = r520878 * r520879;
double r520881 = r520878 + r520879;
double r520882 = r520881 * r520881;
double r520883 = 1.0;
double r520884 = r520881 + r520883;
double r520885 = r520882 * r520884;
double r520886 = r520880 / r520885;
return r520886;
}
double f(double x, double y) {
double r520887 = 1.0;
double r520888 = x;
double r520889 = y;
double r520890 = r520888 + r520889;
double r520891 = r520890 / r520888;
double r520892 = r520887 / r520891;
double r520893 = 1.0;
double r520894 = r520890 + r520893;
double r520895 = r520889 / r520894;
double r520896 = r520892 * r520895;
double r520897 = r520896 / r520890;
return r520897;
}




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.5
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied clear-num0.1
Final simplification0.1
herbie shell --seed 2019354 +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))))