\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{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r427016 = x;
double r427017 = y;
double r427018 = r427016 * r427017;
double r427019 = r427016 + r427017;
double r427020 = r427019 * r427019;
double r427021 = 1.0;
double r427022 = r427019 + r427021;
double r427023 = r427020 * r427022;
double r427024 = r427018 / r427023;
return r427024;
}
double f(double x, double y) {
double r427025 = x;
double r427026 = y;
double r427027 = r427025 + r427026;
double r427028 = r427025 / r427027;
double r427029 = 1.0;
double r427030 = r427027 + r427029;
double r427031 = r427026 / r427030;
double r427032 = r427028 * r427031;
double r427033 = r427032 / r427027;
return r427033;
}




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.0
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2020089 +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))))