|
From: tomasriker <tom...@us...> - 2026-05-31 18:56:22
|
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 7fc142f5436bcfa02107388d8d25c6119ec482c5 (commit)
from 629708218e6af8ea11de83916cac1813ba005c55 (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 7fc142f5436bcfa02107388d8d25c6119ec482c5
Author: David Scherfgen <d.s...@go...>
Date: Sun May 31 20:55:44 2026 +0200
PARTITION: remove call to SIMPLIFYA
If the input EXP is simplified, a call to SIMPLIFYA on the result is not
necessary, since a subset of at least 2 terms/factors of a simplified
MPLUS/MTIMES expression is also simplified.
If EXP is not simplified, it's not PARTITION's job to simplify.
Let the output MPLUS/MTIMES expressions have the SIMP flag iff EXP has it.
Skip any extra header flags, such as IRREDUCIBLE or FACTORED.
Related: In the PARTITION-BY comment, mention that the order of elements is
reversed in the output (PARTITION makes use of this).
diff --git a/src/csimp.lisp b/src/csimp.lisp
index ebd5e1b9e..2f0396ee0 100644
--- a/src/csimp.lisp
+++ b/src/csimp.lisp
@@ -84,7 +84,7 @@
;; (VALUES YES NO),
;;
;; where YES and NO are lists consisting of elements for which PREDICATE is true
-;; or false, respectively.
+;; or false, respectively. The order of elements is reversed compared to SEQ.
(defun partition-by (predicate seq)
(let ((yes) (no))
(map nil
@@ -118,14 +118,13 @@
(t
(multiple-value-bind (constant variable)
(partition-by (lambda (x) (freeof var1 x)) (cdr exp))
+ (let ((header (if (member 'simp (cdar exp)) (get op 'msimpind) (list op))))
(cons (cond ((null constant) k)
((null (cdr constant)) (car constant))
- (t (simplifya
- (cons (list op) (nreverse constant)) t)))
+ (t (cons header (nreverse constant))))
(cond ((null variable) k)
((null (cdr variable)) (car variable))
- (t (simplifya
- (cons (list op) (nreverse variable)) t)))))))))
+ (t (cons header (nreverse variable)))))))))))
;;To use this INTEGERINFO and *ASK* need to be special.
;;(defun integerpw (x)
-----------------------------------------------------------------------
Summary of changes:
src/csimp.lisp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
hooks/post-receive
--
Maxima CAS
|