\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 r537223 = x;
double r537224 = y;
double r537225 = r537223 * r537224;
double r537226 = r537223 + r537224;
double r537227 = r537226 * r537226;
double r537228 = 1.0;
double r537229 = r537226 + r537228;
double r537230 = r537227 * r537229;
double r537231 = r537225 / r537230;
return r537231;
}
double f(double x, double y) {
double r537232 = x;
double r537233 = y;
double r537234 = r537232 + r537233;
double r537235 = r537232 / r537234;
double r537236 = 1.0;
double r537237 = r537234 + r537236;
double r537238 = r537233 / r537237;
double r537239 = r537235 * r537238;
double r537240 = r537239 / r537234;
return r537240;
}




Bits error versus x




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