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,64012d256cd76a8d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-09 14:11:03 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Gnat/Windows float point Q Date: Wed, 9 Apr 2003 16:11:44 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:36034 Date: 2003-04-09T16:11:44-05:00 List-Id: tmoran@acm.org wrote in message ... >>> What does it mean when float'image(x) = " 47.720649 0.E+05" ? >> Check X'Valid if the data comes from some route like Unchecked_Conversion. >In this case X comes from Ada.Numerics.Complex_Types.Abs(Y) >and Y came from Z**2, so it might well overflow. Float'Machine_Overflows >is False, so I can't expect an exception, but is an overflowed value >on Gnat/Windows something that is always False in a compare, and >generates garbage for float'image? I'd expect the result of such an operation to be either +infinity or -infinity. Those compare as you expect, and probably raise Constraint_Error when stored (if they didn't do that, the compiler would be violating the rule about math always returning the correct result or raising an exception). Randy.