From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,734832b8ad479964 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-05 14:50:21 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newshub.sdsu.edu!newspeer.cts.com!galanthis.cts.com!127.0.0.1.MISMATCH!not-for-mail Sender: kst@king.cts.com Newsgroups: comp.lang.ada Subject: Re: Catching NaN .. not a number References: <9d1eai$3nf$1@eol.dd.chalmers.se> From: Keith Thompson Date: 05 May 2001 14:50:20 -0700 Message-ID: X-Newsreader: Gnus v5.5/Emacs 20.3 NNTP-Posting-Host: 209.68.192.180 X-Trace: 989099420 nntp.cts.com 235 209.68.192.180 Xref: newsfeed.google.com comp.lang.ada:7212 Date: 2001-05-05T14:50:20-07:00 List-Id: f97stdi@dd.chalmers.se (Staffan Dittmer) writes: > Did some calcualtions during the night and > ended up with an output file full of NaN - due to > overflow when calculating a factorial. > > A bit surprised by this since I thought a Constraint Error > would be raised. An implementation isn't required to raise Constraint_Error on floating-point overflow or division by zero. See the Machine_Overflows attribute. > So, how do I catch a NaN result ? I don't think there's a standard way to do so; see the documentation for your implementation. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Cxiuj via bazo apartenas ni.