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 11:30:09 PST Path: newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newsfeed.sunet.se!news01.sunet.se!news.chalmers.se!dd.chalmers.se!not-for-mail From: f97stdi@dd.chalmers.se (Staffan Dittmer) Newsgroups: comp.lang.ada Subject: Re: Catching NaN .. not a number Date: 5 May 2001 18:28:43 GMT Organization: Chalmers University of Technology, Sweden Message-ID: <9d1gor$4l2$1@eol.dd.chalmers.se> References: <9d1eai$3nf$1@eol.dd.chalmers.se> NNTP-Posting-Host: bombur.dd.chalmers.se Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Newsreader: knews 1.0b.1 Xref: newsfeed.google.com comp.lang.ada:7206 Date: 2001-05-05T18:28:43+00:00 List-Id: In article , randhol+abuse@pvv.org (Preben Randhol) writes: >When you say calculating factorial, do you use integer? No, long_float. Works up to ~ 170! for me, at least I believe so.... > For floating-point, GNAT has the `Machine_Overflows' > attribute set to `False' and the normal mode of operation is to > generate IEEE NaN and infinite values on overflow > Ok, so since I'm using Gnat and long_floats, I would expect a NaN on overflow. Is NaN a value in itself? Is it possible to do a check like if result = NaN then ... ? / Staffan Dittmer