[Maxima] %i and (complex 0 1)
Stavros Macrakis
stavros.macrakis@verizon.net
Thu, 2 Oct 2003 16:59:56 -0400
> Who knows who relies on (if (eq (caar x) 'rat) ......)
> or that sqrt(-1) is a symbol.
There are some other surprising things that would have to be done.
Is numberp(%i) true?
subst(-%i,%i,...) is the usual way of calculating the complex conjugate.
subst would have to special-case %i (note that there is NOTHING in the
subst code that hints that it would need any special cases...).
Presumably part(1+%i,2) is easy, since nformat will have to be changed
anyway. inpart will have to handle #c the way it handles rat, I
suppose:
atom(1/2) => false
inpart(1/2,2) => 2
Oops, I spoke too soon about "the way it handles rat". See my bug
report 816808: substinpart(4,2/3,2)=>2/4 (!)