Richard Fateman <fateman@cs.berkeley.edu> writes:
> Common Lisp has rational, complex (which could include a pair of
> rationals...). Using Common Lisp numbers for Maxima numbers would
> probably be a benefit if it could be done without introducing bugs.
Could you please elaborate a bit on this idea (for complex numbers)
because it apparently allows for replacing $%I by #c(0 1) throughout
the sources, which scares me.
The symbol $%I is a `kernel' of an expression and numbers (in the
sense of NUMBERP) are not. Maxima is quite consistent in regarding
$%I as the image of an indeterminate X in R[X]/(X^2+1) (perhaps, with
some fuzziness about the nature of the algebra R).
This is particularly clear if we set ALGEBRAIC:TRUE and look at the
CRE representation of $%I, which is just the same as the CRE
representation of $%E, except that the algebraic dependence is
recorded as the TELLRAT property of the gensym representing $%I.
IMHO, this behaviour is one of the great strengths of Maxima, and it
is completely natural from an algebraic viewpoint, so we ought not
break it. Of course, $%I is an (algebraic) NUMBER, but this is merely
a matter of terminology.
On the other hand, I guess we could give $%I a $NUMER MPROP of #c(0 1)
and experiment with this without breaking things.
Wolfgang