\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{x \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}}{x + y}double f(double x, double y) {
double r359250 = x;
double r359251 = y;
double r359252 = r359250 * r359251;
double r359253 = r359250 + r359251;
double r359254 = r359253 * r359253;
double r359255 = 1.0;
double r359256 = r359253 + r359255;
double r359257 = r359254 * r359256;
double r359258 = r359252 / r359257;
return r359258;
}
double f(double x, double y) {
double r359259 = x;
double r359260 = y;
double r359261 = r359259 + r359260;
double r359262 = 1.0;
double r359263 = r359261 + r359262;
double r359264 = r359260 / r359263;
double r359265 = r359264 / r359261;
double r359266 = r359259 * r359265;
double r359267 = r359266 / r359261;
return r359267;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.9 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.9
rmApplied times-frac8.1
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019199 +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))))