Bug#707596: maxima: 1000!^0.01 produces i.nfE+142498684



A possible explanation I'd that one happens in software (Lisp's conversion
of bignum into float) and the other happens in hardware, in the FPU. The
system libraries give varying amounts of control over overflow and other
exceptional behavior, but dealing with this stuff is tedious, unportable,
and can be brittle. Most implementations bother only about important
behaviors that the ANS requires.
 On Sep 5, 2013 11:34 AM, "Raymond Toy" <toy.raymond at gmail.com> wrote:

> >>>>> "Robert" == Robert Dodier <robert.dodier at gmail.com> writes:
>
>
>     Robert> I have to say that the complaint about 1000! too big to
>     Robert> fit in a float seems less helpful. Why not just make it
>     Robert> inf? (If such numbers are allowed at all.) Why should
>
> Because 1000! is big but not infinity? :-)
>
> I know Richard has suggested automatically converting to bigfloat for
> things like this.
>
>     Robert> exp(1000e0) => inf while float(1000!) => error?
>
> I see that ccl complains about a floating-point overflow for
> exp(1000.0); cmucl returns infinity.  (I think that's a bug in cmucl).
> I agree we should be consistent, but so much depends on the underlying
> lisp.  We could implement exp ourselves, but that is probably not what
> we want to do.
>
> Ray
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>