\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{\frac{y}{x + y} \cdot x}{x + \left(1.0 + y\right)}}{x + y}double f(double x, double y) {
double r8931123 = x;
double r8931124 = y;
double r8931125 = r8931123 * r8931124;
double r8931126 = r8931123 + r8931124;
double r8931127 = r8931126 * r8931126;
double r8931128 = 1.0;
double r8931129 = r8931126 + r8931128;
double r8931130 = r8931127 * r8931129;
double r8931131 = r8931125 / r8931130;
return r8931131;
}
double f(double x, double y) {
double r8931132 = y;
double r8931133 = x;
double r8931134 = r8931133 + r8931132;
double r8931135 = r8931132 / r8931134;
double r8931136 = r8931135 * r8931133;
double r8931137 = 1.0;
double r8931138 = r8931137 + r8931132;
double r8931139 = r8931133 + r8931138;
double r8931140 = r8931136 / r8931139;
double r8931141 = r8931140 / r8931134;
return r8931141;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.4 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 19.4
rmApplied times-frac7.8
rmApplied *-un-lft-identity7.8
Applied times-frac0.2
Applied associate-*l*0.2
rmApplied div-inv0.2
Applied associate-*r*0.2
rmApplied associate-*l/15.4
Applied associate-*l/15.4
Applied associate-*r/15.4
Simplified0.1
Final simplification0.1
herbie shell --seed 2019156
(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))))