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-Thread: 103376,772ddcb41cd06d5b X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!f24g2000prh.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: How to check a Float for NaN Date: Wed, 7 May 2008 16:20:55 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4e49ba21-2646-430a-8112-7bfa6b6ece83@f24g2000prh.googlegroups.com> References: <3132e38d-18bb-4890-9cec-31056ac6e3ba@x19g2000prg.googlegroups.com> <12227360.svS57WvVVs@linux1.krischik.com> <8ee4e946-786c-4faa-8c95-f9027083eb4b@p25g2000pri.googlegroups.com> <97217ff4-aaf3-41ed-986c-8b6c0954e112@l28g2000prd.googlegroups.com> <4820a758$0$548$58c7af7e@news.kabelfoon.nl> <95c1de75-7aa0-4f00-bbc4-6f503a3c7aef@b9g2000prh.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1210202455 3715 127.0.0.1 (7 May 2008 23:20:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 7 May 2008 23:20:55 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f24g2000prh.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.7.12-1.3.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5744 Date: 2008-05-07T16:20:55-07:00 List-Id: On May 7, 3:56 pm, "Randy Brukardt" wrote: > "Adam Beneschan" wrote in message > > news:95c1de75-7aa0-4f00-bbc4-6f503a3c7aef@b9g2000prh.googlegroups.com... > ... > > > type Ieee_Short_Real is > > record > > Mantissa_Sign : Mantissa_Sign_Type; > > Exponent : Exponent_Type; > > Mantissa : Mantissa_Type; > > end record; > > > (I've omitted the rep clause because I think the one above might work > > only for big-endian and not little-endian machines or vice versa, and > > I don't feel like figuring it out because I have a cold and my head > > hurts enough already.) > > Sorry about the cold, but if you omit the rep. clause, all of these > components are likely to take full bytes and that won't work at all. I didn't mean that this would work without a rep clause. I only meant that I didn't feel like figuring it out (especially given that I wanted to use the constants I defined instead of hard-coded integer literals). Yes, it does need one. How about if I say, "Left as an exercise for the reader"?? -- Adam