\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}}{x + y}double f(double x, double y) {
double r157348739 = x;
double r157348740 = y;
double r157348741 = r157348739 * r157348740;
double r157348742 = r157348739 + r157348740;
double r157348743 = r157348742 * r157348742;
double r157348744 = 1.0;
double r157348745 = r157348742 + r157348744;
double r157348746 = r157348743 * r157348745;
double r157348747 = r157348741 / r157348746;
return r157348747;
}
double f(double x, double y) {
double r157348748 = x;
double r157348749 = y;
double r157348750 = r157348748 + r157348749;
double r157348751 = r157348748 / r157348750;
double r157348752 = 1.0;
double r157348753 = r157348750 + r157348752;
double r157348754 = r157348749 / r157348753;
double r157348755 = r157348754 / r157348750;
double r157348756 = r157348751 * r157348755;
return r157348756;
}




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.5
rmApplied associate-/r*0.1
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019173
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))