File: diffop.lisp

package info (click to toggle)
maxima 5.9.1-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 32,272 kB
  • ctags: 14,123
  • sloc: lisp: 145,126; fortran: 14,031; tcl: 10,052; sh: 3,313; perl: 1,766; makefile: 1,748; ansic: 471; awk: 7
file content (48 lines) | stat: -rw-r--r-- 1,089 bytes parent folder | download | duplicates (3)
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
47
48
;;; -*- 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.

#-NIL(DECLARE (*EXPR $LISTOFVARS MGET))

(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)