\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 r289637 = x;
double r289638 = y;
double r289639 = r289637 * r289638;
double r289640 = r289637 + r289638;
double r289641 = r289640 * r289640;
double r289642 = 1.0;
double r289643 = r289640 + r289642;
double r289644 = r289641 * r289643;
double r289645 = r289639 / r289644;
return r289645;
}
double f(double x, double y) {
double r289646 = x;
double r289647 = y;
double r289648 = r289646 + r289647;
double r289649 = r289646 / r289648;
double r289650 = r289649 / r289648;
double r289651 = 1.0;
double r289652 = r289648 + r289651;
double r289653 = r289647 / r289652;
double r289654 = r289650 * r289653;
return r289654;
}




Bits error versus x




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