\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 \cdot \frac{\frac{y}{\left(x + y\right) + 1}}{x + y}}{x + y}double f(double x, double y) {
double r371270 = x;
double r371271 = y;
double r371272 = r371270 * r371271;
double r371273 = r371270 + r371271;
double r371274 = r371273 * r371273;
double r371275 = 1.0;
double r371276 = r371273 + r371275;
double r371277 = r371274 * r371276;
double r371278 = r371272 / r371277;
return r371278;
}
double f(double x, double y) {
double r371279 = x;
double r371280 = y;
double r371281 = r371279 + r371280;
double r371282 = 1.0;
double r371283 = r371281 + r371282;
double r371284 = r371280 / r371283;
double r371285 = r371284 / r371281;
double r371286 = r371279 * r371285;
double r371287 = r371286 / r371281;
return r371287;
}




Bits error versus x




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