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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,23a8a20ef7e9405e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!goblin1!goblin.stu.neva.ru!eternal-september.org!.POSTED!not-for-mail From: Warren Newsgroups: comp.lang.ada Subject: Re: S'Is_nan or S'Is_inf? Date: Mon, 19 Jul 2010 17:18:33 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <1tbp3geoa5yna$.171cmlfdrbm98$.dlg@40tude.net> <5xj0ja9xywto$.3ncqua6onpoa.dlg@40tude.net> Injection-Date: Mon, 19 Jul 2010 17:18:33 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9f8M0iN5t54V+4DF/iqO8g"; logging-data="5136"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ec5Z6/Me8do9TjP/+Zcjfnm5in2pU6pk=" User-Agent: Xnews/5.04.25 X-Face: &6@]C2>ZS=NM|HE-^zWuryN#Z/2_.s9E|G&~DRi|sav9{E}XQJb*\_>=a5"q]\%A;5}LKP][1mA{gZ,Q!j Cancel-Lock: sha1:LTbqilhKm3frSKRY6OeIN5WJG6o= Xref: g2news1.google.com comp.lang.ada:12468 Date: 2010-07-19T17:18:33+00:00 List-Id: Dmitry A. Kazakov expounded in news:5xj0ja9xywto$.3ncqua6onpoa.dlg@40tude.net: > On Fri, 16 Jul 2010 22:35:14 +0000 (UTC), Warren wrote: > IEEE representations have more than +Inf, -Inf and NaN. There are > other objects: +0, -0, denormalized numbers (see attribute 'Denorm). > Some have dubious semantics: Ya, I know about those. As indicated in my other reply, I did eventually figure out that if F /= F, then it is NaN (for some reason, I didn't see this at first). > What are you trying to achieve? Because in automation we have the rule > never ever let IEEE cripples slip through. Don't read them, don't > write them, don't compute them. In my Basic interpreter, I'll raise an error if you try to use these IEEE values in an argument to a function or try to compute something with an operator (here NOT 'Valid is sufficient). However, if the expression result is one of these, I do allow it to be assigned to a [basic] variable. So then the user needs a (basic) function to test if the variable V is +/- infinity or NaN. So in basic, ISNAN(X) returns 1 if NaN, else zero, for example. In the C version of the interpreter, I relied upon C functions for these tests. Ada clearly does not need these C functions, which is bliss for the Ada rewrite. Thanks for everyone's help. Warren