\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{y \cdot \frac{x}{x + y}}{x + y}}{\left(x + y\right) + 1}double f(double x, double y) {
double r387551 = x;
double r387552 = y;
double r387553 = r387551 * r387552;
double r387554 = r387551 + r387552;
double r387555 = r387554 * r387554;
double r387556 = 1.0;
double r387557 = r387554 + r387556;
double r387558 = r387555 * r387557;
double r387559 = r387553 / r387558;
return r387559;
}
double f(double x, double y) {
double r387560 = y;
double r387561 = x;
double r387562 = r387561 + r387560;
double r387563 = r387561 / r387562;
double r387564 = r387560 * r387563;
double r387565 = r387564 / r387562;
double r387566 = 1.0;
double r387567 = r387562 + r387566;
double r387568 = r387565 / r387567;
return r387568;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.2 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 20.2
rmApplied times-frac8.3
rmApplied associate-/r*0.2
rmApplied expm1-log1p-u0.2
rmApplied associate-*r/0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2020056 +o rules:numerics
(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))))