\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 r94968329 = x;
double r94968330 = y;
double r94968331 = r94968329 * r94968330;
double r94968332 = r94968329 + r94968330;
double r94968333 = r94968332 * r94968332;
double r94968334 = 1.0;
double r94968335 = r94968332 + r94968334;
double r94968336 = r94968333 * r94968335;
double r94968337 = r94968331 / r94968336;
return r94968337;
}
double f(double x, double y) {
double r94968338 = x;
double r94968339 = y;
double r94968340 = r94968338 + r94968339;
double r94968341 = r94968338 / r94968340;
double r94968342 = 1.0;
double r94968343 = r94968340 + r94968342;
double r94968344 = r94968339 / r94968343;
double r94968345 = r94968341 * r94968344;
double r94968346 = r94968345 / r94968340;
return r94968346;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.6 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.6
rmApplied times-frac7.5
rmApplied associate-/r*0.1
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
rmApplied associate-*r/0.1
Final simplification0.1
herbie shell --seed 2019173 +o rules:numerics
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))