\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 r51385 = a;
double r51386 = r51385 * r51385;
double r51387 = b;
double r51388 = r51387 * r51387;
double r51389 = r51386 - r51388;
double r51390 = r51389 / r51386;
double r51391 = fabs(r51390);
double r51392 = sqrt(r51391);
return r51392;
}
double f(double a, double b) {
double r51393 = 1.0;
double r51394 = b;
double r51395 = a;
double r51396 = r51394 / r51395;
double r51397 = 2.0;
double r51398 = pow(r51396, r51397);
double r51399 = exp(r51398);
double r51400 = log(r51399);
double r51401 = r51393 - r51400;
double r51402 = fabs(r51401);
double r51403 = sqrt(r51402);
return r51403;
}



Bits error versus a



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