\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{1}{\frac{\left(x + y\right) + 1}{y}}}{x + y}double f(double x, double y) {
double r248931 = x;
double r248932 = y;
double r248933 = r248931 * r248932;
double r248934 = r248931 + r248932;
double r248935 = r248934 * r248934;
double r248936 = 1.0;
double r248937 = r248934 + r248936;
double r248938 = r248935 * r248937;
double r248939 = r248933 / r248938;
return r248939;
}
double f(double x, double y) {
double r248940 = x;
double r248941 = y;
double r248942 = r248940 + r248941;
double r248943 = r248940 / r248942;
double r248944 = 1.0;
double r248945 = 1.0;
double r248946 = r248942 + r248945;
double r248947 = r248946 / r248941;
double r248948 = r248944 / r248947;
double r248949 = r248943 * r248948;
double r248950 = r248949 / r248942;
return r248950;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.8
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied clear-num0.2
Final simplification0.2
herbie shell --seed 2019303 +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))))