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 1797 for branches


Ignore:
Timestamp:
2015-06-15T11:46:14-07:00 (9 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

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

    r1796 r1797  
    268268    (otherwise
    269269     object)))
    270 
    271 
    272 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    273 ;;
    274 ;; Unary and binary operation definition facility
    275 ;;
    276 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    277 
    278 (defmacro define-unop (maxima-name fun-name
    279                        &optional (documentation nil documentation-supplied-p))
    280   "Define a MAXIMA-level unary operator MAXIMA-NAME corresponding to unary function FUN-NAME."
    281   `(defun ,maxima-name (p vars
    282                              &aux
    283                              (vars (coerce-maxima-list vars))
    284                              (p (parse-poly p vars)))
    285      ,@(when documentation-supplied-p (list documentation))
    286      (poly->maxima :polynomial (,fun-name +maxima-ring+ p) vars)))
    287 
    288 (defmacro define-binop (maxima-name fun-name
    289                         &optional (documentation nil documentation-supplied-p))
    290   "Define a MAXIMA-level binary operator MAXIMA-NAME corresponding to binary function FUN-NAME."
    291   `(defmfun ,maxima-name (p q vars
    292                              &aux
    293                              (vars (coerce-maxima-list vars))
    294                              (p (parse-poly p vars))
    295                              (q (parse-poly q vars)))
    296      ,@(when documentation-supplied-p (list documentation))
    297      (poly->maxima :polynomial (,fun-name +maxima-ring+ p q) vars)))
    298270
    299271
     
    425397
    426398
     399;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     400;;
     401;; Unary and binary operation definition facility
     402;;
     403;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     404
     405(defmacro define-unop (maxima-name fun-name
     406                       &optional (documentation nil documentation-supplied-p))
     407  "Define a MAXIMA-level unary operator MAXIMA-NAME corresponding to unary function FUN-NAME."
     408  `(defun ,maxima-name (p vars)
     409     ,@(when documentation-supplied-p (list documentation))
     410     (with-ring-and-order ((vars) :polynomials (p) :value-type :polynomial)
     411       (,fun-name ring p) vars)))
     412
     413(defmacro define-binop (maxima-name fun-name
     414                        &optional (documentation nil documentation-supplied-p))
     415  "Define a MAXIMA-level binary operator MAXIMA-NAME corresponding to binary function FUN-NAME."
     416  `(defun ,maxima-name (p vars)
     417     ,@(when documentation-supplied-p (list documentation))
     418     (with-ring-and-order ((vars) :polynomials (p q) :value-type :polynomial)
     419       (,fun-name ring p q) vars)))
     420
     421
     422
    427423;;Functions
    428424
Note: See TracChangeset for help on using the changeset viewer.