\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}{x + y} \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}double f(double x, double y) {
double r590048 = x;
double r590049 = y;
double r590050 = r590048 * r590049;
double r590051 = r590048 + r590049;
double r590052 = r590051 * r590051;
double r590053 = 1.0;
double r590054 = r590051 + r590053;
double r590055 = r590052 * r590054;
double r590056 = r590050 / r590055;
return r590056;
}
double f(double x, double y) {
double r590057 = x;
double r590058 = y;
double r590059 = r590057 + r590058;
double r590060 = r590057 / r590059;
double r590061 = 1.0;
double r590062 = r590059 + r590061;
double r590063 = r590058 / r590062;
double r590064 = r590063 / r590059;
double r590065 = r590060 * r590064;
return r590065;
}




Bits error versus x




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