\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}{y + x} \cdot \frac{\frac{y}{\left(y + x\right) + 1}}{y + x}double f(double x, double y) {
double r22877171 = x;
double r22877172 = y;
double r22877173 = r22877171 * r22877172;
double r22877174 = r22877171 + r22877172;
double r22877175 = r22877174 * r22877174;
double r22877176 = 1.0;
double r22877177 = r22877174 + r22877176;
double r22877178 = r22877175 * r22877177;
double r22877179 = r22877173 / r22877178;
return r22877179;
}
double f(double x, double y) {
double r22877180 = x;
double r22877181 = y;
double r22877182 = r22877181 + r22877180;
double r22877183 = r22877180 / r22877182;
double r22877184 = 1.0;
double r22877185 = r22877182 + r22877184;
double r22877186 = r22877181 / r22877185;
double r22877187 = r22877186 / r22877182;
double r22877188 = r22877183 * r22877187;
return r22877188;
}




Bits error versus x




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