\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 \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}}{x + y}double f(double x, double y) {
double r475778 = x;
double r475779 = y;
double r475780 = r475778 * r475779;
double r475781 = r475778 + r475779;
double r475782 = r475781 * r475781;
double r475783 = 1.0;
double r475784 = r475781 + r475783;
double r475785 = r475782 * r475784;
double r475786 = r475780 / r475785;
return r475786;
}
double f(double x, double y) {
double r475787 = x;
double r475788 = y;
double r475789 = r475787 + r475788;
double r475790 = 1.0;
double r475791 = r475789 + r475790;
double r475792 = r475788 / r475791;
double r475793 = r475792 / r475789;
double r475794 = r475787 * r475793;
double r475795 = r475794 / r475789;
return r475795;
}




Bits error versus x




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