\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{\frac{x}{x + y}}{x + y} \cdot y}{\left(x + y\right) + 1}double f(double x, double y) {
double r357807 = x;
double r357808 = y;
double r357809 = r357807 * r357808;
double r357810 = r357807 + r357808;
double r357811 = r357810 * r357810;
double r357812 = 1.0;
double r357813 = r357810 + r357812;
double r357814 = r357811 * r357813;
double r357815 = r357809 / r357814;
return r357815;
}
double f(double x, double y) {
double r357816 = x;
double r357817 = y;
double r357818 = r357816 + r357817;
double r357819 = r357816 / r357818;
double r357820 = r357819 / r357818;
double r357821 = r357820 * r357817;
double r357822 = 1.0;
double r357823 = r357818 + r357822;
double r357824 = r357821 / r357823;
return r357824;
}




Bits error versus x




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