Double precision variables are default in MATLAB, so the variable e you create is limited by the precision of the double, which is about 16 digits. Even if you enter more digits, the double does not have the precision to accurately represent all these extra digits and round to the nearest number that it can represent.
EDIT: As explained in more detail by Andrew Janke in the answer to this follow-up question I posted, the number you chose for e is just the exact decimal extension of the binary value. In other words, this is a precisely representable value with which a close floating point number will be rounded. However, in this case, nothing more than approximately 16 digits after the decimal point is not considered significant, since it cannot be accurately represented using the double-precision type. Therefore, functions like SPRINTF automatically ignore these small values, instead print zeros.
gnovice Nov 19 '10 at 5:10 2010-11-19 05:10
source share