comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@acm.org>
Subject: Detecting NaN
Date: Mon, 6 Aug 2001 10:09:55 -0400
Date: 2001-08-06T14:09:58+00:00	[thread overview]
Message-ID: <9km8fm$d3r$1@nh.pace.co.uk> (raw)

Suppose I'm generating a Not A Number (NaN) in a floating point computation.
If I'm using Gnat 3.13p, I'm pretty sure the way to get that detected is
with the "-gnato" switch. (I have not tested it yet - someone else's code -
but I'm pretty sure the problem is showing up because the code in question
is not compiled with overflow checks on.) However, it might be advantageous
to leave off the overflow checks and just force a check on the result. I
seem to recall that there was an attribute or pragma or some other Ada
language mechanism that would force a data item to be evaluated for
correctness - say, after reading a record from a file. You might want to
force an evaluationt that the language rules don't require until the record
is actually accessed. I think that was the context in which I remember the
mechanism being employed. Can anybody refresh my memory as to how that was
done? Thanks.

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
Web:      http://www.mcondic.com/






             reply	other threads:[~2001-08-06 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-06 14:09 Marin David Condic [this message]
2001-08-06 16:51 ` Detecting NaN Stephen Leake
2001-08-06 17:27   ` Marin David Condic
2001-08-06 21:32     ` Stephen Leake
2001-08-07 14:16       ` Marin David Condic
replies disabled

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