\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{y \cdot \frac{\frac{x}{y + x}}{y + x}}{\left(y + x\right) + 1}double f(double x, double y) {
double r16278517 = x;
double r16278518 = y;
double r16278519 = r16278517 * r16278518;
double r16278520 = r16278517 + r16278518;
double r16278521 = r16278520 * r16278520;
double r16278522 = 1.0;
double r16278523 = r16278520 + r16278522;
double r16278524 = r16278521 * r16278523;
double r16278525 = r16278519 / r16278524;
return r16278525;
}
double f(double x, double y) {
double r16278526 = y;
double r16278527 = x;
double r16278528 = r16278526 + r16278527;
double r16278529 = r16278527 / r16278528;
double r16278530 = r16278529 / r16278528;
double r16278531 = r16278526 * r16278530;
double r16278532 = 1.0;
double r16278533 = r16278528 + r16278532;
double r16278534 = r16278531 / r16278533;
return r16278534;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 20.2
rmApplied times-frac7.8
rmApplied associate-/r*0.2
rmApplied associate-*r/0.2
Final simplification0.2
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))