[Python-Dev] Function Hash: Check it in?

Paul Hughett hughett@mercur.uphs.upenn.edu
2001年1月29日 17:05:22 -0500


tim says:
> Cray's was the only box on earth that set I to 1 in

> INTEGER I
> I = 6.0/3.0

> Fortran doesn't define that the result must be 2. But-- you guessed
> it --neither does Python.

I would _guess_ that the IEEE 754 floating point standard does require
that, but I haven't actually gotten my hands on a copy of the standard
yet. If it doesn't, I may have to stop writing code that depends on
the assumption that floating point computation is exact for exactly
representable integers. If so, then we're reasonably safe; there
aren't many non-IEEE machines left these days.
Un-lurking-ly yours,
Paul Hughett

AltStyle によって変換されたページ (->オリジナル) /