|
From: tomasriker <tom...@us...> - 2026-05-28 07:55:51
|
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 56c2d780393b641f0d6f0751d57b6750ca5dad68 (commit)
via 6742a23049352a80984fbe53b138659cc9ddf7ec (commit)
from c295b89a4305bda4012e07943084f14d1d3e312a (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 56c2d780393b641f0d6f0751d57b6750ca5dad68
Author: David Scherfgen <d.s...@go...>
Date: Thu May 28 09:53:52 2026 +0200
Correct explanatory comment in PLUSIN
diff --git a/src/simp.lisp b/src/simp.lisp
index 854280310..950ff5b1a 100644
--- a/src/simp.lisp
+++ b/src/simp.lisp
@@ -939,8 +939,8 @@
;; Example: X = 7*2^(1/4) gets added into FM = 2^(1/4) + 2^(3/8)
;; 7*2^(1/4) merges with 2^(1/4) to 8*2^(1/4), but this term is fed into
;; SIMPTIMES, which recognizes that 8 = 2^3, pushes the 3 into the
- ;; exponent and returns 2^(13/4). But 2^(13/4) now must come before the
- ;; already existing term 2^(3/8) to maintain canonical ordering.
+ ;; exponent and returns 2^(13/4). But 2^(13/4) now must come after the
+ ;; already existing term 2^(3/8) in FM to maintain canonical ordering.
(setq int-base-expt-p (and (mexptp x1) (integerp (cadr x1))))
start
(setq base-match-p nil)
commit 6742a23049352a80984fbe53b138659cc9ddf7ec
Author: David Scherfgen <d.s...@go...>
Date: Thu May 28 09:51:30 2026 +0200
Fix infinite loop in GCD $EZ/$MOD with algebraic variables
The GCD routines EZGCD2 ('$EZ) and NEWGCD ('$MOD) can fail on polynomials
containing algebraic variables. In PGCDA, which is the "dispatcher" that calls
the different GCD routines, intercept cases where $GCD is '$EZ or '$MOD and
algebraic variables are present, and dispatch to the OLDGCD ('$SUBRES) routine
instead. This is also what Maxima does when $GCD = '$ALGEBRAIC and algebraic
variables are present.
This fixes #282.
diff --git a/src/rat3c.lisp b/src/rat3c.lisp
index ab64a968b..5279a5ea9 100644
--- a/src/rat3c.lisp
+++ b/src/rat3c.lisp
@@ -118,9 +118,17 @@
(if (or (palgp x) (palgp y))
(let (($gcd '$subres)) (list (oldgcd x y)))
(let (($gcd '$spmod)) (list (zgcd x y)))))
- ((eq $gcd '$ez) (ezgcd2 x y))
+ ((eq $gcd '$ez)
+ (if (or (palgp x) (palgp y))
+ ;; EZGCD2 may loop infinitely on algebraic variables - switch to OLDGCD.
+ (let (($gcd '$subres)) (list (oldgcd x y)))
+ (ezgcd2 x y)))
((eq $gcd '$red) (list (oldgcd x y)))
- ((eq $gcd '$mod) (newgcd x y modulus))
+ ((eq $gcd '$mod)
+ (if (or (palgp x) (palgp y))
+ ;; NEWGCD gcd may loop infinitely on algebraic variables - switch to OLDGCD.
+ (let (($gcd '$subres)) (list (oldgcd x y)))
+ (newgcd x y modulus)))
((not (member $gcd *gcdl* :test #'eq))
(merror (intl:gettext "gcd: 'gcd' variable must be one of ~M; found: ~M") *gcdl* $gcd))
(t (list 1 x y))))
-----------------------------------------------------------------------
Summary of changes:
src/rat3c.lisp | 12 ++++++++++--
src/simp.lisp | 4 ++--
2 files changed, 12 insertions(+), 4 deletions(-)
hooks/post-receive
--
Maxima CAS
|