\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 r297239 = x;
double r297240 = y;
double r297241 = r297239 * r297240;
double r297242 = r297239 + r297240;
double r297243 = r297242 * r297242;
double r297244 = 1.0;
double r297245 = r297242 + r297244;
double r297246 = r297243 * r297245;
double r297247 = r297241 / r297246;
return r297247;
}
double f(double x, double y) {
double r297248 = x;
double r297249 = y;
double r297250 = r297248 + r297249;
double r297251 = r297248 / r297250;
double r297252 = 1.0;
double r297253 = r297250 + r297252;
double r297254 = r297253 / r297249;
double r297255 = r297250 * r297254;
double r297256 = r297251 / r297255;
return r297256;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.5 |
Initial program 19.7
rmApplied times-frac7.6
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied clear-num0.1
Final simplification0.5
herbie shell --seed 1978988140
(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))))