\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 r19049392 = x;
double r19049393 = y;
double r19049394 = r19049392 * r19049393;
double r19049395 = r19049392 + r19049393;
double r19049396 = r19049395 * r19049395;
double r19049397 = 1.0;
double r19049398 = r19049395 + r19049397;
double r19049399 = r19049396 * r19049398;
double r19049400 = r19049394 / r19049399;
return r19049400;
}
double f(double x, double y) {
double r19049401 = x;
double r19049402 = y;
double r19049403 = r19049402 + r19049401;
double r19049404 = r19049401 / r19049403;
double r19049405 = 1.0;
double r19049406 = r19049405 / r19049403;
double r19049407 = r19049404 * r19049406;
double r19049408 = r19049407 * r19049402;
double r19049409 = 1.0;
double r19049410 = r19049409 + r19049403;
double r19049411 = r19049408 / r19049410;
return r19049411;
}




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))))