\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{y}{\left(x + y\right) + 1}double f(double x, double y) {
double r438223 = x;
double r438224 = y;
double r438225 = r438223 * r438224;
double r438226 = r438223 + r438224;
double r438227 = r438226 * r438226;
double r438228 = 1.0;
double r438229 = r438226 + r438228;
double r438230 = r438227 * r438229;
double r438231 = r438225 / r438230;
return r438231;
}
double f(double x, double y) {
double r438232 = x;
double r438233 = y;
double r438234 = r438232 + r438233;
double r438235 = r438232 / r438234;
double r438236 = r438235 / r438234;
double r438237 = 1.0;
double r438238 = r438234 + r438237;
double r438239 = r438233 / r438238;
double r438240 = r438236 * r438239;
return r438240;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.5 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 19.5
rmApplied times-frac7.8
rmApplied associate-/r*0.2
Final simplification0.2
herbie shell --seed 2020045 +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))))