1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-10 04:44:26 +00:00

Added definitions for DIFFSUMPROD and DIFF-%AT.

These definitions were missing from the ITS source for JPG;COMM2.
Also brought this source up-to-date with respect to LISPM one.
Resolves #2189.
This commit is contained in:
Eric Swenson
2023-04-18 16:59:21 -07:00
parent 31048c62fa
commit 22056ee716

View File

@@ -4,9 +4,12 @@
(macsyma-module comm2)
(DECLARE (GENPREFIX CC) (SPECIAL $PROPS) (FIXNUM N I J))
(DECLARE (SPLITFILE DIFF2) (SPECIAL $DOTDISTRIB))
(DECLARE (GENPREFIX CC)
(SPECIAL $PROPS $DOTDISTRIB)
(FIXNUM N I J)
(SPLITFILE DIFF2)
(*expr hand-side freeofl gensumindex constant newvar badfunchk mapatom
getalias string*))
(DEFMFUN DIFFINT (E X)
((LAMBDA (A)
@@ -30,6 +33,23 @@
(LIST (IF (ZEROP U) 0 (MUL2 U (SUBSTITUTE (CADDDR E) Y (CAR E))))
(IF (ZEROP V) 0 (MUL3 V (SUBSTITUTE (CADDR E) Y (CAR E)) -1)))))
(DEFMFUN DIFFSUMPROD (E X)
(COND ((OR (NOT (ATOM X))
(NOT (FREE (CADDDR E) X))
(NOT (FREE (CAR (CDDDDR E)) X)))
(DIFF%DERIV (LIST E X 1)))
((EQ (CADDR E) X) 0)
(T (LET ((U (SDIFF (CADR E) X)))
(SETQ U (SIMPLIFYA (LIST '(%SUM)
(IF (EQ (CAAR E) '%SUM)
U
(DIV U (CADR E)))
(CADDR E)
(CADDDR E)
(CAR (CDDDDR E)))
T))
(IF (EQ (CAAR E) '%SUM) U (MUL2 E U))))))
(DEFMFUN DIFFSUM (E X)
(COND ((OR (NOT (ATOM X)) (NOT (FREE (CADDDR E) X)) (NOT (FREE (CAR (CDDDDR E)) X)))
(DIFF%DERIV (LIST E X 1)))
@@ -41,6 +61,13 @@
(COND ((OR (NOT (ATOM X)) (EQ (CADDDR E) X)) (DIFF%DERIV (LIST E X 1)))
((EQ (CADDR E) X) 0)
(T ($LAPLACE (SDIFF (CADR E) X) (CADDR E) (CADDDR E)))))
(DEFMFUN DIFF-%AT (E X)
(COND ((FREEOF X E) 0)
((NOT (FREEOFL X (HAND-SIDE (CADDR E) 'R)))
(DIFF%DERIV (LIST E X 1)))
(T ($AT (SDIFF (CADR E) X) (CADDR E)))))
(DEFMFUN DIFFNCEXPT (E X)
((LAMBDA (BASE* POW)