Ben Finney wrote: > "Chris" <[EMAIL PROTECTED]> writes: > > >> Oh, ok that explains it. Is that why my 16-bit calculator gives me >> 0? >> > > Your calculator is probably doing rounding without you asking for it. > Yes. Almost all calculators have 1 or 2 guard digits. These are extra digits beyond what is shown on the display. All calculations are done at that higher precision and the result are rounded to the precision of the display for the user's benefit.
This satisfies users who know nothing about the numerical imprecision of finite digit arithmetic. Python makes the opposite assumption that we are are adults here and can handle the full knowledge, slight imprecision and all. Dr. Gary Herron > Python refuses to guess what you want, and gives you the information > available. > > -- http://mail.python.org/mailman/listinfo/python-list