\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{1}{\left(x + y\right) + 1} \cdot \frac{\left(\frac{y}{x + y} \cdot \frac{x}{x - y}\right) \cdot \left(x - y\right)}{x + y}double f(double x, double y) {
double r341631 = x;
double r341632 = y;
double r341633 = r341631 * r341632;
double r341634 = r341631 + r341632;
double r341635 = r341634 * r341634;
double r341636 = 1.0;
double r341637 = r341634 + r341636;
double r341638 = r341635 * r341637;
double r341639 = r341633 / r341638;
return r341639;
}
double f(double x, double y) {
double r341640 = 1.0;
double r341641 = x;
double r341642 = y;
double r341643 = r341641 + r341642;
double r341644 = 1.0;
double r341645 = r341643 + r341644;
double r341646 = r341640 / r341645;
double r341647 = r341642 / r341643;
double r341648 = r341641 - r341642;
double r341649 = r341641 / r341648;
double r341650 = r341647 * r341649;
double r341651 = r341650 * r341648;
double r341652 = r341651 / r341643;
double r341653 = r341646 * r341652;
return r341653;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 20.4
rmApplied times-frac8.1
Simplified8.1
Simplified8.1
rmApplied div-inv8.1
Applied associate-*r*8.1
Simplified0.1
rmApplied flip-+10.2
Applied associate-/r/10.2
Applied associate-*r*10.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019195
(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))))