\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\frac{y}{\left(x + y\right) + 1} \cdot \frac{1}{\frac{x + y}{\frac{x}{x + y}}}double f(double x, double y) {
double r16770189 = x;
double r16770190 = y;
double r16770191 = r16770189 * r16770190;
double r16770192 = r16770189 + r16770190;
double r16770193 = r16770192 * r16770192;
double r16770194 = 1.0;
double r16770195 = r16770192 + r16770194;
double r16770196 = r16770193 * r16770195;
double r16770197 = r16770191 / r16770196;
return r16770197;
}
double f(double x, double y) {
double r16770198 = y;
double r16770199 = x;
double r16770200 = r16770199 + r16770198;
double r16770201 = 1.0;
double r16770202 = r16770200 + r16770201;
double r16770203 = r16770198 / r16770202;
double r16770204 = 1.0;
double r16770205 = r16770199 / r16770200;
double r16770206 = r16770200 / r16770205;
double r16770207 = r16770204 / r16770206;
double r16770208 = r16770203 * r16770207;
return r16770208;
}




Bits error versus x




Bits error versus y
Results
| Original | 20.0 |
|---|---|
| Target | 0.1 |
| Herbie | 0.5 |
Initial program 20.0
rmApplied times-frac8.0
rmApplied associate-/r*0.2
rmApplied clear-num0.5
Final simplification0.5
herbie shell --seed 2019179 +o rules:numerics
(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))))