NaN again - and IEEE arithmatics

Tim Peters tim_one at email.msn.com
Sat May 13 19:53:58 CEST 2000


[Tim, suggests this way to make a NaN]
> >>>> Inf = 1e300**2
> >>>> NaN = Inf - Inf
> >>>> NaN
> >-1.#IND
> >>>> Inf
> >1.#INF
> >>>>

[Mark C Favas]
> Unfortunately, on a real <0.3 wink> operating system (Tru64 Unix on Compaq
> Alpha) this code fragment produces a core dump:
>
> Python 1.6a2 (#99, May 12 2000, 08:21:33) [C] on osf1V4
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> Copyright 1995-2000 Corporation for National Research Initiatives (CNRI)
> >>> Inf = 1e300**2
> Floating exception (core dumped)

Are you using a DEC (ya, ya, Compaq) compiler to build Python?  If so, try
using its -ieee switch.

by-default-overflow-is-supposed-to-be-silent-ly y'rs  - tim






More information about the Python-list mailing list