\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{\frac{x}{x + y}}{x + y} \cdot y}{\left(x + y\right) + 1}double f(double x, double y) {
double r2294 = x;
double r2295 = y;
double r2296 = r2294 * r2295;
double r2297 = r2294 + r2295;
double r2298 = r2297 * r2297;
double r2299 = 1.0;
double r2300 = r2297 + r2299;
double r2301 = r2298 * r2300;
double r2302 = r2296 / r2301;
return r2302;
}
double f(double x, double y) {
double r2303 = x;
double r2304 = y;
double r2305 = r2303 + r2304;
double r2306 = r2303 / r2305;
double r2307 = r2306 / r2305;
double r2308 = r2307 * r2304;
double r2309 = 1.0;
double r2310 = r2305 + r2309;
double r2311 = r2308 / r2310;
return r2311;
}




Bits error versus x




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