comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: How to catch NaNs with gnat3.14p
Date: 2 Feb 2002 14:56:20 -0800
Date: 2002-02-02T22:56:20+00:00	[thread overview]
Message-ID: <5ee5b646.0202021456.766b2491@posting.google.com> (raw)
In-Reply-To: slrna5nrk4.nc.randhol+abuse@kiuk0152.chembio.ntnu.no

Preben Randhol <randhol+abuse@pvv.org> wrote in message news:<slrna5nrk4.nc.randhol+abuse@kiuk0152.chembio.ntnu.no>
 
> And then I included the snip from the User Guide which clearly states
> that the overflow is not checked for floats in 3.13p so if the User
> Guide says the same in 3.14p it must mean that there isn't any overflow
> checks in 3.14p for floats either.


Yes that is completely true and accurate, but that is a totally
irrelevant red herring for this particular
thread which is about range checks, not about overflow checks. Range
checks for constrained floating-point types
work perfectly well in GNAT, and as documented, these
range checks will catch NaN's.

So my objection here was that the entire discussion of
overflow checks is irrelevant. The fact that Machine_Overflows is
false has nothing whatever to do
with range checks, which must of course work properly
for all constrained floating-point types regardless of
the setting of Machine_Overflows.

The point is that "work properly" is not defined for invalid data like
NaN's, where the behavior is implementation dependent. What GNAT 3.14
has done is
to define this implementation dependent behavior to
say that a NaN always looks out of range in a range test.



  reply	other threads:[~2002-02-02 22:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-01 13:49 How to catch NaNs with gnat3.14p Alexander Boucke
2002-02-01 14:18 ` Preben Randhol
2002-02-01 14:37   ` Alexander Boucke
2002-02-01 14:55     ` Preben Randhol
2002-02-01 14:59       ` Alexander Boucke
2002-02-01 15:30         ` Preben Randhol
2002-02-01 16:10           ` Alexander Boucke
2002-02-01 16:10             ` Jeffrey Creem
2002-02-02  6:23               ` Robert Dewar
2002-02-02  6:21     ` Robert Dewar
2002-02-04  8:57       ` Alexander Boucke
2002-02-02  6:20   ` Robert Dewar
2002-02-02 12:49     ` Preben Randhol
2002-02-02 22:56       ` Robert Dewar [this message]
2002-02-01 20:22 ` Robert Dewar
2002-02-03 13:27   ` Marc A. Criley
2002-02-03 23:06     ` Robert Dewar
2002-02-04 13:05       ` Marc A. Criley
2002-02-05  1:06         ` Robert Dewar
replies disabled

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