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

* Re: Detecting NaN
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Leake @ 2001-08-06 16:51 UTC (permalink / raw)


"Marin David Condic" <dont.bother.mcondic.auntie.spam@acm.org> writes:

> 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.

'Valid.

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

-- 
-- Stephe



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

* Re: Detecting NaN
  2001-08-06 16:51 ` Stephen Leake
@ 2001-08-06 17:27   ` Marin David Condic
  2001-08-06 21:32     ` Stephen Leake
  0 siblings, 1 reply; 5+ messages in thread
From: Marin David Condic @ 2001-08-06 17:27 UTC (permalink / raw)


Thanks. Gotta upgrad the available NVRAM in my head - the attic is getting
too full! :-)

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


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:uae1dgmiv.fsf@gsfc.nasa.gov...
>
> 'Valid.
>






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

* Re: Detecting NaN
  2001-08-06 17:27   ` Marin David Condic
@ 2001-08-06 21:32     ` Stephen Leake
  2001-08-07 14:16       ` Marin David Condic
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Leake @ 2001-08-06 21:32 UTC (permalink / raw)


"Marin David Condic" <dont.bother.mcondic.auntie.spam@acm.org> writes:

> Thanks. Gotta upgrad the available NVRAM in my head - the attic is getting
> too full! :-)

Just re-prioritize. For example, I never remember peoples names. But
Ada details - now that's _important_ :).


-- 
-- Stephe



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

* Re: Detecting NaN
  2001-08-06 21:32     ` Stephen Leake
@ 2001-08-07 14:16       ` Marin David Condic
  0 siblings, 0 replies; 5+ messages in thread
From: Marin David Condic @ 2001-08-07 14:16 UTC (permalink / raw)


What was it we were talking about? And I'm sorry - what was your name again?
:-)

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


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:u1ymoho1v.fsf@gsfc.nasa.gov...
> Just re-prioritize. For example, I never remember peoples names. But
> Ada details - now that's _important_ :).
>






^ 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