Problems with cvs maxima on windows
- Subject: Problems with cvs maxima on windows
- From: Barton Willis
- Date: Thu, 26 Jan 2006 22:12:26 -0600
----Robert Dodier wrote: -----
> so maybe $DETERMINANT needs to test for "constant and scalar" or
> something.
Maybe a simple fix like the following is OK. Or revert to r1.8
(defmfun $determinant (mat)
(cond ((not (or (mbagp mat) ($matrixp mat))) (if ($scalarp mat) mat (list
'(%determinant) mat)))
(t (setq mat (check mat))
(if (not (= (length mat) (length (cadr mat))))
(merror "`determinant' called on a non-square matrix."))
(cond ((not $ratmx) (det1 (mcx (cdr mat))))
(t (newvarmat1 mat) (determinant1 (mcx (cdr mat))))))))
(%i76) determinant(x);
(%o76) determinant(x)
(%i78) declare(x,scalar);
(%o78) DONE
(%i79) determinant(x);
(%o79) x
(%i80) determinant(x + %pi);
(%o80) x+%pi
(%i81) determinant(x + y);
(%o81) determinant(y+x)
(%i82) declare(y,scalar);
(%o82) DONE
(%i83) determinant(x + y);
(%o83) y+x