\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1.0\right)}\frac{\frac{y}{\left(y + x\right) + 1.0}}{y + x} \cdot \frac{x}{y + x}double f(double x, double y) {
double r18360304 = x;
double r18360305 = y;
double r18360306 = r18360304 * r18360305;
double r18360307 = r18360304 + r18360305;
double r18360308 = r18360307 * r18360307;
double r18360309 = 1.0;
double r18360310 = r18360307 + r18360309;
double r18360311 = r18360308 * r18360310;
double r18360312 = r18360306 / r18360311;
return r18360312;
}
double f(double x, double y) {
double r18360313 = y;
double r18360314 = x;
double r18360315 = r18360313 + r18360314;
double r18360316 = 1.0;
double r18360317 = r18360315 + r18360316;
double r18360318 = r18360313 / r18360317;
double r18360319 = r18360318 / r18360315;
double r18360320 = r18360314 / r18360315;
double r18360321 = r18360319 * r18360320;
return r18360321;
}




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.1
rmApplied associate-/r*0.2
rmApplied div-inv0.2
Applied associate-*l*0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019162
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:herbie-target
(/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))