From: Rupert S. <rsw...@us...> - 2013-12-03 22:38:21
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via 54eba6b2e31ce1df8c5e7248e24268b55f0fc65f (commit) from f9f89d7ad573dcbddf63992b15fcc37ab110e989 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 54eba6b2e31ce1df8c5e7248e24268b55f0fc65f Author: Rupert Swarbrick <rsw...@gm...> Date: Tue Dec 3 22:37:40 2013 +0000 Trivial documentation of pminusp -> pmod diff --git a/src/rat3a.lisp b/src/rat3a.lisp index 71017ea..a26aead 100644 --- a/src/rat3a.lisp +++ b/src/rat3a.lisp @@ -622,18 +622,35 @@ (dotimes (i (1- n)) (push (ptimes p (car lst)) lst)) lst)) +;; PMINUSP +;; +;; Returns true if the coefficient of the leading monomial of the polynomial is +;; negative. Note that this depends on the variable ordering (for example, +;; consider x-y). +;; +;; (pminusp '(y 1 -1 0 (x 1 1))) => T but +;; (pminusp '(x 1 1 0 (y 1 -1))) => NIL (defmfun pminusp (p) (if (realp p) (minusp p) (pminusp (p-lc p)))) +;; PMINUS +;; +;; Unary negation for polynomials. (defmfun pminus (p) (if (pcoefp p) (cminus p) (cons (p-var p) (ptminus (p-terms p))))) +;; PTMINUS +;; +;; Negate a list of polynomial terms. (defun ptminus (x) (loop for (exp coef) on x by #'cddr nconc (list exp (pminus coef)))) +;; PMOD +;; +;; Reduce a polynomial modulo the current value of MODULUS. (defmfun pmod (p) (if (pcoefp p) (cmod p) (psimp (car p) ----------------------------------------------------------------------- Summary of changes: src/rat3a.lisp | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) hooks/post-receive -- Maxima CAS |