Subject: Out of range floating point number determination
From: Robert Dodier
Date: Sun, 12 Aug 2012 23:11:24 +0000 (UTC)
On 2012-08-11, Edward A Romana <erom at earthlink.net> wrote:
> From the Maxima level, I would like to determine when evaluation of a
> floating point expression is out of range.
The Common Lisp standard does not allow for non-numerical float values
such as infinity, negative infinity, and not-a-number. So any having to
do with such floats is implementation-dependent. Some implementations
allow such values, some don't. Clisp doesn't, SBCL does; I don't
remember about any others.
I wonder what is your larger goal here. If you are trying to avoid
float(x) where x is too big so it causes an error, my advice is to
switch to an implementation, such as SBCL, which allows non-numerical
floats. That might obviate the need for such logic in your own code.
> I had no luck finding i.nf*10^0 in the documentation.
It is probably a messed-up version of an implementation-dependent name
for float infinity. I suppose that's a bug in EXPLODEN (function to
format numbers for display).
Hope this helps,
Robert Dodier