\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{x}{y + x}}{y + x} \cdot \frac{1}{\frac{\left(y + x\right) + 1}{y}}double f(double x, double y) {
double r16304851 = x;
double r16304852 = y;
double r16304853 = r16304851 * r16304852;
double r16304854 = r16304851 + r16304852;
double r16304855 = r16304854 * r16304854;
double r16304856 = 1.0;
double r16304857 = r16304854 + r16304856;
double r16304858 = r16304855 * r16304857;
double r16304859 = r16304853 / r16304858;
return r16304859;
}
double f(double x, double y) {
double r16304860 = x;
double r16304861 = y;
double r16304862 = r16304861 + r16304860;
double r16304863 = r16304860 / r16304862;
double r16304864 = r16304863 / r16304862;
double r16304865 = 1.0;
double r16304866 = 1.0;
double r16304867 = r16304862 + r16304866;
double r16304868 = r16304867 / r16304861;
double r16304869 = r16304865 / r16304868;
double r16304870 = r16304864 * r16304869;
return r16304870;
}




Bits error versus x




Bits error versus y
Results
| Original | 19.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 19.5
rmApplied times-frac8.1
rmApplied associate-/r*0.2
rmApplied clear-num0.2
Final simplification0.2
herbie shell --seed 2019168 +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))))