close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 111 for branches


Ignore:
Timestamp:
2015-06-05T12:10:16-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/mx-grobner.lisp

    r106 r111  
    7171are assumed to be defined.")
    7272
     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
    73100
    74101
Note: See TracChangeset for help on using the changeset viewer.