\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{y}{\left(x + y\right) + 1} \cdot \frac{x}{x + y}}{x + y}double f(double x, double y) {
double r465840 = x;
double r465841 = y;
double r465842 = r465840 * r465841;
double r465843 = r465840 + r465841;
double r465844 = r465843 * r465843;
double r465845 = 1.0;
double r465846 = r465843 + r465845;
double r465847 = r465844 * r465846;
double r465848 = r465842 / r465847;
return r465848;
}
double f(double x, double y) {
double r465849 = y;
double r465850 = x;
double r465851 = r465850 + r465849;
double r465852 = 1.0;
double r465853 = r465851 + r465852;
double r465854 = r465849 / r465853;
double r465855 = r465850 / r465851;
double r465856 = r465854 * r465855;
double r465857 = r465856 / r465851;
return r465857;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.6
rmApplied times-frac7.6
rmApplied *-un-lft-identity7.6
Applied times-frac0.2
rmApplied associate-*r/0.2
Applied associate-*l/0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020057 +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))))