\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}}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r284639 = x;
double r284640 = y;
double r284641 = r284639 * r284640;
double r284642 = r284639 + r284640;
double r284643 = r284642 * r284642;
double r284644 = 1.0;
double r284645 = r284642 + r284644;
double r284646 = r284643 * r284645;
double r284647 = r284641 / r284646;
return r284647;
}
double f(double x, double y) {
double r284648 = x;
double r284649 = y;
double r284650 = r284648 + r284649;
double r284651 = r284648 / r284650;
double r284652 = r284651 / r284650;
double r284653 = 1.0;
double r284654 = r284650 + r284653;
double r284655 = r284649 / r284654;
double r284656 = r284652 * r284655;
return r284656;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.8
rmApplied times-frac8.1
rmApplied associate-/r*0.1
Final simplification0.1
herbie shell --seed 2019322 +o rules:numerics
(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))))