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:51:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.direct.ca!look.ca!wn1feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc54.POSTED!not-for-mail From: "Steve Doiel" Newsgroups: comp.lang.ada References: Subject: Re: Valid on QNaN generates exception, compiler bug? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc54 1012575112 12.225.227.101 (Fri, 01 Feb 2002 14:51:52 GMT) NNTP-Posting-Date: Fri, 01 Feb 2002 14:51:52 GMT Organization: AT&T Broadband Date: Fri, 01 Feb 2002 14:51:52 GMT Xref: archiver1.google.com comp.lang.ada:19474 Date: 2002-02-01T14:51:52+00:00 List-Id: "Stephen Leake" wrote in message news:u1yg5z3xo.fsf@gsfc.nasa.gov... > "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. > Interesting. I expected float_value'Valid to return false, not raise an exception. SteveD > -- > -- Stephe