[Maxima] More consistent handling of 4.0*x - 3.0*x
fateman at cs.berkeley.edu
Mon Jun 29 10:09:23 CDT 2009
another choice would be to say float(x) --> error, x is not a number.
and have another program
convert_number_to_float_else_leave_alone(x) --> x
and perhaps a third, which inserts "float" around things that are not
float(x) --> 'float(x).
I think it is a mistake to do bfloat(3*x) --> 3.0b0*bfloat(x).
Is bfloat(x^2) -> bfloat(x)^(2.0b0) ? now it is x^2. or would you
like bfloat(x)^2 ??
bfloat(exp(2*x) is exp(2.0b0*x)
Also, if you do this:
z:bfloat(x); --> bfloat(x)
do you get 100 digits of pi, because that is what fpprec indicates when
z was created, or
25 digits, because that is what was set when z was evaluated...
I suggest looking at what Mathematica does.
Robert Dodier wrote:
> OK by me, but while we're at it, I think float(x) should
> yield 'float(x) instead of just x, likewise for bfloat(x).
> (If we're going to the trouble to make (literal float)*variable
> work correctly with lazy evaluation, we should do
> the same for float(variable).)
> Robert Dodier
> Maxima mailing list
> Maxima at math.utexas.edu
More information about the Maxima