comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve Doiel" <nospam_steved94@attbi.com>
Subject: Re: Valid on QNaN generates exception, compiler bug?
Date: Fri, 01 Feb 2002 14:51:52 GMT
Date: 2002-02-01T14:51:52+00:00	[thread overview]
Message-ID: <cYx68.6829$IZ4.21489@rwcrnsc54> (raw)
In-Reply-To: u1yg5z3xo.fsf@gsfc.nasa.gov


"Stephen Leake" <stephen.a.leake.1@gsfc.nasa.gov> wrote in message
news:u1yg5z3xo.fsf@gsfc.nasa.gov...
> "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.
>
Interesting.  I expected float_value'Valid to return false, not raise an
exception.

SteveD

> --
> -- Stephe





  reply	other threads:[~2002-02-01 14:51 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
2002-02-01 14:51   ` Steve Doiel [this message]
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