\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{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r332792 = x;
double r332793 = y;
double r332794 = r332792 * r332793;
double r332795 = r332792 + r332793;
double r332796 = r332795 * r332795;
double r332797 = 1.0;
double r332798 = r332795 + r332797;
double r332799 = r332796 * r332798;
double r332800 = r332794 / r332799;
return r332800;
}
double f(double x, double y) {
double r332801 = x;
double r332802 = y;
double r332803 = r332801 + r332802;
double r332804 = r332801 / r332803;
double r332805 = 1.0;
double r332806 = r332803 + r332805;
double r332807 = r332802 / r332806;
double r332808 = r332804 * r332807;
double r332809 = r332808 / r332803;
return r332809;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.2
rmApplied times-frac7.6
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019208
(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))))