\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x}{x + y} \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{y + x}double f(double x, double y) {
double r530755 = x;
double r530756 = y;
double r530757 = r530755 * r530756;
double r530758 = r530755 + r530756;
double r530759 = r530758 * r530758;
double r530760 = 1.0;
double r530761 = r530758 + r530760;
double r530762 = r530759 * r530761;
double r530763 = r530757 / r530762;
return r530763;
}
double f(double x, double y) {
double r530764 = x;
double r530765 = y;
double r530766 = r530764 + r530765;
double r530767 = r530764 / r530766;
double r530768 = 1.0;
double r530769 = r530766 + r530768;
double r530770 = r530765 / r530769;
double r530771 = r530765 + r530764;
double r530772 = r530770 / r530771;
double r530773 = r530767 * r530772;
return r530773;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.9
rmApplied times-frac7.9
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020042
(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))))