finding out the precision of floats
Robert Kern
robert.kern at gmail.com
Sun Feb 25 20:33:55 EST 2007
Dennis Lee Bieber wrote:
> On 25 Feb 2007 05:31:11 -0800, "John Machin" <sjmachin at lexicon.net>
> declaimed the following in comp.lang.python:
>
>> Evidently not; here's some documentation we both need(ed) to read:
>>
>> http://docs.python.org/tut/node16.html
>> """
>> Almost all machines today (November 2000) use IEEE-754 floating point
>> arithmetic, and almost all platforms map Python floats to IEEE-754
>> "double precision".
>> """
>> I'm very curious to know what the exceptions were in November 2000 and
>> if they still exist. There is also the question of how much it matters
>
> Maybe a few old Vaxes/Alphas running OpenVMS... Those machines had
> something like four or five different floating point representations (F,
> D, G, and H, that I recall -- single, double, double with extended
> exponent range, and quad)
I actually used Python on an Alpha running OpenVMS a few years ago. IIRC, the
interpreter was built with IEEE floating point types rather than the other types.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-list
mailing list