\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}}{\left(x + y\right) \cdot \frac{\left(x + y\right) + 1}{y}}double f(double x, double y) {
double r327398 = x;
double r327399 = y;
double r327400 = r327398 * r327399;
double r327401 = r327398 + r327399;
double r327402 = r327401 * r327401;
double r327403 = 1.0;
double r327404 = r327401 + r327403;
double r327405 = r327402 * r327404;
double r327406 = r327400 / r327405;
return r327406;
}
double f(double x, double y) {
double r327407 = x;
double r327408 = y;
double r327409 = r327407 + r327408;
double r327410 = r327407 / r327409;
double r327411 = 1.0;
double r327412 = r327409 + r327411;
double r327413 = r327412 / r327408;
double r327414 = r327409 * r327413;
double r327415 = r327410 / r327414;
return r327415;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.4 |
Initial program 19.9
rmApplied times-frac7.8
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
rmApplied clear-num0.2
Final simplification0.4
herbie shell --seed 2019298
(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))))