\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} \cdot y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r268630 = x;
double r268631 = y;
double r268632 = r268630 * r268631;
double r268633 = r268630 + r268631;
double r268634 = r268633 * r268633;
double r268635 = 1.0;
double r268636 = r268633 + r268635;
double r268637 = r268634 * r268636;
double r268638 = r268632 / r268637;
return r268638;
}
double f(double x, double y) {
double r268639 = x;
double r268640 = y;
double r268641 = r268639 + r268640;
double r268642 = r268639 / r268641;
double r268643 = r268642 * r268640;
double r268644 = 1.0;
double r268645 = r268641 + r268644;
double r268646 = r268643 / r268645;
double r268647 = r268646 / r268641;
return r268647;
}




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
rmApplied associate-*r/0.1
Final simplification0.1
herbie shell --seed 2019305
(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))))