Changeset 111 for branches/f4grobner
- Timestamp:
- 2015-06-05T12:10:16-07:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/f4grobner/mx-grobner.lisp
r106 r111 71 71 are assumed to be defined.") 72 72 73 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 74 ;; 75 ;; Unary and binary operation definition facility 76 ;; 77 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 78 79 (defmacro define-unop (maxima-name fun-name 80 &optional (documentation nil documentation-supplied-p)) 81 "Define a MAXIMA-level unary operator MAXIMA-NAME corresponding to unary function FUN-NAME." 82 `(defun ,maxima-name (p vars 83 &aux 84 (vars (coerce-maxima-list vars)) 85 (p (parse-poly p vars))) 86 ,@(when documentation-supplied-p (list documentation)) 87 (coerce-to-maxima :polynomial (,fun-name *maxima-ring* p) vars))) 88 89 (defmacro define-binop (maxima-name fun-name 90 &optional (documentation nil documentation-supplied-p)) 91 "Define a MAXIMA-level binary operator MAXIMA-NAME corresponding to binary function FUN-NAME." 92 `(defmfun ,maxima-name (p q vars 93 &aux 94 (vars (coerce-maxima-list vars)) 95 (p (parse-poly p vars)) 96 (q (parse-poly q vars))) 97 ,@(when documentation-supplied-p (list documentation)) 98 (coerce-to-maxima :polynomial (,fun-name *maxima-ring* p q) vars))) 99 73 100 74 101
Note:
See TracChangeset
for help on using the changeset viewer.