float(171!) returns nonsense



On 5/24/10 7:17 AM, John Lapeyre wrote:
> It looks like float can't handle a number larger than
> a double precision machine number, which makes sense, but
> it doens't fail in a nice way.
>
> (%i1) n : 171!$
> (%i2) nf : float(n)$
> (%i3) numberp(nf);
> (%o3)                                true
> (%i4) nf;
>
> Maxima encountered a Lisp error:
>  Error in PROGN [or a callee]: Can't print a non-number. ...
>       
>   
This is an issue with gcl.  As the message says, it can't print the
non-number, which is double-float infinity in this case.  You can do:

:lisp (setq si::*print-nans* t)

to get it to print something, but I'm not sure maxima will really know what to do with a double-float infinity.


Ray