\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{y \cdot x}{x + y}}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r338331 = x;
double r338332 = y;
double r338333 = r338331 * r338332;
double r338334 = r338331 + r338332;
double r338335 = r338334 * r338334;
double r338336 = 1.0;
double r338337 = r338334 + r338336;
double r338338 = r338335 * r338337;
double r338339 = r338333 / r338338;
return r338339;
}
double f(double x, double y) {
double r338340 = y;
double r338341 = x;
double r338342 = r338340 * r338341;
double r338343 = r338341 + r338340;
double r338344 = r338342 / r338343;
double r338345 = 1.0;
double r338346 = r338343 + r338345;
double r338347 = r338344 / r338346;
double r338348 = r338347 / r338343;
return r338348;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 15.3 |
Initial program 19.6
rmApplied times-frac7.9
rmApplied associate-/r*0.2
rmApplied associate-*r/0.2
rmApplied clear-num0.2
Final simplification15.3
herbie shell --seed 2019308
(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))))