On Thu, May 13, 2010 at 14:27, Camm Maguire <camm at maguirefamily.org> wrote:
> ...
(%i1) :lisp (setq si::*print-nans* t)
> T
> (%i1) :lisp (float (expt 2 2049) 1.0e0)
> #<inf>
>
Thanks for the info! It prints a little differently in my copy of GCL, but
basically OK.
On the other hand, there are a couple of peculiarities in the floats (maybe
controlled by other global vars?).
Maxima 5.20.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
(%i1) to_lisp();
MAXIMA> (setq si:*print-nans* t)
T
MAXIMA> (setq inf (expt 2.0 2000))
#<1.#INF00e+000> OK
MAXIMA> (setq nan (- inf inf)) IND is OK, but why shown
as negative?
#<-1.#IND00e+000>
MAXIMA> (< nan 0) Oops.
T
MAXIMA> (< nan (- inf)) Oops.
T
MAXIMA> (/ 1 inf) OK
0.0
MAXIMA> (/ -1 inf) Shouldn't this be
-0.0?
0.0
MAXIMA> (/ 1 0.0) Shouldn't this be
INF?
Maxima encountered a Lisp error:
Error in EVAL [or a callee]: Zero divisor.