\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 r256037 = x;
double r256038 = y;
double r256039 = r256037 * r256038;
double r256040 = r256037 + r256038;
double r256041 = r256040 * r256040;
double r256042 = 1.0;
double r256043 = r256040 + r256042;
double r256044 = r256041 * r256043;
double r256045 = r256039 / r256044;
return r256045;
}
double f(double x, double y) {
double r256046 = x;
double r256047 = y;
double r256048 = r256046 + r256047;
double r256049 = r256046 / r256048;
double r256050 = 1.0;
double r256051 = r256048 + r256050;
double r256052 = r256047 / r256051;
double r256053 = r256049 * r256052;
double r256054 = r256053 / r256048;
return r256054;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.6
rmApplied times-frac7.7
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019325 +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))))