this is a classical problem, but I need help to pinpoint what I am missing.
Problem: In MATLAB
(exp(1) + 10^12) - 10^12
gives you a double which equal to e, up to 5 correct digits. But I thought it would be 4.
One has exp(1) + 10^12 = 1.000000000002718e+12, where 1.000000000002718 contains 16 digits, the precision we are working at. All that is left of e is 2.718, but (exp(1) + 10^12) - 10^12 = 2.7182 (I have left out the digits following the last decimal 2), meaning I have one more digit saved.
Question: Where or how is the extra digit stored? I know that the last the 53 bit for unsigned 64 bit IEEE is used for rounding, is it related to my question?