From: Warren <ve3wwg@gmail.com>
Subject: Re: S'Is_nan or S'Is_inf?
Date: Mon, 19 Jul 2010 17:18:33 +0000 (UTC)
Date: 2010-07-19T17:18:33+00:00 [thread overview]
Message-ID: <Xns9DBA87634EE92WarrensBlatherings@188.40.43.230> (raw)
In-Reply-To: 5xj0ja9xywto$.3ncqua6onpoa.dlg@40tude.net
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
next prev parent reply other threads:[~2010-07-19 17:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 21:00 S'Is_nan or S'Is_inf? Warren
2010-07-15 21:30 ` Rod Chapman
2010-07-15 22:03 ` Simon Wright
2010-07-15 21:42 ` J-P. Rosen
2010-07-15 22:07 ` Simon Wright
2010-07-16 8:42 ` Dmitry A. Kazakov
2010-07-16 17:06 ` Warren
2010-07-16 19:39 ` Dmitry A. Kazakov
2010-07-16 22:35 ` Warren
2010-07-17 6:24 ` Simon Wright
2010-07-19 17:04 ` Warren
2010-07-17 7:40 ` Dmitry A. Kazakov
2010-07-19 17:18 ` Warren [this message]
2010-07-19 23:15 ` Randy Brukardt
2010-07-20 14:12 ` Warren
2010-07-20 16:20 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox