\sqrt{\left|\frac{a \cdot a - b \cdot b}{a \cdot a}\right|}\sqrt{\left|1 - \frac{b}{a} \cdot \frac{b}{a}\right|}(FPCore (a b) :precision binary64 (sqrt (fabs (/ (- (* a a) (* b b)) (* a a)))))
(FPCore (a b) :precision binary64 (sqrt (fabs (- 1.0 (* (/ b a) (/ b a))))))
double code(double a, double b) {
return ((double) sqrt(((double) fabs((((double) (((double) (a * a)) - ((double) (b * b)))) / ((double) (a * a)))))));
}
double code(double a, double b) {
return ((double) sqrt(((double) fabs(((double) (1.0 - ((double) ((b / a) * (b / a)))))))));
}



Bits error versus a



Bits error versus b
Results
Initial program Error: 14.1 bits
rmApplied difference-of-squaresError: 14.1 bits
Applied associate-/l*Error: 14.7 bits
SimplifiedError: 0.0 bits
Taylor expanded around 0 Error: 14.1 bits
SimplifiedError: 0.0 bits
Final simplificationError: 0.0 bits
herbie shell --seed 2020205
(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)))))