\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{x}{y + x} \cdot \frac{y}{\left(y + x\right) + 1.0}}{y + x}double f(double x, double y) {
double r16227388 = x;
double r16227389 = y;
double r16227390 = r16227388 * r16227389;
double r16227391 = r16227388 + r16227389;
double r16227392 = r16227391 * r16227391;
double r16227393 = 1.0;
double r16227394 = r16227391 + r16227393;
double r16227395 = r16227392 * r16227394;
double r16227396 = r16227390 / r16227395;
return r16227396;
}
double f(double x, double y) {
double r16227397 = x;
double r16227398 = y;
double r16227399 = r16227398 + r16227397;
double r16227400 = r16227397 / r16227399;
double r16227401 = 1.0;
double r16227402 = r16227399 + r16227401;
double r16227403 = r16227398 / r16227402;
double r16227404 = r16227400 * r16227403;
double r16227405 = r16227404 / r16227399;
return r16227405;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.4
rmApplied times-frac7.6
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
Final simplification0.1
herbie shell --seed 2019164 +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))))