comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Valid on QNaN generates exception, compiler bug?
Date: 01 Feb 2002 09:12:35 -0500
Date: 2002-02-01T14:16:43+00:00	[thread overview]
Message-ID: <u1yg5z3xo.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: yn368.9821$dZ1.36656@rwcrnsc52.ops.asp.att.net

"Steve Doiel" <nospam_steved94@attbi.com> writes:

>   In ObjectAda 7.2 (WinNT x86) I have found that if I assign a value of
> 16#FFC0_0000# (QNaN) to a 32 bit floating point value using unchecked
> conversion, then I try to check the value using 'VALID, I get a
> Constraint_Error, numeric overflow exception.
> 
>   Is this a compiler bug?

No. "NaN" stands for "Not a Number". float_value'Valid checks to see
if 'float_value' holds a valid floating point number. It does not, so
Constraint_Error is raised.

-- 
-- Stephe



  reply	other threads:[~2002-02-01 14:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-31  4:04 Valid on QNaN generates exception, compiler bug? Steve Doiel
2002-02-01 14:12 ` Stephen Leake [this message]
2002-02-01 14:51   ` Steve Doiel
2002-02-01 21:11     ` Robert Dewar
2002-02-01 22:13       ` Steve Doiel
2002-02-01 16:16   ` Jeffrey Carter
  -- strict thread matches above, loose matches on Subject: below --
2002-01-31  4:04 Steve Doiel
replies disabled

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