\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{\frac{y}{y + \left(x + 1.0\right)}}{y + x} \cdot \frac{x}{y + x}double f(double x, double y) {
double r19169493 = x;
double r19169494 = y;
double r19169495 = r19169493 * r19169494;
double r19169496 = r19169493 + r19169494;
double r19169497 = r19169496 * r19169496;
double r19169498 = 1.0;
double r19169499 = r19169496 + r19169498;
double r19169500 = r19169497 * r19169499;
double r19169501 = r19169495 / r19169500;
return r19169501;
}
double f(double x, double y) {
double r19169502 = y;
double r19169503 = x;
double r19169504 = 1.0;
double r19169505 = r19169503 + r19169504;
double r19169506 = r19169502 + r19169505;
double r19169507 = r19169502 / r19169506;
double r19169508 = r19169502 + r19169503;
double r19169509 = r19169507 / r19169508;
double r19169510 = r19169503 / r19169508;
double r19169511 = r19169509 * r19169510;
return r19169511;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.7
rmApplied times-frac8.1
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019162 +o rules:numerics
(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))))