\sqrt{\left|\frac{a \cdot a - b \cdot b}{a \cdot a}\right|}\sqrt{\left|1 - \log \left(e^{{\left(\frac{b}{a}\right)}^{2}}\right)\right|}double f(double a, double b) {
double r31873 = a;
double r31874 = r31873 * r31873;
double r31875 = b;
double r31876 = r31875 * r31875;
double r31877 = r31874 - r31876;
double r31878 = r31877 / r31874;
double r31879 = fabs(r31878);
double r31880 = sqrt(r31879);
return r31880;
}
double f(double a, double b) {
double r31881 = 1.0;
double r31882 = b;
double r31883 = a;
double r31884 = r31882 / r31883;
double r31885 = 2.0;
double r31886 = pow(r31884, r31885);
double r31887 = exp(r31886);
double r31888 = log(r31887);
double r31889 = r31881 - r31888;
double r31890 = fabs(r31889);
double r31891 = sqrt(r31890);
return r31891;
}



Bits error versus a



Bits error versus b
Results
Initial program 14.0
Simplified14.0
rmApplied add-exp-log14.0
Applied add-exp-log14.0
Applied prod-exp14.0
Applied add-exp-log14.0
Applied add-exp-log14.0
Applied prod-exp14.0
Applied div-exp0.0
Simplified0.0
rmApplied add-log-exp0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019326
(FPCore (a b)
:name "Eccentricity of an ellipse"
:precision binary64
:pre (<= 0.0 b a 1)
(sqrt (fabs (/ (- (* a a) (* b b)) (* a a)))))