Stavros Macrakis wrote:
> Things like this do not seem worth special-casing. Floating-point has
> well-understood limitations, and Maxima offers bfloat when you want to
> escape (some of) them.
>
> It would be far more valuable in general if we could integrate IEEE
> floats into Maxima (in this case, getting a NaN). But that is a bigger
> project....
>
>
I agree that allowing NaNs should be considered, but I think that this
is not supported sufficiently
by all the Lisps. In particular, GCL says "Can't print a non-number"
when given a NaN
(try:
:lisp (float (expt 2 2049) 1.0e0)
)
Maybe all the other lisps are better??? (CL standard does not deal with
this issue).
Another thought is that Maxima can do much better with symbolic
expressions than a purely-numeric
system, and therefore could have lots more information that just NaN.
For example, if
sin(2^2048) is problematical, just leave it as 'sin(2^2048) rather
than NaN.
RJF
> -s
>
>
> On 2010-05-11, Raymond Toy <toy.raymond at gmail.com> wrote:
>
>> What should maxima do with float(sin(2^2048))? It currently generates
>> an error because 2^2048 is too big to fit in a double float.
>>
>> We could do better than this by doing argument reduction of 2^2048.
>>
>> Or the easy way is to tell the user to do float(bfloat(sin(2^2048))).
>> Should maxima do that automatically?
>>
>> Ray
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima at math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
>>
>>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>