\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1.0\right)}\frac{\frac{y}{y + \left(x + 1.0\right)}}{y + x} \cdot \frac{x}{y + x}double f(double x, double y) {
double r19777406 = x;
double r19777407 = y;
double r19777408 = r19777406 * r19777407;
double r19777409 = r19777406 + r19777407;
double r19777410 = r19777409 * r19777409;
double r19777411 = 1.0;
double r19777412 = r19777409 + r19777411;
double r19777413 = r19777410 * r19777412;
double r19777414 = r19777408 / r19777413;
return r19777414;
}
double f(double x, double y) {
double r19777415 = y;
double r19777416 = x;
double r19777417 = 1.0;
double r19777418 = r19777416 + r19777417;
double r19777419 = r19777415 + r19777418;
double r19777420 = r19777415 / r19777419;
double r19777421 = r19777415 + r19777416;
double r19777422 = r19777420 / r19777421;
double r19777423 = r19777416 / r19777421;
double r19777424 = r19777422 * r19777423;
return r19777424;
}




Bits error versus x




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