\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|}(FPCore (a b) :precision binary64 (sqrt (fabs (/ (- (* a a) (* b b)) (* a a)))))
(FPCore (a b) :precision binary64 (sqrt (fabs (- 1.0 (log (exp (pow (/ b a) 2.0)))))))
double code(double a, double b) {
return sqrt(fabs(((a * a) - (b * b)) / (a * a)));
}
double code(double a, double b) {
return sqrt(fabs(1.0 - log(exp(pow((b / a), 2.0)))));
}



Bits error versus a



Bits error versus b
Results
Initial program 14.3
Simplified14.3
rmApplied add-log-exp_binary6414.3
Simplified0.0
Final simplification0.0
herbie shell --seed 2020219
(FPCore (a b)
:name "Eccentricity of an ellipse"
:precision binary64
:pre (<= 0.0 b a 1.0)
(sqrt (fabs (/ (- (* a a) (* b b)) (* a a)))))