pricision of string.atof?

Elvis Chen chene at cs.queensu.ca
Tue May 7 17:22:05 EDT 2002


On Tue, 7 May 2002, Fernando [ISO-8859-1] Pérez wrote:
> It's simply that repr() gives a more faithful representation of the internal
> form of a value while str() does some rounding for visual convenience. And
> since not _all_ real numbers can be represented via 32 bit floats (2^32 <<
> infinity), some values by necessity have an approximate representation.

thx.  This is the exact info I'm looking for.  I'm aware how numbers are
represented in a computer (hardware level), I just don't know how python
does it internally (being a python newbie).

thanks to all who replied.

ECC




More information about the Python-list mailing list