\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1.0\right)}\frac{\left(\frac{x}{y + x} \cdot \frac{1}{y + x}\right) \cdot y}{1.0 + \left(y + x\right)}double f(double x, double y) {
double r24084339 = x;
double r24084340 = y;
double r24084341 = r24084339 * r24084340;
double r24084342 = r24084339 + r24084340;
double r24084343 = r24084342 * r24084342;
double r24084344 = 1.0;
double r24084345 = r24084342 + r24084344;
double r24084346 = r24084343 * r24084345;
double r24084347 = r24084341 / r24084346;
return r24084347;
}
double f(double x, double y) {
double r24084348 = x;
double r24084349 = y;
double r24084350 = r24084349 + r24084348;
double r24084351 = r24084348 / r24084350;
double r24084352 = 1.0;
double r24084353 = r24084352 / r24084350;
double r24084354 = r24084351 * r24084353;
double r24084355 = r24084354 * r24084349;
double r24084356 = 1.0;
double r24084357 = r24084356 + r24084350;
double r24084358 = r24084355 / r24084357;
return r24084358;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.3 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.3
rmApplied times-frac7.6
rmApplied associate-/r*0.2
rmApplied associate-*r/0.1
rmApplied div-inv0.2
Final simplification0.2
herbie shell --seed 2019163
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))