1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
;;; -*- Lisp -*-
;;; DIFFOP: A Library for making ' a more useful character in Macsyma
;;;
;;; Loading this file sets things up so that you can do
;;;
;;; DEPENDS(F,X); => [F(X)]
;;;
;;; F'; => dF/dX
;;;
;;; 3
;;; F'3; or F'''; => d F
;;; -----
;;; 3
;;; dX
;;;
;;; If a variable has more than one DEPENDS property, the variable
;;; which will be used is undefined.
;;; If a variable has no DEPENDS property, UND will be used as the
;;; variable to differentiate by.
(DEFUN INFER-DEPENDENCY (X)
(OR (CAR (MGET (CADR ($LISTOFVARS X)) 'DEPENDS)) '$UND))
(DECLARE (SPECIAL STRING))
;Makes awfully big assumptions about the internals of GRAM
(DEFUN PARSE-PRIME (OP LEFT)
(SETQ LEFT (CDR LEFT))
(CONS '$ANY
(LIST '($DIFF)
LEFT
(INFER-DEPENDENCY LEFT)
(+ -1
(FLATC OP)
(COND ((AND STRING (NUMBERP (CAR STRING)))
(POP STRING))
(T 0))))))
(DEFPROP $/' 195. LBP)
(DEFPROP $/' PARSE-PRIME LED)
(DEFPROP $/'/' 195. LBP)
(DEFPROP $/'/' PARSE-PRIME LED)
|