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,start X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!x19g2000prg.googlegroups.com!not-for-mail From: Jerry Newsgroups: comp.lang.ada Subject: How to check a Float for NaN Date: Wed, 30 Apr 2008 03:27:51 -0700 (PDT) Organization: http://groups.google.com Message-ID: <3132e38d-18bb-4890-9cec-31056ac6e3ba@x19g2000prg.googlegroups.com> NNTP-Posting-Host: 75.171.61.127 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1209551272 9432 127.0.0.1 (30 Apr 2008 10:27:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 30 Apr 2008 10:27:52 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: x19g2000prg.googlegroups.com; posting-host=75.171.61.127; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:21134 Date: 2008-04-30T03:27:51-07:00 List-Id: How would one check a Float or Long_Float if it has value NaN? The only ways that I can come up with are to import a C function (isnan, I think) or to write Long_Float'image(Some_Float) to a string and examine the first three characters to see if they are "NaN" (and that seems to be a GNAT implementation choice so might not be portable, which is OK for my use). Jerry