\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}}{x + y} \cdot \frac{1}{\frac{\left(x + y\right) + 1}{y}}double f(double x, double y) {
double r451184 = x;
double r451185 = y;
double r451186 = r451184 * r451185;
double r451187 = r451184 + r451185;
double r451188 = r451187 * r451187;
double r451189 = 1.0;
double r451190 = r451187 + r451189;
double r451191 = r451188 * r451190;
double r451192 = r451186 / r451191;
return r451192;
}
double f(double x, double y) {
double r451193 = x;
double r451194 = y;
double r451195 = r451193 + r451194;
double r451196 = r451193 / r451195;
double r451197 = r451196 / r451195;
double r451198 = 1.0;
double r451199 = 1.0;
double r451200 = r451195 + r451199;
double r451201 = r451200 / r451194;
double r451202 = r451198 / r451201;
double r451203 = r451197 * r451202;
return r451203;
}




Bits error versus x




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