\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 r446673 = x;
double r446674 = y;
double r446675 = r446673 * r446674;
double r446676 = r446673 + r446674;
double r446677 = r446676 * r446676;
double r446678 = 1.0;
double r446679 = r446676 + r446678;
double r446680 = r446677 * r446679;
double r446681 = r446675 / r446680;
return r446681;
}
double f(double x, double y) {
double r446682 = x;
double r446683 = y;
double r446684 = r446682 + r446683;
double r446685 = r446682 / r446684;
double r446686 = 1.0;
double r446687 = r446684 + r446686;
double r446688 = r446683 / r446687;
double r446689 = r446685 * r446688;
double r446690 = r446689 / r446684;
return r446690;
}




Bits error versus x




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