\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{y}{\left(y + x\right) + 1}}{y + x} \cdot \frac{x}{y + x}double f(double x, double y) {
double r18349316 = x;
double r18349317 = y;
double r18349318 = r18349316 * r18349317;
double r18349319 = r18349316 + r18349317;
double r18349320 = r18349319 * r18349319;
double r18349321 = 1.0;
double r18349322 = r18349319 + r18349321;
double r18349323 = r18349320 * r18349322;
double r18349324 = r18349318 / r18349323;
return r18349324;
}
double f(double x, double y) {
double r18349325 = y;
double r18349326 = x;
double r18349327 = r18349325 + r18349326;
double r18349328 = 1.0;
double r18349329 = r18349327 + r18349328;
double r18349330 = r18349325 / r18349329;
double r18349331 = r18349330 / r18349327;
double r18349332 = r18349326 / r18349327;
double r18349333 = r18349331 * r18349332;
return r18349333;
}




Bits error versus x




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