On 4/11/07, Kostas Oikonomou <ko at research.att.com> wrote:
>
> You can see in Ch. 2, "Using Axiom as a Pocket Calculator", how Axiom
> does arithmetic with floats.
>
>From that doc:
The type Float is used to represent real numbers of arbitrary size and
precision (where the user is able to define how big arbitrary is ? the
default is 20 digits but can be as large as your computer system can
handle).
That is, their default floats are like our bfloats with fpprec:20 (or
something like that). As it happens, 3*1.4b0^2-5.88b0 in Maxima (for
testing, use 3*bfloat(14/10)^2-bfloat(588/100) ) does return 0.0b0 for
fpprec:20, but the result is nonzero for some other values of fpprec
(18,24,30, ...). I suspect the same is true of Axiom.
It seems unlikely that a higher number of default digits (20 rather than 16)
would actually be useful to anyone. Just reducing the default fpprintprec
would probably be enough. But it would be possible to have floating-point
notation be interpreted as bigfloats by default if necessary (I've already
written the code...)
A more radical suggestion (which I don't really believe in) would be to
interpret floating-point notation as a way of inputting rationals, and do
rational arithmetic until forced to do otherwise (e.g. fractional powers
that aren't exact, trig function, etc.). But I don't see that this would
actually be useful.
-s