|
From: Richard F. <fa...@be...> - 2016-03-31 17:20:36
|
It is possible to construct complex numbers in lisp (though so far we have mostly avoided it....) . The simplest way is :lisp (setf $k #c(1 3) now k; prints as 3 %i+1 however, k -3*%i -1 prints as 0 + 3 %i - 3 %i. There are other anomalies, such as ratcoef(k,%i) returns 0. k+1/2 signals an error. sin(k) signals an error Just a suggestion -- Be careful in case you are using lisp and it can produce complex numbers. Note also, if you are using lisp and produce rational numbers, Maxima structures differ there too. |