File: diffop.lisp

package info (click to toggle)
maxima 5.47.0-9
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 193,104 kB
  • sloc: lisp: 434,678; fortran: 14,665; tcl: 10,990; sh: 4,577; makefile: 2,763; ansic: 447; java: 328; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (46 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download | duplicates (15)
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)