comp.lang.ada
 help / color / mirror / Atom feed
From: Keith Thompson <kst@cts.com>
Subject: Re: Catching NaN .. not a number
Date: 05 May 2001 14:50:20 -0700
Date: 2001-05-05T14:50:20-07:00	[thread overview]
Message-ID: <yecg0ej5uub.fsf@king.cts.com> (raw)
In-Reply-To: 9d1eai$3nf$1@eol.dd.chalmers.se

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  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
Cxiuj via bazo apartenas ni.



  parent reply	other threads:[~2001-05-05 21:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-05 17:46 Catching NaN .. not a number Staffan Dittmer
2001-05-05 17:58 ` Preben Randhol
2001-05-05 18:28   ` Staffan Dittmer
2001-05-05 21:50 ` Keith Thompson [this message]
2001-05-07 21:40   ` Stephen Leake
2001-05-08  1:37     ` David C. Hoos, Sr.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox