\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}{\frac{x + y}{x}}}{x + y}}{\left(x + y\right) + 1}double f(double x, double y) {
double r513189 = x;
double r513190 = y;
double r513191 = r513189 * r513190;
double r513192 = r513189 + r513190;
double r513193 = r513192 * r513192;
double r513194 = 1.0;
double r513195 = r513192 + r513194;
double r513196 = r513193 * r513195;
double r513197 = r513191 / r513196;
return r513197;
}
double f(double x, double y) {
double r513198 = y;
double r513199 = x;
double r513200 = r513199 + r513198;
double r513201 = r513200 / r513199;
double r513202 = r513198 / r513201;
double r513203 = r513202 / r513200;
double r513204 = 1.0;
double r513205 = r513200 + r513204;
double r513206 = r513203 / r513205;
return r513206;
}




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-*r/0.2
rmApplied associate-*l/0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020043 +o rules:numerics
(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))))