\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 r390159 = x;
double r390160 = y;
double r390161 = r390159 * r390160;
double r390162 = r390159 + r390160;
double r390163 = r390162 * r390162;
double r390164 = 1.0;
double r390165 = r390162 + r390164;
double r390166 = r390163 * r390165;
double r390167 = r390161 / r390166;
return r390167;
}
double f(double x, double y) {
double r390168 = x;
double r390169 = y;
double r390170 = r390168 + r390169;
double r390171 = r390168 / r390170;
double r390172 = 1.0;
double r390173 = r390170 + r390172;
double r390174 = r390169 / r390173;
double r390175 = r390174 / r390170;
double r390176 = r390171 * r390175;
return r390176;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.7 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.7
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied associate-*l/0.1
rmApplied *-un-lft-identity0.1
Applied times-frac0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020062
(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))))