From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b6062cca52b2d096 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-01 06:16:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Valid on QNaN generates exception, compiler bug? Date: 01 Feb 2002 09:12:35 -0500 Organization: NASA Goddard Space Flight Center Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1012573003 2197 128.183.220.71 (1 Feb 2002 14:16:43 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 1 Feb 2002 14:16:43 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 Xref: archiver1.google.com comp.lang.ada:19468 Date: 2002-02-01T14:16:43+00:00 List-Id: "Steve Doiel" 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