|
From: tomasriker <tom...@us...> - 2026-06-03 22:04:33
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, master has been updated
via 43a9362220b09efe83ce48d7a959b2ab0fe8b368 (commit)
via ec0105f1db714f827043ae87278d397c1fb399e2 (commit)
from 4c2ce86affd66fae5d9d9331cc0761725b2155fd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 43a9362220b09efe83ce48d7a959b2ab0fe8b368
Author: David Scherfgen <d.s...@go...>
Date: Thu Jun 4 00:03:20 2026 +0200
Fix logic for some SIMPARGS/SIMPMAP calls when arguments already simplified
For some old-style simplifiers (not defined via DEF-SIMPLIFIER), when the
function's third argument (mostly named Z) indicates that the arguments are
already simplified, SIMPARGS and SIMPMAP still need to be called (with the Z
flag forwarded to them).
Reason: Contrary to their names, SIMPARGS and SIMPMAP do not just simplify
(if necessary), but they also convert special representations to the general
form. The latter is done regardless of the "already simplified" flag.
diff --git a/src/simp.lisp b/src/simp.lisp
index 3d907dd5f..6cff86841 100644
--- a/src/simp.lisp
+++ b/src/simp.lisp
@@ -384,12 +384,12 @@
(twoargcheck x))
(if (and (member 'array (cdar x)) (null (margs x)))
(merror (intl:gettext "SIMPARGS: subscripted variable found with no subscripts.")))
- (eqtest (if y x (let ((flag (member (caar x) '(mlist mequal))))
+ (eqtest (let ((flag (member (caar x) '(mlist mequal))))
(cons (ncons (caar x))
(mapcar #'(lambda (u)
- (if flag (simplifya u nil)
- (simpcheck u nil)))
- (cdr x)))))
+ (if flag (simplifya u y)
+ (simpcheck u y)))
+ (cdr x))))
x))
;;;-----------------------------------------------------------------------------
@@ -1625,7 +1625,7 @@
y)
(unless (or (= l1 2) (= l1 4) (= l1 5))
(merror (intl:gettext "limit: wrong number of arguments.")))
- (setq y (if z (cdr x) (simpmap (cdr x) nil)))
+ (setq y (simpmap (cdr x) z))
(cond ((and (= l1 5) (not (member (cadddr y) '($plus $minus))))
(merror (intl:gettext "limit: direction must be either 'plus' or 'minus': ~M") (cadddr y)))
((mnump (cadr y))
@@ -1641,7 +1641,7 @@
y)
(unless (or (= l1 3) (= l1 5))
(merror (intl:gettext "integrate: wrong number of arguments.")))
- (setq y (if z (cdr x) (simpmap (cdr x) nil)))
+ (setq y (simpmap (cdr x) z))
(cond ((mnump (cadr y))
(merror (intl:gettext "integrate: variable must not be a number; found: ~M") (cadr y)))
((and (= l1 5) (alike1 (caddr y) (cadddr y)))
@@ -1766,7 +1766,7 @@
(cond ((not (even (length x)))
(cond ((and (cdr x) (null (cdddr x))) (nconc x '(1)))
(t (wna-err '%derivative)))))
- (setq w (cons '(%derivative) (if z (cdr x) (simpmap (cdr x) nil))))
+ (setq w (cons '(%derivative) (simpmap (cdr x) z)))
(setq y (cadr w))
(do ((u (cddr w) (cddr u))) ((null u))
(cond ((mnump (car u))
@@ -2704,7 +2704,7 @@
($listp (cadr x)) (cdadr x) (null (cddadr x)))
(if z (cadadr x) (simplifya (cadadr x) nil))
(let ((badp (dolist (row (cdr x)) (if (not ($listp row)) (return t))))
- (args (if z (cdr x) (simpmap (cdr x) nil))))
+ (args (simpmap (cdr x) z)))
(if (and args (not badp)) (matcheck args))
(cons (if badp '(%matrix simp) '($matrix simp)) args))))
commit ec0105f1db714f827043ae87278d397c1fb399e2
Author: David Scherfgen <d.s...@go...>
Date: Wed Jun 3 17:46:26 2026 +0200
Move definition of +HASHER-MOD+ to top of file to prevent a compiler warning
diff --git a/src/mlisp.lisp b/src/mlisp.lisp
index 6c19b110b..acdae7afc 100644
--- a/src/mlisp.lisp
+++ b/src/mlisp.lisp
@@ -58,6 +58,9 @@ or if apply is being used are printed.")
"Holds the value to which a variable is about to be set when a
'setcheckbreak' occurs.")
+(defconstant +hasher-mod+ 32768
+ "Modulus used by the HASHER function - must be a power of 2.")
+
(defun mapply1 (fn args fnname form)
(cond ((atom fn)
@@ -1949,9 +1952,6 @@ wrapper for this."
(aexpr (mapply1 (cadr arrfun) subs (cadr arrfun) form))
(a-subr (apply (cadr arrfun) subs)))))
-(defconstant +hasher-mod+ 32768
- "Modulus used by the HASHER function - must be a power of 2.")
-
(defun hasher (l) ; This is not the best way to write a hasher. But,
(if (null l) ; please don't change this code or you're liable to
0 ; break SAVE files.
-----------------------------------------------------------------------
Summary of changes:
src/mlisp.lisp | 6 +++---
src/simp.lisp | 16 ++++++++--------
2 files changed, 11 insertions(+), 11 deletions(-)
hooks/post-receive
--
Maxima CAS
|