From: pereira at research.att.com (Fernando Pereira)
Date: Fri, 30 Apr 1999 02:58:58 GMT
Subject: FP exception, core dump in Python 1.5.2 (Tim's doing <grin>)
References: <mark.925274556@declan>
Message-ID: <290419992258582791%pereira@research.att.com>
Content-Length: 1142
X-UID: 612                                                  

In article <mark.925274556 at declan>, Mark C Favas <mark at chem.uwa.edu.au>
wrote:

> [Tim Peters suggests some code to generate INFs and NANs]
> <snip> 
> [Mark tries it, and...]
> 
> On my platform, (DEC Alpha, Digital Unix 4.0D, Python 1.5.2) I get... a core
> dump! (exclamation because it's one of the few Python core dumps I've seen).
Unfortunately, the Alpha implementation of IEEE FP does not handle
overflow gracefully. With the default C compilation flags, the code
generated cannot recover from an overflow to stuff an Inf in the
result, so the only thing the OS can do is to kill the process.
Alternatively, with appropriate flags (can't remember them from the top
of my head, had to deal with this 6 months ago), the C compiler adds
machine instructions to allow recovery from FP exceptions, including
storing Inf as a result of overflow. Unfortunately, FP performance in
this mode is not nearly as good. None of the other machines I use (SGI,
Sun, Intel, Mac) have this problem. On the other hand, none of them
comes close to an Alpha in FP performance (with the dafault `fast'
compilation setting). Tradeoffs...

-- 
-- F




