common lisp complex numbers, also common lisp rational numbers
Subject: common lisp complex numbers, also common lisp rational numbers
From: Richard Fateman
Date: Thu, 01 Mar 2012 10:17:18 -0800
sometimes these may come up, from lisp routines. Or you can create them
in maxima
this way:
A: ?complex(1,2)
Should numberp(A) return true? (it doesn't).
It is certainly a tricky situation to deal with, generally... should
a complex constant like 1+2*%i be stored in common lisp as #c(1 2)...
which has various positive aspects, mostly having to do with numerics.
but has the negative aspects that
1. the re and im parts must be lisp number constants and that excludes
bigfloats.
2. it also excludes symbolic re and im parts.
I think numberp(A) should return true if ?numberp(A) returns true [it
does]..
that is, every common lisp number should be a number to Maxima as well.
Oh, CL rational numbers might also be allowed as Maxima numbers too.
Here's a confusing situation...
:lisp (setf $aa 1/2)
aa+1/3
returns 5/2/3
So the intermixing of Maxima rationals and CL rationals has bugs.
But we knew this.
RJF