weird math errors in python 2.1.1

Chris Barker chrishbarker at
Thu Aug 30 00:58:00 CEST 2001

Jeff Shannon wrote:
> There are some decimal numbers that are not precisely
> representable in binary floating point


>(just as there are some binary fp numbers that aren't decimal-representable).

Actually, I don't think that is true, as I learned on this list. I think
anything representable in binary is representable in the same number of
digits or less in decimal. That is the same number of decimal digits and
binary digits, so that's a LOT of digits! (55 for a Python float, I

Christopher Barker,
ChrisHBarker at                 ---           ---           --- ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------

More information about the Python-list mailing list