comp.lang.ada
 help / color / mirror / Atom feed
* Detecting NaN
@ 2001-08-06 14:09 Marin David Condic
  2001-08-06 16:51 ` Stephen Leake
  0 siblings, 1 reply; 5+ messages in thread
From: Marin David Condic @ 2001-08-06 14:09 UTC (permalink / 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/






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-08-07 14:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-06 14:09 Detecting NaN Marin David Condic
2001-08-06 16:51 ` 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

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