You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(20) |
Dec
(17) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(39) |
Feb
(21) |
Mar
(33) |
Apr
(135) |
May
(53) |
Jun
(88) |
Jul
(47) |
Aug
(59) |
Sep
(207) |
Oct
(40) |
Nov
(7) |
Dec
(26) |
| 2003 |
Jan
(49) |
Feb
(39) |
Mar
(117) |
Apr
(50) |
May
(62) |
Jun
(6) |
Jul
(19) |
Aug
(24) |
Sep
(11) |
Oct
(11) |
Nov
(49) |
Dec
(9) |
| 2004 |
Jan
(29) |
Feb
(123) |
Mar
(32) |
Apr
(53) |
May
(52) |
Jun
(19) |
Jul
(33) |
Aug
(10) |
Sep
(76) |
Oct
(86) |
Nov
(171) |
Dec
(163) |
| 2005 |
Jan
(147) |
Feb
(121) |
Mar
(120) |
Apr
(126) |
May
(120) |
Jun
(213) |
Jul
(76) |
Aug
(79) |
Sep
(140) |
Oct
(83) |
Nov
(156) |
Dec
(202) |
| 2006 |
Jan
(181) |
Feb
(171) |
Mar
(157) |
Apr
(98) |
May
(96) |
Jun
(97) |
Jul
(193) |
Aug
(76) |
Sep
(130) |
Oct
(63) |
Nov
(196) |
Dec
(253) |
| 2007 |
Jan
(256) |
Feb
(293) |
Mar
(276) |
Apr
(258) |
May
(181) |
Jun
(91) |
Jul
(108) |
Aug
(69) |
Sep
(107) |
Oct
(179) |
Nov
(137) |
Dec
(121) |
| 2008 |
Jan
(124) |
Feb
(129) |
Mar
(192) |
Apr
(201) |
May
(90) |
Jun
(86) |
Jul
(115) |
Aug
(142) |
Sep
(49) |
Oct
(91) |
Nov
(95) |
Dec
(218) |
| 2009 |
Jan
(230) |
Feb
(149) |
Mar
(118) |
Apr
(72) |
May
(77) |
Jun
(68) |
Jul
(102) |
Aug
(72) |
Sep
(89) |
Oct
(76) |
Nov
(125) |
Dec
(86) |
| 2010 |
Jan
(75) |
Feb
(90) |
Mar
(89) |
Apr
(121) |
May
(111) |
Jun
(66) |
Jul
(75) |
Aug
(66) |
Sep
(66) |
Oct
(166) |
Nov
(121) |
Dec
(73) |
| 2011 |
Jan
(74) |
Feb
|
Mar
|
Apr
(14) |
May
(22) |
Jun
(31) |
Jul
(53) |
Aug
(37) |
Sep
(23) |
Oct
(25) |
Nov
(31) |
Dec
(28) |
| 2012 |
Jan
(18) |
Feb
(11) |
Mar
(32) |
Apr
(17) |
May
(48) |
Jun
(37) |
Jul
(23) |
Aug
(54) |
Sep
(15) |
Oct
(11) |
Nov
(19) |
Dec
(22) |
| 2013 |
Jan
(11) |
Feb
(32) |
Mar
(24) |
Apr
(37) |
May
(31) |
Jun
(14) |
Jul
(26) |
Aug
(33) |
Sep
(40) |
Oct
(21) |
Nov
(36) |
Dec
(84) |
| 2014 |
Jan
(23) |
Feb
(20) |
Mar
(27) |
Apr
(24) |
May
(31) |
Jun
(27) |
Jul
(34) |
Aug
(26) |
Sep
(21) |
Oct
(45) |
Nov
(23) |
Dec
(73) |
| 2015 |
Jan
(33) |
Feb
(8) |
Mar
(24) |
Apr
(45) |
May
(27) |
Jun
(19) |
Jul
(21) |
Aug
(51) |
Sep
(43) |
Oct
(29) |
Nov
(61) |
Dec
(86) |
| 2016 |
Jan
(99) |
Feb
(52) |
Mar
(80) |
Apr
(61) |
May
(24) |
Jun
(23) |
Jul
(36) |
Aug
(30) |
Sep
(41) |
Oct
(43) |
Nov
(27) |
Dec
(46) |
| 2017 |
Jan
(57) |
Feb
(34) |
Mar
(40) |
Apr
(31) |
May
(78) |
Jun
(49) |
Jul
(72) |
Aug
(33) |
Sep
(26) |
Oct
(82) |
Nov
(69) |
Dec
(29) |
| 2018 |
Jan
(43) |
Feb
(9) |
Mar
|
Apr
(40) |
May
(34) |
Jun
(49) |
Jul
(45) |
Aug
(8) |
Sep
(51) |
Oct
(75) |
Nov
(103) |
Dec
(80) |
| 2019 |
Jan
(153) |
Feb
(78) |
Mar
(47) |
Apr
(48) |
May
(63) |
Jun
(54) |
Jul
(10) |
Aug
(7) |
Sep
(17) |
Oct
(24) |
Nov
(29) |
Dec
(17) |
| 2020 |
Jan
(22) |
Feb
(74) |
Mar
(47) |
Apr
(48) |
May
(12) |
Jun
(44) |
Jul
(13) |
Aug
(18) |
Sep
(26) |
Oct
(36) |
Nov
(25) |
Dec
(23) |
| 2021 |
Jan
(28) |
Feb
(25) |
Mar
(58) |
Apr
(76) |
May
(72) |
Jun
(70) |
Jul
(25) |
Aug
(67) |
Sep
(17) |
Oct
(24) |
Nov
(30) |
Dec
(30) |
| 2022 |
Jan
(51) |
Feb
(39) |
Mar
(72) |
Apr
(65) |
May
(30) |
Jun
(72) |
Jul
(129) |
Aug
(44) |
Sep
(45) |
Oct
(30) |
Nov
(48) |
Dec
(275) |
| 2023 |
Jan
(235) |
Feb
(232) |
Mar
(68) |
Apr
(16) |
May
(52) |
Jun
(87) |
Jul
(143) |
Aug
(32) |
Sep
(26) |
Oct
(15) |
Nov
(20) |
Dec
(74) |
| 2024 |
Jan
(119) |
Feb
(32) |
Mar
(64) |
Apr
(68) |
May
(30) |
Jun
(50) |
Jul
(37) |
Aug
(32) |
Sep
(10) |
Oct
(27) |
Nov
(47) |
Dec
(36) |
| 2025 |
Jan
(94) |
Feb
(68) |
Mar
(79) |
Apr
(66) |
May
(46) |
Jun
(21) |
Jul
(134) |
Aug
(134) |
Sep
(53) |
Oct
(20) |
Nov
|
Dec
|
|
From: willisbl <wil...@us...> - 2025-10-13 19:23:35
|
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 2af166fef916d440dbdc24eebea1d33d685c42e5 (commit)
from eb00d13582520edbf58aed89d2d4d7aeb9217236 (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 2af166fef916d440dbdc24eebea1d33d685c42e5
Author: Barton Willis <wi...@un...>
Date: Mon Oct 13 14:23:15 2025 -0500
Update ChangeLog for fix to bug #4614
diff --git a/ChangeLog b/ChangeLog
index cdd524a77..2c386b569 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,4 +10,5 @@ Bug fixes for numbered bugs:
* \#4607: CF issues
* \#4609: atan2(inf,inf) -> 0
* \#4613 integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi)
+ * \#4614 atan2 reflection rule
* \#4615 carg range is not in (-%pi, %pi]
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 1 +
1 file changed, 1 insertion(+)
hooks/post-receive
--
Maxima CAS
|
|
From: willisbl <wil...@us...> - 2025-10-13 19:18:52
|
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 eb00d13582520edbf58aed89d2d4d7aeb9217236 (commit)
from 50a7d7ca816b6547b873db940f34a9ced2dced43 (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 eb00d13582520edbf58aed89d2d4d7aeb9217236
Author: Barton Willis <wi...@un...>
Date: Mon Oct 13 14:18:39 2025 -0500
Fix #4614: correct atan2 reflection rule
- Fixed reflection rule conditional for atan2 in comm2.lisp
- Added new function atan2-to-atan in tlimit.lisp to convert atan2 expressions to atan expressions
- Incorporated tests from the bug report into rtest_atan2.mac
- Added additional bug report tests to rtest_limit_extra.mac
- Updated and corrected tests in rtest_trig.mac and rtest_abs_integrate.mac
Tested with SBCL 2.4.7 and Clozure CL 1.13; no unexpected failures in core or share test suites.
diff --git a/share/contrib/integration/rtest_abs_integrate.mac b/share/contrib/integration/rtest_abs_integrate.mac
index 9f79fcd7e..520d3dee4 100644
--- a/share/contrib/integration/rtest_abs_integrate.mac
+++ b/share/contrib/integration/rtest_abs_integrate.mac
@@ -551,9 +551,12 @@ radcan(subst(x=5,i) - subst(x=0,i) - integrate(sqrt(5),x,0,5));
/* abs_integrate causes stack overflow - ID: 3533723 */
integrate(log(sin(x)),x);
-x*log(sin(x)) -(x*log(sin(x)^2+cos(x)^2+2*cos(x)+1)+x*log(sin(x)^2+cos(x)^2
- -2*cos(x)+1)+2*%i*x*atan2(sin(x),cos(x)+1) -2*%i*x*atan2(sin(x),1 -cos(x))
- -2*%i*li[2](%e^(%i*x)) -2*%i*li[2]( -%e^(%i*x)) -%i*x^2)/(2)$
+x*log(sin(x))-(x*log(sin(x)^2+cos(x)^2+2*cos(x)+1)
+ +x*log(sin(x)^2+cos(x)^2-2*cos(x)+1)
+ +2*%i*x*atan2(sin(x),cos(x)+1)
+ +2*%i*x*atan2(-sin(x),1-cos(x))-%i*x^2
+ -2*%i*li[2](%e^(%i*x))-2*%i*li[2](-%e^(%i*x)))
+ /2$
/* SF bug #2557: "abs_integrate leaks assumptions into enclosing context" */
@@ -596,8 +599,12 @@ expand(integrate(x*ceiling(x)*floor(x),x));
/* see SF bug 2853*/
integrate(log(abs(sin(x))),x);
- x*log(abs(sin(x)))-(x*log(sin(x)^2+cos(x)^2+2*cos(x)+1) +x*log(sin(x)^2+cos(x)^2-2*cos(x)+1)
- +2*%i*x*atan2(sin(x),cos(x)+1) -2*%i*x*atan2(sin(x),1-cos(x))-2*%i*li[2](%e^(%i*x))-2*%i*li[2](-%e^(%i*x))-%i*x^2)/2$
+x*log(abs(sin(x)))-(x*log(sin(x)^2+cos(x)^2+2*cos(x)+1)
+ +x*log(sin(x)^2+cos(x)^2-2*cos(x)+1)
+ +2*%i*x*atan2(sin(x),cos(x)+1)
+ +2*%i*x*atan2(-sin(x),1-cos(x))-%i*x^2
+ -2*%i*li[2](%e^(%i*x))-2*%i*li[2](-%e^(%i*x)))
+ /2$
block([ans : integrate(log(abs(sin(x))),x,0,%pi/2)], [ans, expand(ans)]);
[-((6*%pi*log(2)-%i*%pi^2)/12)-(%i*%pi^2)/12,-((%pi*log(2))/2)]$
diff --git a/src/comm2.lisp b/src/comm2.lisp
index 2af9828f3..88550c7de 100644
--- a/src/comm2.lisp
+++ b/src/comm2.lisp
@@ -681,12 +681,10 @@ the hashtable.")
($logarc
(logarc '%atan2 (list ($logarc y) ($logarc x))))
;; atan2(-y,x) = -atan2(y,x) provided (a) trigsign is true, (b) (great (neg y) y), and
- ;; (c) (x,y) is off the negative real axis. The test for (x,y) off the negative
- ;; real axis should be (or (eq t (mnqp y 0)) (eq t (mgrp x 0))), but that causes
- ;; one testsuite failure, so we'll test using (or (not (eql y 0)) (eq signx '$pos)))
+ ;; (c) (x,y) is off the negative real axis.
((and $trigsign
(eq t (mminusp y))
- (or (not (eql y 0)) (eq signx '$pos)))
+ (or (eq t (mnqp y 0)) (eq t (mgrp x 0))))
(neg (ftake '%atan2 (neg y) x)))
((eq signx '$pos)
;; atan2(y,x) = atan(y/x) when x is positive.
diff --git a/src/tlimit.lisp b/src/tlimit.lisp
index ede8e7627..1c5bf916c 100644
--- a/src/tlimit.lisp
+++ b/src/tlimit.lisp
@@ -61,6 +61,23 @@
(logarc '%atan2 (list (logarc-atan2 (second e)) (logarc-atan2 (third e)))))
(t (recur-apply #'logarc-atan2 e))))
+(defun atan2-to-atan (e)
+ "In the expression `e`, replace all subexpressions of the form atan2(y,x), where y is not explicitly equal to
+ zero, by 2*atan((sqrt(x^2+y^2) - x)/y). The input `e` should be simplified--that way, the general simplifier
+ handles the error case of atan2(0,0) and many other cases as well. "
+ (cond (($mapatom e) e)
+ ((and (consp e) (eq '%atan2 (caar e)))
+ (let ((y (second e)) (x (third e)))
+ (if (zerop1 y)
+ e
+ (mul 2 (ftake '%atan (div (sub (ftake 'mexpt (add (mul x x) (mul y y)) (div 1 2)) x) y))))))
+ (($subvarp (mop e)) ;subscripted function
+ (subfunmake
+ (subfunname e)
+ (subfunsubs e) ;don't map fun onto the operator subscripts
+ (mapcar #'atan2-to-atan (subfunargs e)))) ; map onto the arguments
+ (t (fapply (caar e) (mapcar #'atan2-to-atan (cdr e))))))
+
;; Dispatch Taylor, but recurse on the order until either the recursion
;; depth reaches 15 or the Taylor polynomial is nonzero. If Taylor
;; fails to find a nonzero Taylor polynomial or the recursion depth
@@ -96,12 +113,12 @@
($taylordepth 8)
($radexpand nil)
($taylor_logexpand t)
- ($logexpand t))
+ ($logexpand nil))
(cond
((eq pt '$infinity) nil)
(t
- (setq e (logarc-atan2 e))
+ (setq e (atan2-to-atan e))
(setq ee (catch 'taylor-catch ($totaldisrep ($taylor e x pt n))))
(cond
((and ee (not (eql ee 0))) ee)
diff --git a/tests/rtest_atan2.mac b/tests/rtest_atan2.mac
index d03ed4332..e7a1cb197 100644
--- a/tests/rtest_atan2.mac
+++ b/tests/rtest_atan2.mac
@@ -244,9 +244,20 @@ integrate(sin(t)*atan2(2*sin(t),1-2*cos(t)),t,0,%pi);
integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi);
%pi^2/2$
-(kill(values),0);
+/*\#4614 atan2 reflection rule*/
+block([trigsign : true], subst([x=-1,y=0], atan2(-y,x) + atan2(y,x)));
+2*%pi$
+
+block([trigsign : true,ans],
+ assume(notequal(y,0)),
+ ans : 0,
+ forget(notequal(y,0)),
+ ans);
0$
+(kill(values),0);
+0$
+
facts();
[]$
diff --git a/tests/rtest_limit_extra.mac b/tests/rtest_limit_extra.mac
index ef74f8c33..56c32a3d0 100644
--- a/tests/rtest_limit_extra.mac
+++ b/tests/rtest_limit_extra.mac
@@ -1422,11 +1422,12 @@ log(tan(x)^2+1)+2*%i*li[2](-((%i*((%i+1)*tan(x)+%i-1))/2))+2*%i*li[2](%i*tan(x)+
-2*%i*li[2](-((%i*((%i-1)*tan(x)+%i+1))/2))-4*x*log(tan(x)))/4, 0);
0$
-limit(xxx,x,%pi/4,'minus);
- (4*%i*log(2)*log(sqrt(2)*%i+sqrt(2))-4*%i*log(2)^2+%pi*log(2)+8*%catalan)/8$
+/* see \#4614 atan2 reflection rule*/
+[trigsimp(block([trigsign : false], limit(xxx,x,%pi/4,'minus))), block([trigsign : true], limit(xxx,x,%pi/4,'minus))];
+[%catalan,%catalan]$
-limit(xxx,x,%pi/4,'plus);
--((4*%i*log(2)*log(sqrt(2)*%i-sqrt(2))-4*%i*log(2)^2-%pi*log(2)-2*%i*%pi^2-8*%catalan)/8)$
+[block([trigsign : false], limit(xxx,x,%pi/4,'plus)), block([trigsign : true], limit(xxx,x,%pi/4,'plus))];
+[-((-(4*%pi*log(2))-2*%i*%pi^2-8*%catalan)/8), -((-(4*%pi*log(2))-2*%i*%pi^2-8*%catalan)/8)]$
(remvalue(xxx),0);
0$
diff --git a/tests/rtest_trig.mac b/tests/rtest_trig.mac
index f32ebb373..29ce548f6 100644
--- a/tests/rtest_trig.mac
+++ b/tests/rtest_trig.mac
@@ -615,14 +615,19 @@ done;
acoth (x);
/* SF bug #2620: "atan2(y,x)+atan2(-y,x) doesn't always return 0 " */
+block([ans,trigsign : true],
+ kill(x,y),
+ assume(notequal(y,0)),
+ ans : atan2(y,x)+atan2(-y,x),
+ forget(notequal(y,0)),
+ ans);
+0$
-(kill (x, y), atan2(y,x)+atan2(-y,x));
-0;
-(assume (y > 0), atan2(y,x)+atan2(-y,x));
+(assume (y > 0), block([trigsign : true], atan2(y,x)+atan2(-y,x)));
0;
-(kill (n, p, r), forget (y > 0), assume(n<0,p>0), atan2 (- x, r));
+(kill (n, p, r), forget (y > 0), assume(n<0,p>0, notequal(x,0)), atan2 (- x, r));
- atan2 (x, r);
atan2 (-n, r);
@@ -631,8 +636,8 @@ atan2 (-n, r);
atan2 (-p, r);
- atan2 (p, r);
-forget (n < 0, p > 0);
-[n < 0, p > 0];
+forget (n < 0, p > 0,notequal(x,0));
+[n < 0, p > 0,notequal(x,0)];
/* mailing list 2017-11-27: "trigsimp fails with pderivop" */
-----------------------------------------------------------------------
Summary of changes:
share/contrib/integration/rtest_abs_integrate.mac | 17 ++++++++++++-----
src/comm2.lisp | 6 ++----
src/tlimit.lisp | 21 +++++++++++++++++++--
tests/rtest_atan2.mac | 13 ++++++++++++-
tests/rtest_limit_extra.mac | 9 +++++----
tests/rtest_trig.mac | 17 +++++++++++------
6 files changed, 61 insertions(+), 22 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-10-12 22:06:31
|
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 50a7d7ca816b6547b873db940f34a9ced2dced43 (commit)
from 66001dab3be0640192eb470ace3f304536380c65 (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 50a7d7ca816b6547b873db940f34a9ced2dced43
Author: Robert Dodier <rob...@so...>
Date: Sun Oct 12 15:05:55 2025 -0700
Add a test case for SF #3795: "incorrect integration"
Bug already fixed by commit 4d8e30.
diff --git a/tests/rtest10.mac b/tests/rtest10.mac
index 6acd000ab..ca63fc2c5 100644
--- a/tests/rtest10.mac
+++ b/tests/rtest10.mac
@@ -220,3 +220,13 @@ integrate(f,x,-1,1);
(integrate(f, x),
ratsimp (demoivre (%%)));
0;
+
+/* SF bug #3795: "incorrect integration" */
+
+block ([a, g, h],
+ kill (x, y),
+ a: sin((x-y)/sqrt(2))*(x-y),
+ g: integrate(a,y),
+ h: diff(g,y),
+ expand (ratsimp (h - a)));
+0;
-----------------------------------------------------------------------
Summary of changes:
tests/rtest10.mac | 10 ++++++++++
1 file changed, 10 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-10-12 17:28:54
|
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, dodier-matrix-and-box-display-flags has been deleted
was 6d68ba3bc91e5c7261159b0ce9a891141e3ef955
- Log -----------------------------------------------------------------
6d68ba3bc91e5c7261159b0ce9a891141e3ef955 Commit new script test_matrix_display.mac to test display flags for matrix and box.
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-10-12 16:53:57
|
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 66001dab3be0640192eb470ace3f304536380c65 (commit)
via 9b17dd530c6b371a6ca94d1d9648d3fed1e347f8 (commit)
via 9eb0dcdddbadb95590dc200c1ddd33992ef28aa4 (commit)
via e8eaabacc55cb2f7a8bfc2fb9320b752e94f168a (commit)
via 7bea89b3f84f87adf76cdc7c21a5770e0afec20f (commit)
from 99a82633cbfdf84489a1d02ee55045f527361c29 (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 66001dab3be0640192eb470ace3f304536380c65
Author: Robert Dodier <rob...@so...>
Date: Sun Oct 12 09:19:04 2025 -0700
In 2-d display for derivatives, correct depth of denominator in Leibniz notation.
diff --git a/src/displa.lisp b/src/displa.lisp
index 5eb62a013..b545d2b52 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -744,7 +744,7 @@
'mparen 'mparen nil 0))
(t (dimension-superscript
(cons '(diff) l) (cons #\d (cons #\space den)))))
- w2 (+ 2 w2 width) h2 (max h2 height) d2 (+ d2 depth)))
+ w2 (+ 2 w2 width) h2 (max h2 height) d2 (max d2 depth)))
(setq num (nformat-check (addn num t)))
(cond ((equal 1 num) (setq num (list #\d) w1 1 h1 1 d1 0))
(t (setq num (dimension-superscript (list '(diff) #\d num) nil)
diff --git a/tests/rtest_unicode_display.mac b/tests/rtest_unicode_display.mac
index f43100f6a..1ba7d8a8c 100644
--- a/tests/rtest_unicode_display.mac
+++ b/tests/rtest_unicode_display.mac
@@ -949,12 +949,10 @@ print_string_2d_unicode(matrix(ee2));
" ┌ ┐
│ 6 │
│ d │
- │ ─────────── (h(u , v , w )) │
- Col 1 = │ 3 2 i j k │
+ Col 1 = │ ─────────── (h(u , v , w )) │
+ │ 3 2 i j k │
│ du dv dw │
│ i j k │
- │ │
- │ │
└ ┘
┌ ┐ ┌ ┐
│ │ │ │ │ 1 │ │
@@ -1010,8 +1008,6 @@ print_string_2d_unicode(transpose(matrix(ee2)));
│ du dv dw │
│ i j k │
│ │
-│ │
-│ │
│ │ │
│ 1 │ │
│ ───────────│ │
@@ -1351,3 +1347,105 @@ block ([linel: 140], print_string_2d_unicode (matrix (ee1, ee2, ee4, ee5)));
│ i j │
└ ┘
";
+
+print_string_2d_unicode (foo: diff(f[i[j[k[l]]]](x[i], y[j[k[l]]], z[m]), x[i], 2^n, y[j[k[l]]], 2^(m^n), z[m], 1));
+" n
+ n m
+ 2 + 2 + 1
+d
+────────────── (f (x , y , z ))
+ n i i j m
+ n m j k
+ 2 2 k l
+dx dy dz l
+ i j m
+ k
+ l
+";
+
+print_string_2d_unicode (box (foo));
+"╔════════════════════════════════════╗
+║ n ║
+║ n m ║
+║ 2 + 2 + 1 ║
+║d ║
+║────────────── (f (x , y , z ))║
+║ n i i j m ║
+║ n m j k ║
+║ 2 2 k l ║
+║dx dy dz l ║
+║ i j m ║
+║ k ║
+║ l ║
+╚════════════════════════════════════╝
+";
+
+print_string_2d_unicode (baz: diff(f[i[j[k[l]]]](x, y, z), x, 1, y, 1, z, 1));
+" 3
+ d
+──────── (f (x, y, z))
+dx dy dz i
+ j
+ k
+ l
+";
+
+print_string_2d_unicode (box (baz));
+"╔═════════════════════════╗
+║ 3 ║
+║ d ║
+║──────── (f (x, y, z))║
+║dx dy dz i ║
+║ j ║
+║ k ║
+║ l ║
+╚═════════════════════════╝
+";
+
+print_string_2d_unicode (quux: baz/(1 - foo));
+" 3
+ d
+ ──────── (f (x, y, z))
+ dx dy dz i
+ j
+ k
+ l
+────────────────────────────────────────
+ n
+ n m
+ 2 + 2 + 1
+ d
+1 - ────────────── (f (x , y , z ))
+ n i i j m
+ n m j k
+ 2 2 k l
+ dx dy dz l
+ i j m
+ k
+ l
+";
+
+print_string_2d_unicode (box (quux));
+"╔════════════════════════════════════════╗
+║ 3 ║
+║ d ║
+║ ──────── (f (x, y, z)) ║
+║ dx dy dz i ║
+║ j ║
+║ k ║
+║ l ║
+║────────────────────────────────────────║
+║ n ║
+║ n m ║
+║ 2 + 2 + 1 ║
+║ d ║
+║1 - ────────────── (f (x , y , z ))║
+║ n i i j m ║
+║ n m j k ║
+║ 2 2 k l ║
+║ dx dy dz l ║
+║ i j m ║
+║ k ║
+║ l ║
+╚════════════════════════════════════════╝
+";
commit 9b17dd530c6b371a6ca94d1d9648d3fed1e347f8
Author: Robert Dodier <rob...@so...>
Date: Wed Oct 8 21:01:55 2025 -0700
Commit new script test_matrix_display.mac to test display flags for matrix and box.
test_matrix_display.mac is a script to be executed by batch or load;
it is not arranged in expression, expected result pairs.
diff --git a/tests/test_matrix_display.mac b/tests/test_matrix_display.mac
new file mode 100644
index 000000000..d20617023
--- /dev/null
+++ b/tests/test_matrix_display.mac
@@ -0,0 +1,145 @@
+/* test_matrix_display.mac
+ * copyright 2025 by Robert Dodier
+ * I release this work under terms of the GNU General Public License, version 2.
+ *
+ * Tell Maxima to process this file with batch or load;
+ * e.g.: maxima --batch test_matrix_display.mac
+ * or: maxima --preload test_matrix_display.mac
+ * Optionally see the various matrix expressions again
+ * via ''values; afterwards.
+ */
+
+hh(m,n):=genmatrix(lambda([i,j],1/(i+j-1)),m,n);
+foo(n):= flatten ([ makelist ([ hh(k,n), hh(n,k) ], k, 1, n - 1), hh(n,n) ]);
+
+distribute_over: false;
+
+foo1: foo(1);
+foo2: foo(2);
+foo3: foo(3);
+foo4: foo(4);
+foo5: foo(5);
+
+abs_foo1: map (abs, foo1);
+abs_foo2: map (abs, foo2);
+abs_foo3: map (abs, foo3);
+abs_foo4: map (abs, foo4);
+abs_foo5: map (abs, foo5);
+
+det_foo1: map (nounify (determinant), foo1);
+det_foo2: map (nounify (determinant), foo2);
+det_foo3: map (nounify (determinant), foo3);
+det_foo4: map (nounify (determinant), foo4);
+det_foo5: map (nounify (determinant), foo5);
+
+recip_abs_foo1: map (lambda ([x], x/(1 + abs(x))), foo1);
+recip_abs_foo2: map (lambda ([x], x/(1 + abs(x))), foo2);
+recip_abs_foo3: map (lambda ([x], x/(1 + abs(x))), foo3);
+recip_abs_foo4: map (lambda ([x], x/(1 + abs(x))), foo4);
+recip_abs_foo5: map (lambda ([x], x/(1 + abs(x))), foo5);
+
+box_foo1: map (box, foo1);
+box_foo2: map (box, foo2);
+box_foo3: map (box, foo3);
+box_foo4: map (box, foo4);
+box_foo5: map (box, foo5);
+
+recip_box_abs_foo1: map (lambda ([x], x/(1 + box (abs(x)))), foo1);
+recip_box_abs_foo2: map (lambda ([x], x/(1 + box (abs(x)))), foo2);
+recip_box_abs_foo3: map (lambda ([x], x/(1 + box (abs(x)))), foo3);
+recip_box_abs_foo4: map (lambda ([x], x/(1 + box (abs(x)))), foo4);
+recip_box_abs_foo5: map (lambda ([x], x/(1 + box (abs(x)))), foo5);
+
+recip_abs_box_foo1: map (lambda ([x], x/(1 + abs (box(x)))), foo1);
+recip_abs_box_foo2: map (lambda ([x], x/(1 + abs (box(x)))), foo2);
+recip_abs_box_foo3: map (lambda ([x], x/(1 + abs (box(x)))), foo3);
+recip_abs_box_foo4: map (lambda ([x], x/(1 + abs (box(x)))), foo4);
+recip_abs_box_foo5: map (lambda ([x], x/(1 + abs (box(x)))), foo5);
+
+display_matrix_brackets: false;
+display_box_double_lines: false;
+
+foo1;
+foo2;
+foo3;
+foo4;
+foo5;
+
+abs_foo1;
+abs_foo2;
+abs_foo3;
+abs_foo4;
+abs_foo5;
+
+det_foo1;
+det_foo2;
+det_foo3;
+det_foo4;
+det_foo5;
+
+recip_abs_foo1;
+recip_abs_foo2;
+recip_abs_foo3;
+recip_abs_foo4;
+recip_abs_foo5;
+
+box_foo1;
+box_foo2;
+box_foo3;
+box_foo4;
+box_foo5;
+
+recip_box_abs_foo1;
+recip_box_abs_foo2;
+recip_box_abs_foo3;
+recip_box_abs_foo4;
+recip_box_abs_foo5;
+
+recip_abs_box_foo1;
+recip_abs_box_foo2;
+recip_abs_box_foo3;
+recip_abs_box_foo4;
+recip_abs_box_foo5;
+
+print (foo1) $
+print (foo2) $
+print (foo3) $
+print (foo4) $
+print (foo5) $
+
+print (abs_foo1) $
+print (abs_foo2) $
+print (abs_foo3) $
+print (abs_foo4) $
+print (abs_foo5) $
+
+print (det_foo1) $
+print (det_foo2) $
+print (det_foo3) $
+print (det_foo4) $
+print (det_foo5) $
+
+print (recip_abs_foo1) $
+print (recip_abs_foo2) $
+print (recip_abs_foo3) $
+print (recip_abs_foo4) $
+print (recip_abs_foo5) $
+
+print (box_foo1) $
+print (box_foo2) $
+print (box_foo3) $
+print (box_foo4) $
+print (box_foo5) $
+
+print (recip_box_abs_foo1) $
+print (recip_box_abs_foo2) $
+print (recip_box_abs_foo3) $
+print (recip_box_abs_foo4) $
+print (recip_box_abs_foo5) $
+
+print (recip_abs_box_foo1) $
+print (recip_abs_box_foo2) $
+print (recip_abs_box_foo3) $
+print (recip_abs_box_foo4) $
+print (recip_abs_box_foo5) $
+
commit 9eb0dcdddbadb95590dc200c1ddd33992ef28aa4
Author: Robert Dodier <rob...@so...>
Date: Tue Oct 7 23:18:00 2025 -0700
New flag display_determinant_bars; when true, display determinant of a literal matrix with a bar on either side,
otherwise as an ordinary function call. Default is display_determinant_bars = true.
Has the advertised effect whether display2d_unicode is enabled or disabled.
diff --git a/doc/info/Matrices.texi.m4 b/doc/info/Matrices.texi.m4
index 84b42a8d3..4a4792ecc 100644
--- a/doc/info/Matrices.texi.m4
+++ b/doc/info/Matrices.texi.m4
@@ -578,12 +578,35 @@ The form of the result depends upon the setting of the switch @mrefdot{ratmx}
There is a special routine for computing sparse determinants which is called
when the switches @code{ratmx} and @mref{sparse} are both @code{true}.
+@code{display_determinant_bars} governs the display of determinants.
+
@c EXAMPLES NEEDED HERE
@opencatbox{Categories:}
@category{Matrices}
@closecatbox
@end deffn
+@c -----------------------------------------------------------------------------
+@anchor{display_determinant_bars}
+@defvr {Option variable} display_determinant_bars
+Default value: @code{true}
+
+When @code{display_determinant_bars} is @code{true},
+a determinant noun expression which has a literal matrix as its sole argument
+is displayed with a vertical bar on either side.
+
+Otherwise, @code{display_determinant_bars} is @code{false},
+or the determinant is not a noun expression,
+or its argument is not a literal matrix;
+in these cases, the expression is displayed as an ordinary function call.
+
+@opencatbox{Categories:}
+@category{Display flags and variables}
+@category{Matrices}
+@closecatbox
+
+@end defvr
+
@c -----------------------------------------------------------------------------
@anchor{detout}
@defvr {Option variable} detout
diff --git a/src/displa.lisp b/src/displa.lisp
index f02e385d7..5eb62a013 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1269,6 +1269,17 @@
collect (list '(mequal) (format nil " Col ~d" k) ($col form k))))
result ""))
+(displa-def %determinant dim-determinant)
+
+(defmvar $display_determinant_bars t)
+
+(defun dim-determinant (form result)
+ (let ((a (rest form)))
+ (if (and $display_determinant_bars (= (length a) 1) ($matrixp (first a)))
+ (let ($display_matrix_brackets)
+ (dim-mabs `((mabs) ,(first a)) result))
+ (dimension-function form result))))
+
(displa-def mbox dim-mbox)
(displa-def %mbox dim-mbox)
commit e8eaabacc55cb2f7a8bfc2fb9320b752e94f168a
Author: Robert Dodier <rob...@so...>
Date: Tue Oct 7 21:18:59 2025 -0700
New flag display_matrix_brackets; when true, display matrices with a bracket on either side,
otherwise without brackets. Default is display_matrix_brackets = true.
Has the advertised effect whether display2d_unicode is enabled or disabled.
diff --git a/doc/info/Matrices.texi.m4 b/doc/info/Matrices.texi.m4
index 0879b35fb..84b42a8d3 100644
--- a/doc/info/Matrices.texi.m4
+++ b/doc/info/Matrices.texi.m4
@@ -1580,6 +1580,25 @@ Example:
@closecatbox
@end defvr
+@c -----------------------------------------------------------------------------
+@anchor{display_matrix_brackets}
+@deffn {Option variable} display_matrix_brackets
+Default value: @code{true}
+
+When @code{display_matrix_brackets} is @code{true},
+matrices are displayed with brackets (square braces) to the left and right.
+
+When @code{display_matrix_brackets} is @code{false},
+matrices are not displayed with brackets;
+only the matrix elements are displayed.
+
+@opencatbox{Categories:}
+@category{Matrices}
+@category{Display flags and variables}
+@closecatbox
+
+@end deffn
+
@c -----------------------------------------------------------------------------
@anchor{matrix}
@deffn {Function} matrix (@var{row_1}, @dots{}, @var{row_n})
@@ -1624,6 +1643,8 @@ See @mrefcomma{eigenvalues} @mrefcomma{eigenvectors} @mrefcomma{determinant}@w{}
@mrefcomma{echelon} and @mrefdot{rank}
@c CHECK -- WE PROBABLY WANT EXHAUSTIVE LIST HERE
+@mref{display_matrix_brackets} governs the display of matrices.
+
Examples:
@itemize @bullet
diff --git a/src/displa.lisp b/src/displa.lisp
index 79ac08ff4..f02e385d7 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1200,6 +1200,8 @@
(displa-def $matrix dim-$matrix)
(displa-def %matrix dim-$matrix)
+(defmvar $display_matrix_brackets t)
+
(defun dim-$matrix (form result)
(prog (dmstr rstr cstr consp cols)
(setq cols (if ($listp (cadr form)) (length (cadr form)) 0))
@@ -1235,13 +1237,13 @@
(if (> (+ height depth) (length linearray))
(setq consp t))
(return
- (cond ((and (not consp) (checkfit (+ 2 width)))
+ (cond ((and (not consp) (checkfit (if $display_matrix_brackets (+ 2 width) width)))
(matout dmstr cstr rstr result))
((and (not consp) (<= level 2)) (colout form result))
(t (dimension-function form result))))))
(defun matout (dmstr cstr rstr result)
- (push `(d-matrix left ,height ,depth) result)
+ (when $display_matrix_brackets (push `(d-matrix left ,height ,depth) result))
(push #\space result)
(do ((d dmstr (cdr d)) (c cstr (cdr c)) (w 0 0))
((null d))
@@ -1251,10 +1253,13 @@
(setq w (truncate (+ (car c) (caar d)) 2))
(rplaca d (cdar d)))
(setq result (cons (list (+ 2 (- (car c) w)) 0) (nreconc (car d) result))))
- (setq width (+ 2 width))
+ (if $display_matrix_brackets
+ (setq width (+ 2 width))
+ (when $display2d_unicode
+ (setq height (1- height) depth (1- depth))))
(update-heights height depth)
(rplaca (car result) (1- (caar result)))
- (push `(d-matrix right ,height ,depth) result)
+ (when $display_matrix_brackets (push `(d-matrix right ,height ,depth) result))
result)
(defun colout (form result)
@@ -1492,12 +1497,17 @@
;; Block mode i/o isn't needed since PRINC is used instead of WRITE-CHAR and
;; CURSORPOS.
-(defun output-linear (result w)
+(defun output-linear (result w &aux i0)
(draw-linear result bkptdp w)
(do ((i (1- (+ bkptht bkptdp)) (1- i)))
((< i 0))
- (cond ((null (aref linearray i)))
- (t (output-linear-one-line i)))))
+ (cond
+ ((and (null i0) (null (aref linearray i))))
+ (t
+ (when (null i0) (setq i0 i))
+ (if (null (aref linearray i))
+ (mterpri)
+ (output-linear-one-line i))))))
(defun output-linear-one-line (i)
(prog (line (n 0))
commit 7bea89b3f84f87adf76cdc7c21a5770e0afec20f
Author: Robert Dodier <rob...@so...>
Date: Sun Oct 5 13:14:25 2025 -0700
New flag display_box_double_lines; when true, display box expressions with double-line characters, otherwise single-line.
Only affects display when display2d_unicode is true.
diff --git a/doc/info/Expressions.texi b/doc/info/Expressions.texi
index 463fef986..eb4207467 100644
--- a/doc/info/Expressions.texi
+++ b/doc/info/Expressions.texi
@@ -474,6 +474,25 @@ unbound).
@closecatbox
@end deffn
+@c -----------------------------------------------------------------------------
+@anchor{display_box_double_lines}
+@defvr {Option variable} display_box_double_lines
+Default value: @code{true}
+
+When @code{display_box_double_lines} is @code{true},
+@code{box} expressions are displayed with Unicode double-line characters.
+
+When @code{display_box_double_lines} is @code{false},
+@code{box} expressions are displayed with Unicode single-line characters.
+
+@code{display_box_double_lines} only has any effect when @code{display2d_unicode} is @code{true}.
+
+@opencatbox{Categories:}
+@category{Expressions}
+@category{Display flags and variables}
+@closecatbox
+@end defvr
+
@c -----------------------------------------------------------------------------
@anchor{box}
@deffn {Function} box @
@@ -495,7 +514,7 @@ computations. @mref{rembox} removes the box again.
@mref{boxchar} is the character used to draw the box in @code{box} and in the
@mref{dpart} and @mref{lpart} functions.
-See also @mrefcomma{rembox} @mref{dpart} and @mrefdot{lpart}
+See also @mrefcomma{rembox} @mrefcomma{dpart} @mrefcomma{lpart} and @mrefdot{display_box_double_lines}
Examples:
diff --git a/src/displa.lisp b/src/displa.lisp
index f77080fc1..79ac08ff4 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1284,7 +1284,21 @@
(dim-mlabox-unicode form result)
(dim-mlabox-ascii form result)))
+(defmvar $display_box_double_lines t)
+
(defun dim-mlabox-unicode (form result)
+ (if $display_box_double_lines
+ (dim-mlabox-unicode-default form result)
+ (let
+ ((*d-box-char-unicode-horz* (get-unicode-char :box-drawings-light-horizontal))
+ (*d-box-char-unicode-vert* (get-unicode-char :box-drawings-light-vertical))
+ (*d-box-char-unicode-upper-left* (get-unicode-char :box-drawings-light-down-and-right))
+ (*d-box-char-unicode-upper-right* (get-unicode-char :box-drawings-light-down-and-left))
+ (*d-box-char-unicode-lower-right* (get-unicode-char :box-drawings-light-up-and-left))
+ (*d-box-char-unicode-lower-left* (get-unicode-char :box-drawings-light-up-and-right)))
+ (dim-mlabox-unicode-default form result))))
+
+(defun dim-mlabox-unicode-default (form result)
(prog (dummy)
(setq dummy (dimension (cadr form) nil 'mparen 'mparen nil 0))
(cond ((not (checkfit (+ 2 width)))
@@ -1680,7 +1694,19 @@
(d-box-unicode h d w body)
(d-box-ascii h d w body)))
-(defun d-box-unicode (h d w body &aux dmstr)
+(defun d-box-unicode (h d w body)
+ (if $display_box_double_lines
+ (d-box-unicode-default h d w body)
+ (let
+ ((*d-box-char-unicode-horz* (get-unicode-char :box-drawings-light-horizontal))
+ (*d-box-char-unicode-vert* (get-unicode-char :box-drawings-light-vertical))
+ (*d-box-char-unicode-upper-left* (get-unicode-char :box-drawings-light-down-and-right))
+ (*d-box-char-unicode-upper-right* (get-unicode-char :box-drawings-light-down-and-left))
+ (*d-box-char-unicode-lower-right* (get-unicode-char :box-drawings-light-up-and-left))
+ (*d-box-char-unicode-lower-left* (get-unicode-char :box-drawings-light-up-and-right)))
+ (d-box-unicode-default h d w body))))
+
+(defun d-box-unicode-default (h d w body &aux dmstr)
(setq dmstr `((0 ,h ,*d-box-char-unicode-upper-right* (d-hbar ,w ,*d-box-char-unicode-horz*) ,*d-box-char-unicode-upper-left*)
(,(- (+ w 2)) 0)
(d-vbar ,h ,d ,*d-box-char-unicode-vert*)
-----------------------------------------------------------------------
Summary of changes:
doc/info/Expressions.texi | 21 +++++-
doc/info/Matrices.texi.m4 | 44 ++++++++++++
src/displa.lisp | 65 +++++++++++++++---
tests/rtest_unicode_display.mac | 110 ++++++++++++++++++++++++++++--
tests/test_matrix_display.mac | 145 ++++++++++++++++++++++++++++++++++++++++
5 files changed, 369 insertions(+), 16 deletions(-)
create mode 100644 tests/test_matrix_display.mac
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-10-09 04:02:55
|
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, dodier-matrix-and-box-display-flags has been updated
via 6d68ba3bc91e5c7261159b0ce9a891141e3ef955 (commit)
from 3259c88b35fb60411a7fa77d6ebb576839270bf7 (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 6d68ba3bc91e5c7261159b0ce9a891141e3ef955
Author: Robert Dodier <rob...@so...>
Date: Wed Oct 8 21:01:55 2025 -0700
Commit new script test_matrix_display.mac to test display flags for matrix and box.
test_matrix_display.mac is a script to be executed by batch or load;
it is not arranged in expression, expected result pairs.
diff --git a/tests/test_matrix_display.mac b/tests/test_matrix_display.mac
new file mode 100644
index 000000000..d20617023
--- /dev/null
+++ b/tests/test_matrix_display.mac
@@ -0,0 +1,145 @@
+/* test_matrix_display.mac
+ * copyright 2025 by Robert Dodier
+ * I release this work under terms of the GNU General Public License, version 2.
+ *
+ * Tell Maxima to process this file with batch or load;
+ * e.g.: maxima --batch test_matrix_display.mac
+ * or: maxima --preload test_matrix_display.mac
+ * Optionally see the various matrix expressions again
+ * via ''values; afterwards.
+ */
+
+hh(m,n):=genmatrix(lambda([i,j],1/(i+j-1)),m,n);
+foo(n):= flatten ([ makelist ([ hh(k,n), hh(n,k) ], k, 1, n - 1), hh(n,n) ]);
+
+distribute_over: false;
+
+foo1: foo(1);
+foo2: foo(2);
+foo3: foo(3);
+foo4: foo(4);
+foo5: foo(5);
+
+abs_foo1: map (abs, foo1);
+abs_foo2: map (abs, foo2);
+abs_foo3: map (abs, foo3);
+abs_foo4: map (abs, foo4);
+abs_foo5: map (abs, foo5);
+
+det_foo1: map (nounify (determinant), foo1);
+det_foo2: map (nounify (determinant), foo2);
+det_foo3: map (nounify (determinant), foo3);
+det_foo4: map (nounify (determinant), foo4);
+det_foo5: map (nounify (determinant), foo5);
+
+recip_abs_foo1: map (lambda ([x], x/(1 + abs(x))), foo1);
+recip_abs_foo2: map (lambda ([x], x/(1 + abs(x))), foo2);
+recip_abs_foo3: map (lambda ([x], x/(1 + abs(x))), foo3);
+recip_abs_foo4: map (lambda ([x], x/(1 + abs(x))), foo4);
+recip_abs_foo5: map (lambda ([x], x/(1 + abs(x))), foo5);
+
+box_foo1: map (box, foo1);
+box_foo2: map (box, foo2);
+box_foo3: map (box, foo3);
+box_foo4: map (box, foo4);
+box_foo5: map (box, foo5);
+
+recip_box_abs_foo1: map (lambda ([x], x/(1 + box (abs(x)))), foo1);
+recip_box_abs_foo2: map (lambda ([x], x/(1 + box (abs(x)))), foo2);
+recip_box_abs_foo3: map (lambda ([x], x/(1 + box (abs(x)))), foo3);
+recip_box_abs_foo4: map (lambda ([x], x/(1 + box (abs(x)))), foo4);
+recip_box_abs_foo5: map (lambda ([x], x/(1 + box (abs(x)))), foo5);
+
+recip_abs_box_foo1: map (lambda ([x], x/(1 + abs (box(x)))), foo1);
+recip_abs_box_foo2: map (lambda ([x], x/(1 + abs (box(x)))), foo2);
+recip_abs_box_foo3: map (lambda ([x], x/(1 + abs (box(x)))), foo3);
+recip_abs_box_foo4: map (lambda ([x], x/(1 + abs (box(x)))), foo4);
+recip_abs_box_foo5: map (lambda ([x], x/(1 + abs (box(x)))), foo5);
+
+display_matrix_brackets: false;
+display_box_double_lines: false;
+
+foo1;
+foo2;
+foo3;
+foo4;
+foo5;
+
+abs_foo1;
+abs_foo2;
+abs_foo3;
+abs_foo4;
+abs_foo5;
+
+det_foo1;
+det_foo2;
+det_foo3;
+det_foo4;
+det_foo5;
+
+recip_abs_foo1;
+recip_abs_foo2;
+recip_abs_foo3;
+recip_abs_foo4;
+recip_abs_foo5;
+
+box_foo1;
+box_foo2;
+box_foo3;
+box_foo4;
+box_foo5;
+
+recip_box_abs_foo1;
+recip_box_abs_foo2;
+recip_box_abs_foo3;
+recip_box_abs_foo4;
+recip_box_abs_foo5;
+
+recip_abs_box_foo1;
+recip_abs_box_foo2;
+recip_abs_box_foo3;
+recip_abs_box_foo4;
+recip_abs_box_foo5;
+
+print (foo1) $
+print (foo2) $
+print (foo3) $
+print (foo4) $
+print (foo5) $
+
+print (abs_foo1) $
+print (abs_foo2) $
+print (abs_foo3) $
+print (abs_foo4) $
+print (abs_foo5) $
+
+print (det_foo1) $
+print (det_foo2) $
+print (det_foo3) $
+print (det_foo4) $
+print (det_foo5) $
+
+print (recip_abs_foo1) $
+print (recip_abs_foo2) $
+print (recip_abs_foo3) $
+print (recip_abs_foo4) $
+print (recip_abs_foo5) $
+
+print (box_foo1) $
+print (box_foo2) $
+print (box_foo3) $
+print (box_foo4) $
+print (box_foo5) $
+
+print (recip_box_abs_foo1) $
+print (recip_box_abs_foo2) $
+print (recip_box_abs_foo3) $
+print (recip_box_abs_foo4) $
+print (recip_box_abs_foo5) $
+
+print (recip_abs_box_foo1) $
+print (recip_abs_box_foo2) $
+print (recip_abs_box_foo3) $
+print (recip_abs_box_foo4) $
+print (recip_abs_box_foo5) $
+
-----------------------------------------------------------------------
Summary of changes:
tests/test_matrix_display.mac | 145 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 145 insertions(+)
create mode 100644 tests/test_matrix_display.mac
hooks/post-receive
--
Maxima CAS
|
|
From: willisbl <wil...@us...> - 2025-10-08 13:34:53
|
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 99a82633cbfdf84489a1d02ee55045f527361c29 (commit)
from 18eec5aa0ba897844f4136d32b18161413457d13 (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 99a82633cbfdf84489a1d02ee55045f527361c29
Author: Barton Willis <wi...@un...>
Date: Wed Oct 8 08:34:41 2025 -0500
Append tests from \#3183 %i * 3^%i/2^%i; does not consistently simplify
No unexpected testsuite or share testsuite failures with either Clozure 1.13 or SBCL 2.4.7
diff --git a/tests/rtest_great.mac b/tests/rtest_great.mac
index 040b8c31c..2dea453ee 100644
--- a/tests/rtest_great.mac
+++ b/tests/rtest_great.mac
@@ -85,6 +85,38 @@ block([ans1,ans2,ans3],
[ans1,ans2,ans3]);
[a*b+a^^7+%e^(a . b),a*b+a^^7+%e^(a . b),a*b+a^^7+%e^(a . b)]$
+/* \#3183 %i * 3^%i/2^%i; does not consistently simplify*/
+
+block([e0 : ((0.23665921047828*%i+0.7345467111924259)*(0.4980156681183566*%i-0.15494982830181)*1.5^%i*cosh(%pi))
+ /2^%i, e1,e2],
+ e1 : expand(e0,0,0),
+ e2 : expand(e1,0,0),
+ outermap(lambda([a,b], is(a=b)),[e0,e1,e2],[e0,e1,e2]));
+[[true, true, true], [true, true, true], [true, true, true]]$
+
+block([e0 : %i * 3^%i/2^%i, e1, e2, e3],
+ e1 : 1*e0,
+ e2 : 1*e1,
+ e3 : 1*e2,
+ outermap(lambda([a,b], is(a=b)),[e0,e1,e2,e3],[e0,e1,e2,e3]));
+[[true, true, true, true], [true, true, true, true], [true, true, true, true], [true, true, true, true]]$
+
+block([EY,ans], declare(K,constant),
+ EY: 1/2^K+K+3^K,
+ ans : [EY-EY,(-EY) - (-EY)],
+ remove(K,constant),
+ ans);
+[0,0]$
+
+block([a,b,c,d,M,L,ans],
+ [a, b, c, d] : [3, M, M^3, 3^M],
+ L : powerset ({a, b, c, d}, 2),
+ declare (M, constant),
+ ans : maplist (lambda ([p], ?great (first(p), second(p))), L),
+ remove(M,constant),
+ ans);
+[false, false, false, false, false, false]$
+
/* Did we make a mess? Let's clean it up!*/
(remvalue(L),remvalue(bad),remove(z,complex), reset(domain), 0);
0$
-----------------------------------------------------------------------
Summary of changes:
tests/rtest_great.mac | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: villate <vi...@us...> - 2025-10-08 07:41:23
|
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 18eec5aa0ba897844f4136d32b18161413457d13 (commit)
from a1f3142a29d967cc52ed5e08284118b43c3ec34c (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 18eec5aa0ba897844f4136d32b18161413457d13
Author: villate <vi...@fe...>
Date: Wed Oct 8 08:40:46 2025 +0100
Updates the list of fixed bugs.
diff --git a/ChangeLog b/ChangeLog
index 6e304614a..cdd524a77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@ Maxima 5.48-post change log
Bug fixes for numbered bugs:
----------------------------
* \#3750: Quoting atan2 inhibits simplification
+ * \#4383: great not transitive (so simplifya not idempotent)
+ * \#4577: Update CSS for examples and nav bar
+ * \#4601: 5.48 regression in spherical_bessel_j integral
+ * \#4607: CF issues
* \#4609: atan2(inf,inf) -> 0
* \#4613 integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi)
- * \#4615 carg range is not in (-%pi, %pi]
\ No newline at end of file
+ * \#4615 carg range is not in (-%pi, %pi]
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-10-08 06:23:53
|
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, dodier-matrix-and-box-display-flags has been created
at 3259c88b35fb60411a7fa77d6ebb576839270bf7 (commit)
- Log -----------------------------------------------------------------
commit 3259c88b35fb60411a7fa77d6ebb576839270bf7
Author: Robert Dodier <rob...@so...>
Date: Tue Oct 7 23:18:00 2025 -0700
New flag display_determinant_bars; when true, display determinant of a literal matrix with a bar on either side,
otherwise as an ordinary function call. Default is display_determinant_bars = true.
Has the advertised effect whether display2d_unicode is enabled or disabled.
diff --git a/doc/info/Matrices.texi.m4 b/doc/info/Matrices.texi.m4
index 84b42a8d3..4a4792ecc 100644
--- a/doc/info/Matrices.texi.m4
+++ b/doc/info/Matrices.texi.m4
@@ -578,12 +578,35 @@ The form of the result depends upon the setting of the switch @mrefdot{ratmx}
There is a special routine for computing sparse determinants which is called
when the switches @code{ratmx} and @mref{sparse} are both @code{true}.
+@code{display_determinant_bars} governs the display of determinants.
+
@c EXAMPLES NEEDED HERE
@opencatbox{Categories:}
@category{Matrices}
@closecatbox
@end deffn
+@c -----------------------------------------------------------------------------
+@anchor{display_determinant_bars}
+@defvr {Option variable} display_determinant_bars
+Default value: @code{true}
+
+When @code{display_determinant_bars} is @code{true},
+a determinant noun expression which has a literal matrix as its sole argument
+is displayed with a vertical bar on either side.
+
+Otherwise, @code{display_determinant_bars} is @code{false},
+or the determinant is not a noun expression,
+or its argument is not a literal matrix;
+in these cases, the expression is displayed as an ordinary function call.
+
+@opencatbox{Categories:}
+@category{Display flags and variables}
+@category{Matrices}
+@closecatbox
+
+@end defvr
+
@c -----------------------------------------------------------------------------
@anchor{detout}
@defvr {Option variable} detout
diff --git a/src/displa.lisp b/src/displa.lisp
index f02e385d7..5eb62a013 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1269,6 +1269,17 @@
collect (list '(mequal) (format nil " Col ~d" k) ($col form k))))
result ""))
+(displa-def %determinant dim-determinant)
+
+(defmvar $display_determinant_bars t)
+
+(defun dim-determinant (form result)
+ (let ((a (rest form)))
+ (if (and $display_determinant_bars (= (length a) 1) ($matrixp (first a)))
+ (let ($display_matrix_brackets)
+ (dim-mabs `((mabs) ,(first a)) result))
+ (dimension-function form result))))
+
(displa-def mbox dim-mbox)
(displa-def %mbox dim-mbox)
commit ce80ffa0ea2fdbeb4930e66aad224b226a4d728e
Author: Robert Dodier <rob...@so...>
Date: Tue Oct 7 21:18:59 2025 -0700
New flag display_matrix_brackets; when true, display matrices with a bracket on either side,
otherwise without brackets. Default is display_matrix_brackets = true.
Has the advertised effect whether display2d_unicode is enabled or disabled.
diff --git a/doc/info/Matrices.texi.m4 b/doc/info/Matrices.texi.m4
index 0879b35fb..84b42a8d3 100644
--- a/doc/info/Matrices.texi.m4
+++ b/doc/info/Matrices.texi.m4
@@ -1580,6 +1580,25 @@ Example:
@closecatbox
@end defvr
+@c -----------------------------------------------------------------------------
+@anchor{display_matrix_brackets}
+@deffn {Option variable} display_matrix_brackets
+Default value: @code{true}
+
+When @code{display_matrix_brackets} is @code{true},
+matrices are displayed with brackets (square braces) to the left and right.
+
+When @code{display_matrix_brackets} is @code{false},
+matrices are not displayed with brackets;
+only the matrix elements are displayed.
+
+@opencatbox{Categories:}
+@category{Matrices}
+@category{Display flags and variables}
+@closecatbox
+
+@end deffn
+
@c -----------------------------------------------------------------------------
@anchor{matrix}
@deffn {Function} matrix (@var{row_1}, @dots{}, @var{row_n})
@@ -1624,6 +1643,8 @@ See @mrefcomma{eigenvalues} @mrefcomma{eigenvectors} @mrefcomma{determinant}@w{}
@mrefcomma{echelon} and @mrefdot{rank}
@c CHECK -- WE PROBABLY WANT EXHAUSTIVE LIST HERE
+@mref{display_matrix_brackets} governs the display of matrices.
+
Examples:
@itemize @bullet
diff --git a/src/displa.lisp b/src/displa.lisp
index 79ac08ff4..f02e385d7 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1200,6 +1200,8 @@
(displa-def $matrix dim-$matrix)
(displa-def %matrix dim-$matrix)
+(defmvar $display_matrix_brackets t)
+
(defun dim-$matrix (form result)
(prog (dmstr rstr cstr consp cols)
(setq cols (if ($listp (cadr form)) (length (cadr form)) 0))
@@ -1235,13 +1237,13 @@
(if (> (+ height depth) (length linearray))
(setq consp t))
(return
- (cond ((and (not consp) (checkfit (+ 2 width)))
+ (cond ((and (not consp) (checkfit (if $display_matrix_brackets (+ 2 width) width)))
(matout dmstr cstr rstr result))
((and (not consp) (<= level 2)) (colout form result))
(t (dimension-function form result))))))
(defun matout (dmstr cstr rstr result)
- (push `(d-matrix left ,height ,depth) result)
+ (when $display_matrix_brackets (push `(d-matrix left ,height ,depth) result))
(push #\space result)
(do ((d dmstr (cdr d)) (c cstr (cdr c)) (w 0 0))
((null d))
@@ -1251,10 +1253,13 @@
(setq w (truncate (+ (car c) (caar d)) 2))
(rplaca d (cdar d)))
(setq result (cons (list (+ 2 (- (car c) w)) 0) (nreconc (car d) result))))
- (setq width (+ 2 width))
+ (if $display_matrix_brackets
+ (setq width (+ 2 width))
+ (when $display2d_unicode
+ (setq height (1- height) depth (1- depth))))
(update-heights height depth)
(rplaca (car result) (1- (caar result)))
- (push `(d-matrix right ,height ,depth) result)
+ (when $display_matrix_brackets (push `(d-matrix right ,height ,depth) result))
result)
(defun colout (form result)
@@ -1492,12 +1497,17 @@
;; Block mode i/o isn't needed since PRINC is used instead of WRITE-CHAR and
;; CURSORPOS.
-(defun output-linear (result w)
+(defun output-linear (result w &aux i0)
(draw-linear result bkptdp w)
(do ((i (1- (+ bkptht bkptdp)) (1- i)))
((< i 0))
- (cond ((null (aref linearray i)))
- (t (output-linear-one-line i)))))
+ (cond
+ ((and (null i0) (null (aref linearray i))))
+ (t
+ (when (null i0) (setq i0 i))
+ (if (null (aref linearray i))
+ (mterpri)
+ (output-linear-one-line i))))))
(defun output-linear-one-line (i)
(prog (line (n 0))
commit a70604d7822e25c8a3f36ca1613db2e3ab1b8774
Author: Robert Dodier <rob...@so...>
Date: Sun Oct 5 13:14:25 2025 -0700
New flag display_box_double_lines; when true, display box expressions with dobuble-line characters, otherwise single-line.
Only affects display when display2d_unicode is true.
diff --git a/doc/info/Expressions.texi b/doc/info/Expressions.texi
index 463fef986..eb4207467 100644
--- a/doc/info/Expressions.texi
+++ b/doc/info/Expressions.texi
@@ -474,6 +474,25 @@ unbound).
@closecatbox
@end deffn
+@c -----------------------------------------------------------------------------
+@anchor{display_box_double_lines}
+@defvr {Option variable} display_box_double_lines
+Default value: @code{true}
+
+When @code{display_box_double_lines} is @code{true},
+@code{box} expressions are displayed with Unicode double-line characters.
+
+When @code{display_box_double_lines} is @code{false},
+@code{box} expressions are displayed with Unicode single-line characters.
+
+@code{display_box_double_lines} only has any effect when @code{display2d_unicode} is @code{true}.
+
+@opencatbox{Categories:}
+@category{Expressions}
+@category{Display flags and variables}
+@closecatbox
+@end defvr
+
@c -----------------------------------------------------------------------------
@anchor{box}
@deffn {Function} box @
@@ -495,7 +514,7 @@ computations. @mref{rembox} removes the box again.
@mref{boxchar} is the character used to draw the box in @code{box} and in the
@mref{dpart} and @mref{lpart} functions.
-See also @mrefcomma{rembox} @mref{dpart} and @mrefdot{lpart}
+See also @mrefcomma{rembox} @mrefcomma{dpart} @mrefcomma{lpart} and @mrefdot{display_box_double_lines}
Examples:
diff --git a/src/displa.lisp b/src/displa.lisp
index f77080fc1..79ac08ff4 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1284,7 +1284,21 @@
(dim-mlabox-unicode form result)
(dim-mlabox-ascii form result)))
+(defmvar $display_box_double_lines t)
+
(defun dim-mlabox-unicode (form result)
+ (if $display_box_double_lines
+ (dim-mlabox-unicode-default form result)
+ (let
+ ((*d-box-char-unicode-horz* (get-unicode-char :box-drawings-light-horizontal))
+ (*d-box-char-unicode-vert* (get-unicode-char :box-drawings-light-vertical))
+ (*d-box-char-unicode-upper-left* (get-unicode-char :box-drawings-light-down-and-right))
+ (*d-box-char-unicode-upper-right* (get-unicode-char :box-drawings-light-down-and-left))
+ (*d-box-char-unicode-lower-right* (get-unicode-char :box-drawings-light-up-and-left))
+ (*d-box-char-unicode-lower-left* (get-unicode-char :box-drawings-light-up-and-right)))
+ (dim-mlabox-unicode-default form result))))
+
+(defun dim-mlabox-unicode-default (form result)
(prog (dummy)
(setq dummy (dimension (cadr form) nil 'mparen 'mparen nil 0))
(cond ((not (checkfit (+ 2 width)))
@@ -1680,7 +1694,19 @@
(d-box-unicode h d w body)
(d-box-ascii h d w body)))
-(defun d-box-unicode (h d w body &aux dmstr)
+(defun d-box-unicode (h d w body)
+ (if $display_box_double_lines
+ (d-box-unicode-default h d w body)
+ (let
+ ((*d-box-char-unicode-horz* (get-unicode-char :box-drawings-light-horizontal))
+ (*d-box-char-unicode-vert* (get-unicode-char :box-drawings-light-vertical))
+ (*d-box-char-unicode-upper-left* (get-unicode-char :box-drawings-light-down-and-right))
+ (*d-box-char-unicode-upper-right* (get-unicode-char :box-drawings-light-down-and-left))
+ (*d-box-char-unicode-lower-right* (get-unicode-char :box-drawings-light-up-and-left))
+ (*d-box-char-unicode-lower-left* (get-unicode-char :box-drawings-light-up-and-right)))
+ (d-box-unicode-default h d w body))))
+
+(defun d-box-unicode-default (h d w body &aux dmstr)
(setq dmstr `((0 ,h ,*d-box-char-unicode-upper-right* (d-hbar ,w ,*d-box-char-unicode-horz*) ,*d-box-char-unicode-upper-left*)
(,(- (+ w 2)) 0)
(d-vbar ,h ,d ,*d-box-char-unicode-vert*)
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: willisbl <wil...@us...> - 2025-10-07 19:39:30
|
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 a1f3142a29d967cc52ed5e08284118b43c3ec34c (commit)
from d00e008a586c58f5b0dfbf7694f031ba53462a19 (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 a1f3142a29d967cc52ed5e08284118b43c3ec34c
Author: Barton Willis <wi...@un...>
Date: Tue Oct 7 14:39:19 2025 -0500
Update ChangeLog
diff --git a/ChangeLog b/ChangeLog
index ceafc5da0..6e304614a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
Maxima 5.48-post change log
===========================
+Bug fixes for numbered bugs:
+----------------------------
+ * \#3750: Quoting atan2 inhibits simplification
+ * \#4609: atan2(inf,inf) -> 0
+ * \#4613 integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi)
+ * \#4615 carg range is not in (-%pi, %pi]
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
1 file changed, 6 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: willisbl <wil...@us...> - 2025-10-07 19:25:00
|
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 d00e008a586c58f5b0dfbf7694f031ba53462a19 (commit)
from 5f931d9be7f7f34a9526feee56f3eeb86fac0bf8 (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 d00e008a586c58f5b0dfbf7694f031ba53462a19
Author: Barton Willis <wi...@un...>
Date: Tue Oct 7 14:24:38 2025 -0500
Fixes for \#4615, \#4609, and \#4613
- Fix for \# 4615 carg range is not in (-pi, pi]
The fix for the specific bug mentioned involves fixes to the atan2 simplifier. The tests for this are in rtest15. There might be other cases where the range of
carg is not in (-pi,pi].
- Fix for \# 4609 atan2(inf,inf) -> 0
There is a new scheme in the atan2 simplifier that catches atan2(X,Y), where
X and Y are extended real numbers. Regression tests are in rtest_atan2.
- Fix for \# 4613 integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi);
The fix is all in the atan2 simplifier. Regression tests are in rtest_atan2.
New functions
- cosp (similar to sinp)
- reduce-angle-mod-2pi
- nonvanishing-common-factor
- polar-angle-if-sinusoids
- initialize-atan2-hashtable
New testfile
-rtest_atan2
Includes tests for \#4615, \#4609, \#4613, and \#3750 (was fixed some time ago).
Tested with Clozure 1.13 and sbcl 2.4.7. No unexpected testsuite or share testsuite failures.
diff --git a/src/comm2.lisp b/src/comm2.lisp
index e4ed1f629..2af9828f3 100644
--- a/src/comm2.lisp
+++ b/src/comm2.lisp
@@ -487,6 +487,93 @@
;;;; ATAN2
+;; The function sinp is defined in `limit.lisp'. Here we define `cosp`.
+(defun cosp (e)
+"Return true iff the expression `e` is in general form and its operator is `%cos`."
+ (and (consp e) (eq '%cos (caar e))))
+
+;; Checks:
+;; (i) pi - 2 pi ceiling((pi - pi)/(2 pi)) = pi - 0 = pi, and
+;; (ii) -pi - 2 pi ceiling((-pi - pi)/(2 pi)) = -pi - 2 pi ceiling(-1) = -pi + 2pi = pi, as required.
+(defun reduce-angle-mod-2pi (theta)
+ "Reduce the input `mod 2 pi` to a value in the interval `(-pi, pi]`.
+ Thus -pi reduces to pi, and pi reduces to pi."
+ (cond
+ ;; The range of both atan2 and carg is `(-pi,pi]`, so give a free pass for such expressions.
+ ((and (consp theta) (or (eq (caar theta) '%atan2) (eq (caar theta) '%carg)))
+ theta)
+ (t
+ (let ((n (ftake '$ceiling (div (sub theta '$%pi) (mul 2 '$%pi)))))
+ ;; If you want to do the reduction only when `n` is an explicit integer,
+ ;; put in a conditional and return nil when `n` is not an explicit integer.
+ (sub theta (mul 2 '$%pi n))))))
+
+(defun nonvanishing-common-factor (p q)
+ "Return the product of the absolute values of the nonvanishing factors that are common to p and q. This code
+ doesn't factor p or q, so it only considers factors that are explict. When there are no
+ such factors, return one, that is, the empty product."
+ (let* ((pp (fapply '$set (if (mtimesp p) (cdr p) (list p))))
+ (qq (fapply '$set (if (mtimesp q) (cdr q) (list q))))
+ (ss (cdr ($intersection pp qq)))
+ (ll nil))
+ (dolist (sx ss)
+ (when (eq t (mnqp sx 0))
+ (push (ftake 'mabs sx) ll)))
+ (fapply 'mtimes ll)))
+
+;; Outside the one call to this function in the atan2 simplifier, this code likely isn't particulary useful.
+(defun polar-angle-if-sinusoids (x y)
+ "When both `x` and `y` have the form `(+/-) sin(X)` or `(+/-) cos(X)` and the point (x,y) is on the unit circle,
+ return the principal polar angle of the point `(x,y)`. Otherwise, return nil. The principal polar angle is a
+ member of the interval `(-pi,pi]`."
+ (flet ((sinusoid-p (x)
+ (or (cosp x) (cosp (neg x)) (sinp x) (sinp (neg x)))))
+ (when (and (sinusoid-p x) (sinusoid-p y))
+ (let ((z ($expand ($exponentialize (add x (mul '$%i y))))))
+ (flet ((fn (x)
+ (cond ((eql x -1) '$%pi)
+ ((eq x '$%i) (div '$%pi 2))
+ ((and (mexptp x) (eq (cadr x) '$%e)) (div (caddr x) '$%i))
+ (t nil))))
+ ;; When `(x,y)` isn't on the unit circle (say `x = sin(p)` and `y = cos(q)`) `z` will not
+ ;; be a product of terms that are on the unit circle, and the `every` check will fail.
+ (let ((theta (mapcar #'fn (if (mtimesp z) (cdr z) (list z)))))
+ (if (every #'identity theta)
+ (reduce-angle-mod-2pi (fapply 'mplus theta))
+ nil)))))))
+
+(defvar *atan2-extended-real-hashtable* (make-hash-table :test #'equal)
+"Hashtable giving the value of atan2(extended real, extended real) when the value
+is unambiguous. Ambiguous cases, for example atan2(inf,inf), are not included in
+the hashtable.")
+
+;; At compile time, the functions `div` and `mul` are not available, so we
+;; cannot build `atan2-extended-real-hashtable*` here. To workaround this, we define
+;; a function `initialize-atan2-hashtable` that hash table *atan2-extended-real-hashtable*,
+;; we and call this function in `init-cl.lisp`.
+(defun initialize-atan2-hashtable ()
+ (let ((pi-over-two (div '$%pi 2)) (neg-pi-over-two (div '$%pi -2)) (minus-pi (mul -1 '$%pi)))
+ (mapcar #'(lambda (z) (setf (gethash (list (first z) (second z)) *atan2-extended-real-hashtable*) (third z)))
+ (list
+ (list '$minf '$zerob neg-pi-over-two)
+ (list '$minf '$zeroa neg-pi-over-two)
+ (list '$minf '$ind neg-pi-over-two)
+
+ (list '$zerob '$minf minus-pi)
+ (list '$zerob '$inf 0)
+
+ (list '$zeroa '$minf '$%pi)
+ (list '$zeroa '$inf 0)
+
+ (list '$ind '$inf 0)
+
+ (list '$inf '$zerob pi-over-two)
+ (list '$inf '$zeroa pi-over-two)
+ (list '$inf '$ind pi-over-two)))))
+
+(defvar *extended-reals* '($minf $zerob $zeroa $ind $und $inf $infinity)
+"Common Lisp list of all of Maxima's extended real numbers")
+
;; atan2 distributes over lists, matrices, and equations
(defprop %atan2 (mlist $matrix mequal) distribute_over)
@@ -496,7 +583,26 @@
;; `block([radexpand: false], limit(atan2(x^2 - 2, x^3 - 3*x), x, sqrt(2), minus))`.
;; Arguably, this fix is inelegant and should be revisited. (Barton Willis, April 2025)
(def-simplifier atan2 (y x)
- (let (signy signx)
+ ;; for both x & y, convert -inf to minf.
+ (when (alike1 y (mul -1 '$inf))
+ (setq y '$minf))
+ (when (alike1 x (mul -1 '$inf))
+ (setq x '$minf))
+ ;; for both x & y, convert -minf to inf.
+ (when (alike1 y (mul -1 '$minf))
+ (setq y '$inf))
+ (when (alike1 x (mul -1 '$minf))
+ (setq x '$inf))
+
+ ;; Divide both x & y by the absolute value of common factors that are
+ ;; nonvanishing. Skip this when either x or y depend on an extended real.
+ (when (and (freeofl y *extended-reals*) (freeofl x *extended-reals*))
+ (let ((w (nonvanishing-common-factor y x)))
+ (setq y (div y w))
+ (setq x (div x w))))
+
+ (let ((signy) (signx))
+
(cond ((and (zerop1 y) (zerop1 x))
(merror (intl:gettext "atan2: atan2(0,0) is undefined.")))
(;; float contagion
@@ -511,39 +617,49 @@
(setq x ($bfloat x)
y ($bfloat y))
(*fpatan y (list x)))
- ;; Simplifify infinities
- ((or (eq x '$inf)
- (alike1 x '((mtimes) -1 $minf)))
+ ;; Look up atan(extended real, extended real) in a hashtable. When the value
+ ;; isn't found in the hashtable, return a nounform.
+ ((and (member x *extended-reals*) (member y *extended-reals*))
+ (gethash (list y x) *atan2-extended-real-hashtable* (give-up)))
+
+ ;;When either `x` or `y` is in ($und infinity $ind), give up
+ ((or (member x '($und $infinity $ind)) (member y '($und $infinity $ind)))
+ (give-up))
+
+ ;; Simplify infinities--the hashtable lookup catches atan2(inf,inf),atan2(minf,inf), ..., so
+ ;; we should be able to safely do atan2(y,inf) = 0 here.
+ ((eq x '$inf)
;; Simplify atan2(y,inf) -> 0
0)
- ((or (eq x '$minf)
- (alike1 x '((mtimes) -1 $inf)))
+ ((eq x '$minf)
;; Simplify atan2(y,minf) -> %pi for realpart(y)>=0 or -%pi
- ;; for realpart(y)<0. When sign of y unknwon, return noun
+ ;; for realpart(y)<0. When sign of y unknown, return noun
;; form. We are basically making atan2 on the branch cut
;; be continuous with quadrant II.
- (cond ((member (setq signy ($sign ($realpart y))) '($pos $pz $zero))
- '$%pi)
- ((eq signy '$neg) (mul -1 '$%pi))
- (t (give-up))))
- ((or (eq y '$inf)
- (alike1 y '((mtimes) -1 $minf)))
- ;; Simplify atan2(inf,x) -> %pi/2
- (div '$%pi 2))
- ((or (eq y '$minf)
- (alike1 y '((mtimes -1 $inf))))
- ;; Simplify atan2(minf,x) -> -%pi/2
+ (let ((sgn ($sign ($realpart y))))
+ (cond ((member sgn '($pos $pz $zero))
+ '$%pi)
+ ((eq sgn '$neg) (mul -1 '$%pi))
+ (t (give-up)))))
+ ;; We have already taken care of atan2(extended real, extended real), so we can
+ ;; safely simplify atan2(inf, X) to %pi/2 and atan2(minf, X) to -%pi/2. The case
+ ;; atan2(inf, %i) = %pi/2 is likely OK.
+ ((eq y '$inf)
+ (div '$%pi 2))
+ ((eq y '$minf)
(div '$%pi -2))
((and (free x '$%i) (setq signx (let ((limitp nil)) ($sign x)))
(free y '$%i) (setq signy (let ((limitp nil)) ($sign y)))
- (cond ((zerop1 y)
+ (cond ((eq signy '$zero)
;; Handle atan2(0, x) which is %pi or -%pi
;; depending on the sign of x. We assume that
;; x is never actually zero since atan2(0,0) is
;; undefined.
(cond ((member signx '($neg $nz)) '$%pi)
- ((member signx '($pos $pz)) 0)))
- ((zerop1 x)
+ ((member signx '($pos $pz)) 0)
+ ((eq signx '$zero) (merror (intl:gettext "atan2: atan2(0,0) is undefined.")))))
+
+ ((eq signx '$zero)
;; Handle atan2(y, 0) which is %pi/2 or -%pi/2,
;; depending on the sign of y.
(cond ((eq signy '$neg) (div '$%pi -2))
@@ -558,23 +674,29 @@
;; -%pi/4 depending on the sign of x.
(cond ((eq signx '$neg) (mul 3 (div '$%pi 4)))
((member signx '($pos $pz)) (div '$%pi -4)))))))
+
+ ;; atan2((+/-)sin(angle),(+/-)cos(angle)) = angle reduced to (-pi,pi] mod 2 pi.
+ ;; and similarly for atan2((+/-)cos(angle),(+/-)sin(angle))
+ ((polar-angle-if-sinusoids x y))
($logarc
(logarc '%atan2 (list ($logarc y) ($logarc x))))
- ((and $trigsign (eq t (mminusp y)))
- ;; atan2(-y,x) = -atan2(y,x) if trigsign is true.
- (neg (take '(%atan2) (neg y) x)))
- ;; atan2(y,x) = atan(y/x) + pi sign(y) (1-sign(x))/2
+ ;; atan2(-y,x) = -atan2(y,x) provided (a) trigsign is true, (b) (great (neg y) y), and
+ ;; (c) (x,y) is off the negative real axis. The test for (x,y) off the negative
+ ;; real axis should be (or (eq t (mnqp y 0)) (eq t (mgrp x 0))), but that causes
+ ;; one testsuite failure, so we'll test using (or (not (eql y 0)) (eq signx '$pos)))
+ ((and $trigsign
+ (eq t (mminusp y))
+ (or (not (eql y 0)) (eq signx '$pos)))
+ (neg (ftake '%atan2 (neg y) x)))
((eq signx '$pos)
;; atan2(y,x) = atan(y/x) when x is positive.
(take '(%atan) (div y x)))
- ((and (eq signx '$neg)
- (member (setq signy ($csign y)) '($pos $neg) :test #'eq))
- (add (take '(%atan) (div y x))
- (porm (eq signy '$pos) '$%pi)))
- ((and (eq signx '$zero) (eq signy '$zero))
- ;; Unfortunately, we'll rarely get here. For example,
- ;; assume(equal(x,0)) atan2(x,x) simplifies via the alike1 case above
- (merror (intl:gettext "atan2: atan2(0,0) is undefined.")))
+
+ ((and (eq signx '$neg) (member signy '($pos $neg $pz $zero) :test #'eq))
+ (cond ((eq signy '$neg) (sub (ftake '%atan (div y x)) '$%pi))
+ ((member signy '($pos $pz $zero)) (add (ftake '%atan (div y x)) '$%pi))
+ (t (give-up))))
+
(t (give-up)))))
;;;; ARITHF
diff --git a/src/init-cl.lisp b/src/init-cl.lisp
index 51066f3d0..dc65afd24 100644
--- a/src/init-cl.lisp
+++ b/src/init-cl.lisp
@@ -720,6 +720,7 @@ maxima [options] --batch-string='batch_answers_from_file:false; ...'
(setf $pointbound *alpha)
(setf (gethash '$pointbound *variable-initial-values*)
*alpha)
+ (initialize-atan2-hashtable)
(values))
(defun adjust-character-encoding ()
diff --git a/src/testsuite.lisp b/src/testsuite.lisp
index d34fbeacc..929913446 100644
--- a/src/testsuite.lisp
+++ b/src/testsuite.lisp
@@ -148,7 +148,8 @@
((mlist simp) 12 13))
((mlist simp) "rtest_great" ((mlist simp)))
-
+
+ ((mlist simp) "rtest_atan2" ((mlist simp) 65))
"rtest_gcd"
;; The tests that failed with abcl 1.5.0
((mlist simp) "rtest_hg"
diff --git a/tests/rtest15.mac b/tests/rtest15.mac
index 722f1d894..cae324adc 100644
--- a/tests/rtest15.mac
+++ b/tests/rtest15.mac
@@ -1619,14 +1619,14 @@ trigreduce(atan( sin(7*%pi/13) / cos(7*%pi/13) ));
-6*%pi/13;
carg( cos(7*%pi/13) + %i*sin(7*%pi/13) );
-atan(sin((7*%pi)/13)/cos((7*%pi)/13))+%pi;
+7*%pi/13$
trigreduce(carg( cos(7*%pi/13) + %i*sin(7*%pi/13) ));
7*%pi/13;
(z: cos ( 13 * %pi / 15 ) + %i * sin ( 13 * %pi / 15 ),
carg ( z ));
-atan(sin((13*%pi)/15)/cos((13*%pi)/15))+%pi;
+13*%pi/15$
atan ( tan ( 13 * %pi / 15 ) ) + %pi;
13*%pi/15;
@@ -1645,7 +1645,7 @@ trigreduce ( carg ( z ) );
/* examples from SF bug #4208: "Error with complex numbers - example with trigreduce" */
trigreduce(carg(c/d));
-24*%pi/13;
+-2*%pi/13$
trigreduce(carg(cos(3*%pi/5)+%i * sin(3*%pi/5)));
3*%pi/5;
diff --git a/tests/rtest_atan2.mac b/tests/rtest_atan2.mac
new file mode 100644
index 000000000..d03ed4332
--- /dev/null
+++ b/tests/rtest_atan2.mac
@@ -0,0 +1,254 @@
+(kill(values), 0);
+0$
+
+atan2(1, 1);
+%pi/4$
+
+atan2(1, -1);
+3*%pi/4$
+
+atan2(-1, -1);
+-3*%pi/4$
+
+atan2(-1, 1);
+-%pi/4$
+
+atan2(0, 1);
+0$
+
+atan2(0, -1);
+%pi$
+
+atan2(1, 0);
+%pi/2$
+
+atan2(-1, 0);
+-%pi/2$
+
+errcatch(atan2(0, 0));
+[]$
+
+atan2(0, inf);
+0$
+
+atan2(zerob, inf);
+0$
+
+atan2(zeroa, inf);
+0$
+
+atan2(0, -inf);
+%pi$
+
+atan2(zerob, -inf);
+-%pi$
+
+atan2(zeroa, -inf);
+%pi$
+
+atan2(0,minf);
+%pi$
+
+atan2(zerob,minf);
+-%pi$
+
+atan2(zeroa,minf);
+%pi$
+
+atan2(inf, 1);
+%pi/2$
+
+atan2(-inf, 1);
+-%pi/2$
+
+atan2(minf,1);
+-%pi/2$
+
+atan2(1, inf);
+0$
+
+atan2(1, -inf);
+%pi$
+
+atan2(1, minf);
+%pi$
+
+atan2(inf, -1);
+%pi/2$
+
+atan2(-inf, -1);
+-%pi/2$
+
+atan2(minf, -1);
+-%pi/2$
+
+block([ans],
+ assume(-%pi < x, x <= '%pi),
+ ans : atan2(sin(x),cos(x)),
+ forget(-%pi < x, x <= '%pi),
+ ans);
+x$
+
+atan2(sin(x), cos(x));
+x-2*%pi*ceiling((x-%pi)/(2*%pi))$
+
+/* test identity atan2(sin(x), cos(x)) */
+block([ans1 : makelist(trigreduce(atan2(sin(%pi*k/8),cos(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(sin(x),cos(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)),trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(-sin(x), cos(x))*/
+block([ans1 : makelist(trigreduce(atan2(-sin(%pi*k/8),cos(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(-sin(x),cos(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)), trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(sin(x), -cos(x))*/
+block([ans1 : makelist(trigreduce(atan2(sin(%pi*k/8),-cos(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(sin(x),-cos(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)), trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(-sin(x), -cos(x))*/
+block([ans1 : makelist(trigreduce(atan2(-sin(%pi*k/8),-cos(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(-sin(x),-cos(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)), trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(cos(x), sin(x)) */
+block([ans1 : makelist(trigreduce(atan2(cos(%pi*k/8),sin(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(cos(x),sin(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)),trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(-cos(x), sin(x))*/
+block([ans1 : makelist(trigreduce(atan2(-cos(%pi*k/8),sin(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(-cos(x),sin(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)), trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(cos(x), -sin(x))*/
+block([ans1 : makelist(trigreduce(atan2(cos(%pi*k/8),-sin(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(cos(x),-sin(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)), trigsimp(ans1 - ans2)));
+true$
+
+/* test identity atan2(-sin(x), -cos(x))*/
+block([ans1 : makelist(trigreduce(atan2(-sin(%pi*k/8),-cos(%pi*k/8))),k,-16,16),
+ ans2 : block([zzz : atan2(-sin(x),-cos(x))], makelist(subst(x = %pi*k/8, zzz),k,-16,16))],
+ every(lambda([q],is(q=0)), trigsimp(ans1 - ans2)));
+true$
+
+integrate(atan2(sin(x),cos(x)),x,0,9*%pi);
+%pi^2/2$
+
+/* Directional limits near branch cuts */
+limit(atan2(epsilon, -1), epsilon, 0, plus);
+%pi$
+
+limit(atan2(epsilon, -1), epsilon, 0, minus);
+-%pi$
+
+limit(atan2(-1, epsilon), epsilon, 0, plus);
+-%pi/2$
+
+limit(atan2(-1, epsilon), epsilon, 0, minus);
+-%pi/2$
+
+atan2(1.0, 0.0);
+1.5707963267948966$
+
+atan2(inf, 1);
+%pi/2$
+
+atan2(-inf, 1);
+-%pi/2$
+
+atan2(1, inf);
+0$
+
+atan2(1, -inf);
+%pi$
+
+atan2(inf, inf);
+atan2(inf,inf)$
+
+atan2(-inf, -inf);
+atan2(-inf,-inf)$
+
+atan2(1.0e-100, -1);
+3.141592653589793$
+
+atan2(-1.0e-100, -1);
+-3.141592653589793$
+
+atan2(1, -1.0e-100);
+1.5707963267948966$
+
+atan2(-1, -1e-100);
+ -1.5707963267948966$
+
+atan2(1e-100, 1e-100);
+0.7853981633974483$
+
+atan2(-1e-100, -1e-100);
+-2.356194490192345$
+
+atan2(1, -0.0);
+1.5707963267948966$
+
+atan2(-1, -0.0);
+- 1.5707963267948966$
+
+block([ans],
+ assume(equal(x,0)),
+ ans : errcatch(atan2(x,x)),
+ forget(equal(x,0)),
+ ans);
+[]$
+
+block([ans],
+ assume(x > 0),
+ ans : atan2(x,x),
+ forget(x > 0),
+ ans);
+%pi/4$
+
+block([ans],
+ assume(x < 0),
+ ans : atan2(x,x),
+ forget(x < 0),
+ ans);
+-3*%pi/4$
+
+/* #4615 carg range is not in (-%pi, %pi] */
+block([c:3*(cos(5*%pi/13)+%i*sin(5*%pi/13)), d:4*(cos(7*%pi/13)+%i*sin(7*%pi/13))],
+ carg(c/d));
+-2*%pi/13$
+
+/* #4609 atan2(inf,inf) -> 0*/
+block([ans : atan2(inf,inf)],
+ [inpart(ans,0), args(ans)]);
+[atan2, [inf, inf]]$
+
+/* #3750 Quoting atan2 inhibits simplification*/
+'atan2(9,0);
+%pi/2$
+
+/* #3127 incorrect integral of expression containing atan2*/
+integrate(sin(t)*atan2(2*sin(t),1-2*cos(t)),t,0,%pi);
+%pi/4$
+
+/* #4613 integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi);*/
+integrate(atan2(sin(x), cos(x)), x, 0, 9*%pi);
+%pi^2/2$
+
+(kill(values),0);
+0$
+
+facts();
+[]$
+
+(reset(trigsign),0);
+0$
\ No newline at end of file
-----------------------------------------------------------------------
Summary of changes:
src/comm2.lisp | 188 ++++++++++++++++++++++++++++++-------
src/init-cl.lisp | 1 +
src/testsuite.lisp | 3 +-
tests/rtest15.mac | 6 +-
tests/rtest_atan2.mac | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 415 insertions(+), 37 deletions(-)
create mode 100644 tests/rtest_atan2.mac
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-10-06 21:01:02
|
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 5f931d9be7f7f34a9526feee56f3eeb86fac0bf8 (commit)
via b0da0ff57d68586c02e281ea1fbc16f8d6e46e87 (commit)
via 662f988ac60c5f544ae94e994d29f8d9feff40f1 (commit)
via d974c31ece4986086fdf6ccbd60cdad160be139e (commit)
via f17a1020bddf14d8ef983dfac36fc9e2d7f9ed08 (commit)
via 638aa82fc250aea133ce79ac87e8a1efa9f79fab (commit)
from cdb028fc6bf2a4a644292b9958c214bb9747332b (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 5f931d9be7f7f34a9526feee56f3eeb86fac0bf8
Merge: b0da0ff57 662f988ac
Author: Raymond Toy <toy...@gm...>
Date: Mon Oct 6 14:00:48 2025 -0700
Merge branch 'rtoy-rework-highlightjs-vars'
commit b0da0ff57d68586c02e281ea1fbc16f8d6e46e87
Author: Raymond Toy <toy...@gm...>
Date: Fri Sep 19 12:46:13 2025 -0700
Run update_examples on one example for integrate_use_rootsof
Apparently we didn't run update_examples on all the examples in
Integration.texi.m4. We missed one exapmle for integrate_use_rootsof.
Regenerate this example which also allows syntax highlighting for this
example.
diff --git a/doc/info/Integration.texi.m4 b/doc/info/Integration.texi.m4
index 4a382dba0..7c55b1abf 100644
--- a/doc/info/Integration.texi.m4
+++ b/doc/info/Integration.texi.m4
@@ -756,7 +756,7 @@ function:
@c integrate_use_rootsof: true$
@c integrate (1/(1+x+x^5), x);
@c ===end===
-@example
+@example maxima
(%i1) integrate_use_rootsof: true$
@group
(%i2) integrate (1/(1+x+x^5), x);
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 23 +++++++++++++++++------
doc/info/Integration.texi.m4 | 2 +-
2 files changed, 18 insertions(+), 7 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-10-06 15:37:20
|
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, rtoy-rework-highlightjs-vars has been updated
via 662f988ac60c5f544ae94e994d29f8d9feff40f1 (commit)
from d974c31ece4986086fdf6ccbd60cdad160be139e (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 662f988ac60c5f544ae94e994d29f8d9feff40f1
Author: Raymond Toy <toy...@gm...>
Date: Mon Oct 6 08:35:17 2025 -0700
Remove commented out AC_SUBST(HLJS_CSS_SELECTOR)
This was commented out already and wasn't actually used anywhere so
remove it.
diff --git a/configure.ac b/configure.ac
index 46f0240bf..c736a0639 100644
--- a/configure.ac
+++ b/configure.ac
@@ -770,7 +770,6 @@ EOF
fi
fi
AC_SUBST(TEXI_EXTRA_HEAD)
- dnl AC_SUBST(HLJS_CSS_SELECTOR)
AC_SUBST(TEXI_EXTRA_TAIL)
AC_SUBST(HIGHLIGHT1)
AC_SUBST(HIGHLIGHT2)
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 1 -
1 file changed, 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: peterpall <pet...@us...> - 2025-10-06 04:52:23
|
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 cdb028fc6bf2a4a644292b9958c214bb9747332b (commit)
from 7536938aff33274ea38243217b62a73d498183a1 (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 cdb028fc6bf2a4a644292b9958c214bb9747332b
Author: Gunter Königsmann <gu...@pe...>
Date: Mon Oct 6 06:52:09 2025 +0200
wrstcse: Documented the new functionalities.
diff --git a/doc/info/wrstcse.texi b/doc/info/wrstcse.texi
index 963d64c91..05ee1ebec 100644
--- a/doc/info/wrstcse.texi
+++ b/doc/info/wrstcse.texi
@@ -152,39 +152,71 @@ Example:
@end deffn
@anchor{wc_inputvalueranges}
-@deffn {Function} wc_inputvalueranges (@var{expression}, [@var{num}])
+@deffn {Function} wc_inputvalueranges (@var{expression}, [@var{show_tols}])
Convenience function: Displays a list which parameter can vary between
which values.
-See also @mref{wc_mintypmax2tol} and @mrefdot{wc_inputvalueranges}
+If @var{show_tols} is @code{true} then this function additionally displays
+which @var{tol[n]} each variable is affected by.
+
+See also @mref{wc_mintypmax2tol} and @mrefdot{wc_inputvalueassumptions}
Example:
@c ===beg===
@c load("wrstcse")$
@c vals: [
-@c R_1= 1000.0*(1+tol[1]*.01),
-@c R_2= 2000.0*(1+tol[2]*.01)
+@c R_1= 1000.0*(1+tol["R_1"]*.01+tol["Temp"]*.001),
+@c R_2= 2000.0*(1+tol["R_2"]*.01+tol["Temp"]*.001),
+@c R_3= 2000.0*(1+tol["R_3"]*.01)
@c ];
@c wc_inputvalueranges(vals);
+@c wc_inputvalueranges(vals,true);
@c ===end===
@example maxima
(%i1) load("wrstcse")$
@group
(%i2) vals: [
- R_1= 1000.0*(1+tol[1]*.01),
- R_2= 2000.0*(1+tol[2]*.01)
+ R_1= 1000.0*(1+tol["R_1"]*.01+tol["Temp"]*.001),
+ R_2= 2000.0*(1+tol["R_2"]*.01+tol["Temp"]*.001),
+ R_3= 2000.0*(1+tol["R_3"]*.01)
];
-(%o2) [R_1 = 1000.0 (0.01 tol + 1),
- 1
- R_2 = 2000.0 (0.01 tol + 1)]
- 2
+(%o2) [R_1 = 1000.0 (0.001 tol + 0.01 tol + 1),
+ Temp R_1
+R_2 = 2000.0 (0.001 tol + 0.01 tol + 1),
+ Temp R_2
+R_3 = 2000.0 (0.01 tol + 1)]
+ R_3
@end group
@group
(%i3) wc_inputvalueranges(vals);
- [ R_1 min = 990.0 typ = 1000.0 max = 1010.0 ]
-(%o3) [ ]
- [ R_2 min = 1980.0 typ = 2000.0 max = 2020.0 ]
+(%o3)
+ [ R_1 min = 989.0 typ = 1000.0 max = 1010.9999999999999 ]
+ [ ]
+ [ R_2 min = 1978.0 typ = 2000.0 max = 2021.9999999999998 ]
+ [ ]
+ [ R_3 min = 1980.0 typ = 2000.0 max = 2020.0 ]
+@end group
+@group
+(%i4) wc_inputvalueranges(vals,true);
+ [ R_1 ] [ min = 989.0 ]
+ [ ] [ ]
+(%o4) Col 1 = [ R_2 ] Col 2 = [ min = 1978.0 ]
+ [ ] [ ]
+ [ R_3 ] [ min = 1980.0 ]
+ [ typ = 1000.0 ] [ max = 1010.9999999999999 ]
+ [ ] [ ]
+ Col 3 = [ typ = 2000.0 ] Col 4 = [ max = 2021.9999999999998 ]
+ [ ] [ ]
+ [ typ = 2000.0 ] [ max = 2020.0 ]
+ [ [tol , tol ] ]
+ [ Temp R_1 ]
+ [ ]
+ Col 5 = [ [tol , tol ] ]
+ [ Temp R_2 ]
+ [ ]
+ [ [tol ] ]
+ [ R_3 ]
@end group
@end example
@end deffn
@@ -272,7 +304,7 @@ of the results over the @var{tol[n]} space and therefore will change the statist
distribution of the montecarlo method and the results of the root sum square functions.
-See also @mrefcomma{wc_toltaylor} @mref{wc_mintypmax} and @mrefdot{wc_montecarlo}
+See also @mref{wc_mintypmax} and @mrefdot{wc_montecarlo}
@var{definitions} allows to temporarily asssign values to specific @var{tol[n]} during
the optimizations (normally optimizagion is done with all @var{tol[n]} being zero)
@@ -362,7 +394,6 @@ Example:
typ = 0.3333333333333333 U_In, max = 0.3377926421404682 U_In]
@end group
@end example
-@end deffn
Use case for adding definitions (@var{tol["E_Gain"]} cannot be optimized without
knowing the sign of @var{tol["U_In"]}):
@@ -998,7 +1029,8 @@ and to introduce them into the equations only when needed.
@code{assume} database about the range each variable in that list will
be in.
-See also @mref{wc_inputvalueranges} and @mrefdot{assume}
+See also @mrefcomma{wc_tolassumptions} @mref{wc_inputvalueranges} and
+@mrefdot{assume}
Example:
@c ===beg===
@@ -1058,25 +1090,26 @@ Example:
@end example
@end deffn
-@anchor{wc_sensitivities}
-@deffn {Function} wc_sensitivities (@var{expr})
+@anchor{wc_tolassumptions}
+@deffn {Function} wc_tolassumptions (@var{expr})
+
+Adds the range of the @var{tol[n]} contained in @var{expr} to the assume
+database.
-Generates a matrix that for each @var{tol[n} displays how much each @var{tol[n]}
-can change @var{expr} in positive and negative direction, when starting from the
-the typical case (all @code{tol[n]}=0):
+See also @mrefcomma{wc_inputvalueassumptions} @mref{wc_inputvalueranges} and @mrefdot{assume}
Example:
@c ===beg===
@c load("wrstcse");
-@c assume(U_In>0);
@c vals:[
@c R_1=100*(1+1/100*tol["R1"])*(1+1/100*tol["Temp"]),
-@c R_2=100*(1+1/100*tol["R2"])*(1+1/100*tol["Temp"])];
-@c float(wc_inputvalueranges(%));
-@c eq1:I=U_In/(R_1+R_2);
-@c eq2:U_Out=I*R_2;
-@c eq3:subst(eq1,eq2);
-@c wc_sensitivities(subst(vals,rhs(eq3)));
+@c R_2=200*(1+1/100*tol["R2"])*(1+1/100*tol["Temp"])];
+@c float(wc_tolassumptions(%));
+@c is(tol[R_1]>tol[R_2]);
+@c is(tol[R_1]>1);
+@c is(tol[R_1]<-1);
+@c is(tol[R_1]<0);
+@c is(tol[R_2]>2);
@c ===end===
@example maxima
@group
@@ -1084,56 +1117,44 @@ Example:
(%o1) /home/gunter/src/maxima-code/share/contrib/wrstcse.mac
@end group
@group
-(%i2) assume(U_In>0);
-(%o2) [U_In > 0]
-@end group
-@group
-(%i3) vals:[
+(%i2) vals:[
R_1=100*(1+1/100*tol["R1"])*(1+1/100*tol["Temp"]),
- R_2=100*(1+1/100*tol["R2"])*(1+1/100*tol["Temp"])];
+ R_2=200*(1+1/100*tol["R2"])*(1+1/100*tol["Temp"])];
tol tol
R1 Temp
-(%o3) [R_1 = 100 (----- + 1) (------- + 1),
+(%o2) [R_1 = 100 (----- + 1) (------- + 1),
100 100
tol tol
R2 Temp
- R_2 = 100 (----- + 1) (------- + 1)]
+ R_2 = 200 (----- + 1) (------- + 1)]
100 100
@end group
@group
-(%i4) float(wc_inputvalueranges(%));
- [ R_1 min = 98.01 typ = 100.0 max = 102.01 ]
-(%o4) [ ]
- [ R_2 min = 98.01 typ = 100.0 max = 102.01 ]
+(%i3) float(wc_tolassumptions(%));
+(%o3) [tol >= - 1.0, tol <= 1.0, tol >= - 1.0,
+ R1 R1 Temp
+ tol <= 1.0, tol >= - 1.0, tol <= 1.0]
+ Temp R2 R2
@end group
@group
-(%i5) eq1:I=U_In/(R_1+R_2);
- U_In
-(%o5) I = ---------
- R_2 + R_1
+(%i4) is(tol[R_1]>tol[R_2]);
+(%o4) unknown
@end group
@group
-(%i6) eq2:U_Out=I*R_2;
-(%o6) U_Out = I R_2
+(%i5) is(tol[R_1]>1);
+(%o5) unknown
@end group
@group
-(%i7) eq3:subst(eq1,eq2);
- R_2 U_In
-(%o7) U_Out = ---------
- R_2 + R_1
+(%i6) is(tol[R_1]<-1);
+(%o6) unknown
@end group
@group
-(%i8) wc_sensitivities(subst(vals,rhs(eq3)));
- [ U_In U_In ]
- [ tol - ---- ---- ]
- [ R2 398 402 ]
- [ ]
-(%o8) [ U_In U_In ]
- [ tol ---- - ---- ]
- [ R1 398 402 ]
- [ ]
- [ tol 0 0 ]
- [ Temp ]
+(%i7) is(tol[R_1]<0);
+(%o7) unknown
+@end group
+@group
+(%i8) is(tol[R_2]>2);
+(%o8) unknown
@end group
@end example
@end deffn
-----------------------------------------------------------------------
Summary of changes:
doc/info/wrstcse.texi | 143 +++++++++++++++++++++++++++++---------------------
1 file changed, 82 insertions(+), 61 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: peterpall <pet...@us...> - 2025-10-06 04:35:47
|
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 7536938aff33274ea38243217b62a73d498183a1 (commit)
from 3167c4754a0dc58a98301686698246c481a28757 (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 7536938aff33274ea38243217b62a73d498183a1
Author: Gunter Königsmann <gu...@pe...>
Date: Mon Oct 6 06:34:58 2025 +0200
wrstcse: wc_inputvalueranges now has an optional parameter that accepts a bool
If the parameter is false or isn't present the command just shows the
input value ranges. If the parameter is true it also shows which tol[n]
it depends on.
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index 39001f9c0..141a86011 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -164,10 +164,25 @@ wc_mintypmax(wc_x,[wc_params]):=block([wc_allvalues,wc_param1,min,wc_typ,max],
?putprop('mintypmax, ?cdr([?mlist,?mequal]), '?distribute_over)$
/* A function that pretty-prints the value ranges the input values are in */
-wc_inputvalueranges(wc_x):=apply('matrix,
- makelist(
- append([lhs(wc_i)],wc_mintypmax(rhs(wc_i))),
- wc_i,wc_x
+wc_inputvalueranges(wc_x,[show_toln]):=
+(
+ if (show_toln#[]) and (show_toln#['true]) and (show_toln#['false]) then
+ error("wc_inputvalueranges: Second parameter must be a bool"),
+ apply('matrix,
+ if show_toln=['true] then
+ makelist(
+ append(
+ [lhs(wc_i)],
+ wc_mintypmax(rhs(wc_i)),
+ [%wc_tols(rhs(wc_i))]
+ ),
+ wc_i,wc_x
+ )
+ else
+ makelist(
+ append([lhs(wc_i)],wc_mintypmax(rhs(wc_i))),
+ wc_i,wc_x
+ )
)
);
-----------------------------------------------------------------------
Summary of changes:
share/contrib/wrstcse.mac | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: peterpall <pet...@us...> - 2025-10-06 04:27:48
|
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 3167c4754a0dc58a98301686698246c481a28757 (commit)
from f450059a112c34cf8c110a96584392f93c50ec3a (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 3167c4754a0dc58a98301686698246c481a28757
Author: Gunter Königsmann <gu...@pe...>
Date: Mon Oct 6 06:27:32 2025 +0200
wrstcse: Added wc_tolassumptions, which tells maxima which range tol[n] will be in
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index 14da33e60..39001f9c0 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -183,6 +183,17 @@ wc_inputvalueassumptions(wc_x):=block([wc_line,wc_assumptions:[]],
apply('assume,wc_assumptions)
);
+/* A function that creates assumptions on the range the tol[n] of wc_x are in */
+wc_tolassumptions(wc_x):=block([wc_line,wc_assumptions:[]],
+ for wc_i in %wc_tols(wc_x) do
+ (
+ wc_line:wc_mintypmax(rhs(wc_i)),
+ push(lhs(wc_i)<=1,wc_assumptions),
+ push(lhs(wc_i)>=-1,wc_assumptions)
+ ),
+ apply('assume,wc_assumptions)
+);
+
/* A function that generates an equation out of the min, typ and maximum value for an element */
wc_mintypmax2tol(wc_tol,wc_min,wc_typ,wc_max):=block([wc_try],
if wc_min>wc_typ then warning("wc_mintypmax2tol: Min value bigger than typ value"),
-----------------------------------------------------------------------
Summary of changes:
share/contrib/wrstcse.mac | 11 +++++++++++
1 file changed, 11 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: peterpall <pet...@us...> - 2025-10-05 15:06:06
|
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 f450059a112c34cf8c110a96584392f93c50ec3a (commit)
from d8a058f9806ffafb1e8f59e439c82a85b607b1a1 (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 f450059a112c34cf8c110a96584392f93c50ec3a
Author: Gunter Königsmann <gu...@pe...>
Date: Sun Oct 5 17:05:52 2025 +0200
wrstcse: wc_ewc_simplify no more uses diff() and limit()
limit() sometimes needs hours when confronted with trivial equations
(which defeats wc_ewc_simplify's purpose as a function that speeds
up things), sometimes errors out with a floating-point exception and
as the testsuite would have shown if it didn't mimic a bug in wrstcse
the diff() sometimes predicts a different result at tol[n]=0 than we
get for the more-real-world-case of tol[n] being -1 or 1.
diff --git a/share/contrib/rtest_wrstcse.mac b/share/contrib/rtest_wrstcse.mac
index 2cf6eda6d..15e07734f 100644
--- a/share/contrib/rtest_wrstcse.mac
+++ b/share/contrib/rtest_wrstcse.mac
@@ -62,13 +62,17 @@ ratsimp(wc_systematic(vals));
wc_ewc_simplify( ratsimp(wc_systematic(vals)));
[[a=a,b=1],[a=a,b=2],[a=a,b=3],[a=b,b=1],[a=b,b=2],[a=b,b=3],[a=c,b=1],[a=c,b=2],[a=c,b=3]];
wc_ewc_simplify(7*(tol[1]+.1)/(6*tol[2]+.1));
-(7*(0.1-tol[2]))/(6*tol[2]+0.1);
+(7*(tol[1]+0.1))/(6*tol[2]+0.1);
+wc_ewc_simplify(7*(tol[1]+.1)/(6*tol[2]+10));
+(7*(0.1-tol[2]))/(6*tol[2]+10);
wc_ewc_simplify(7*(tol[1]+.1)/(6*tol[2]-.1));
-(7*(tol[2]+0.1))/(6*tol[2]-0.1);
+(7*(tol[1]+0.1))/(6*tol[2]-0.1);
wc_mintypmax_percent(tol[1]+.5*tol[2]+4,3);
[min=-(37.5*"%"),typ=4,max=37.5*"%"];
wc_mintypmax(tol[1]+.5*tol[2]+4,3);
[min=2.5,typ=4,max=5.5];
+wc_ewc_simplify(7*(tol[1]+.1)/(6*tol[2]-10));
+(7*(tol[2]+0.1))/(6*tol[2]-10);
subst(wc_mintypmax_rss(tol[1]+.5*tol[2]+4,3),'min),ratprint=false;
3.440983005625053;
subst(wc_mintypmax_rss(tol[1]+.5*tol[2]+4,3),'typ),ratprint=false;
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index 59039341d..14da33e60 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -302,10 +302,9 @@ defs allows to add things like
*/
wc_ewc_simplify(x,[defs]):=block(
[
- /* The derivate of x to the tol[n] we currently look at */
- wc_diffofwctol,
- /* wc_diffofwctol for the current tol being 0 */
- wc_diffofwctollimit,
+ wc_tolminus,
+ wc_tolplus,
+ wc_toltyp,
/*the tol[n] we merge as many tolerances as we can to */
mergedtol:[],
/* Is the tol[n] we merge as many tolerances as we can to positive? */
@@ -321,55 +320,22 @@ wc_ewc_simplify(x,[defs]):=block(
'wc_success
) # ['wc_success] then
error ("wc_ewc_simplify: parameters 2...n need to be assignments to tol[n]."),
+
/* Now let's see we can merge the remaining tol[n] */
+ wc_toltyp:wc_typicalvalues(x_defs),
+
for wc_tol in %wc_tols(x_defs) do
- /* If one step of this loop errors out this means one tolerance isn't merged, but
- the for loop can still continue. */
- errcatch(
- /* Let's see if increasing the current tol[n] increases x_defs*/
- wc_diffofwctol:%wc_typicalvalues(diff(x_defs,wc_tol),wc_tol),
- wc_diffofwctollimit:limit(wc_diffofwctol,wc_tol,0),
- if wc_diffofwctollimit='ind then block(
- [
- poslimit:sign(limit(wc_diffofwctol,wc_tol,0,'plus)),
- neglimit:sign(limit(wc_diffofwctol,wc_tol,0,'minus))
- ],
- if (poslimit='pos and (neglimit='pos or neglimit='zero)) or
- (neglimit='pos and (poslimit='pos or poslimit='zero)) then
- (
- /* increasing tol[n] increases x_defs */
- if mergedtol = [] then
- (
- /* merge this tol[n] with all future ones */
- mergedtol:wc_tol,
- wc_mergedtoldirection:1
- )
- else
- (
- x_defs:subst(wc_tol=wc_mergedtoldirection*mergedtol,x_defs),
- x :subst(wc_tol=wc_mergedtoldirection*mergedtol,x )
- )
- ),
- if (poslimit='neg and (neglimit='neg or neglimit='zero)) or
- (neglimit='neg and (poslimit='neg or poslimit='zero)) then
- (
- /* increasing tol[n] decreases x_defs */
- if mergedtol = [] then
- (
- /* merge this tol[n] with all future ones */
- mergedtol:wc_tol,
- wc_mergedtoldirection:-1
- )
- else
- (
- x_defs:subst(wc_tol=-wc_mergedtoldirection*mergedtol,x_defs),
- x :subst(wc_tol=-wc_mergedtoldirection*mergedtol,x )
- )
- )
- )
- else
- (
- if wc_diffofwctollimit > 0 then
+ /* If one step of this loop errors out this means one tolerance isn't merged, but
+ the for loop can still continue. */
+ errcatch(
+ /* Let's see if increasing the current tol[n] increases x_defs*/
+ wc_tolminus:wc_typicalvalues(subst(wc_tol=-1,x_defs)),
+ wc_tolplus :wc_typicalvalues(subst(wc_tol= 1,x_defs)),
+
+ if
+ ((wc_tolplus > wc_toltyp) and (wc_toltyp >= wc_tolminus)) or
+ ((wc_tolplus >= wc_toltyp) and (wc_toltyp > wc_tolminus))
+ then
(
/* increasing tol[n] increases x_defs */
if mergedtol = [] then
@@ -387,7 +353,10 @@ wc_ewc_simplify(x,[defs]):=block(
else
(
/* The above if might have resulted in true or unknown */
- if wc_diffofwctollimit < 0 then
+ if
+ ((wc_tolplus < wc_toltyp) and (wc_toltyp <= wc_tolminus)) or
+ ((wc_tolplus <= wc_toltyp) and (wc_toltyp < wc_tolminus))
+ then
(
/* increasing wc_tol decreases x_defs */
if mergedtol = [] then
@@ -403,8 +372,7 @@ wc_ewc_simplify(x,[defs]):=block(
x :subst(wc_tol=-wc_mergedtoldirection*mergedtol,x )
)
)
- )
- )
+ )
),
return(x)
);
-----------------------------------------------------------------------
Summary of changes:
share/contrib/rtest_wrstcse.mac | 8 +++--
share/contrib/wrstcse.mac | 76 ++++++++++++-----------------------------
2 files changed, 28 insertions(+), 56 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: peterpall <pet...@us...> - 2025-10-05 12:41:27
|
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 d8a058f9806ffafb1e8f59e439c82a85b607b1a1 (commit)
from bedbea55d4c78181c67a15c99496c70c536ec7c4 (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 d8a058f9806ffafb1e8f59e439c82a85b607b1a1
Author: Gunter Königsmann <gu...@pe...>
Date: Sun Oct 5 14:40:41 2025 +0200
wrstcse: Temporary definitions for wc_ewc_simplify()
allow to temporarily assign values to tol[n] in order to prevent specific tol[n] from
being optimized away or to handle the case that one tol[n] changes the sign of the
impact of another.
diff --git a/doc/info/wrstcse.texi b/doc/info/wrstcse.texi
index 2b83956b1..963d64c91 100644
--- a/doc/info/wrstcse.texi
+++ b/doc/info/wrstcse.texi
@@ -255,7 +255,7 @@ Example:
@anchor{wc_ewc_simplify}
-@deffn {Function} wc_ewc_simplify (@var{expression})
+@deffn {Function} wc_ewc_simplify (@var{expression}, @var{definitions}...)
Brute-forcing through all combinations of @var{tol[n]} in order to find the
worst-case combination is O(m^n)-complete and therefore computationally intensive
@@ -271,8 +271,14 @@ Note that changing the number of @var{tol[n]} will change the statistical distri
of the results over the @var{tol[n]} space and therefore will change the statistical
distribution of the montecarlo method and the results of the root sum square functions.
+
See also @mrefcomma{wc_toltaylor} @mref{wc_mintypmax} and @mrefdot{wc_montecarlo}
+@var{definitions} allows to temporarily asssign values to specific @var{tol[n]} during
+the optimizations (normally optimizagion is done with all @var{tol[n]} being zero)
+which has the side-effect of excempting these @var{tol[n]} from the
+optimization.
+
Example:
@c ===beg===
@c load("wrstcse")$
@@ -358,61 +364,78 @@ Example:
@end example
@end deffn
-@anchor{wc_toltaylor}
-@deffn {Function} wc_toltaylor (@var{expression}, [n])
-
-Tries to approximate the dependence of @code{expr} of all @var{tol[n]} it contains
-by a tailor series.
-
-If the dependence is different for positive and negative @var{tol[n]} the higher
-dependence is used as a worst-case assumption.
-
-See also @mrefdot{wc_ewc_simplify}
-
-Example:
+Use case for adding definitions (@var{tol["E_Gain"]} cannot be optimized without
+knowing the sign of @var{tol["U_In"]}):
@c ===beg===
-@c vals:[
-@c R_1=100*(1+.01*tol[1]),
-@c R_2=200*(1+.01*tol[2])
-@c ];
-@c ic:I_Out=exp(R_1/(R_1+R_2));
-@c subst(vals,ic);
-@c float(wc_toltaylor(rhs(%),2));
+@c load("wrstcse")$
+@c vals: [
+@c U_In=1.2*tol["U_In"], /* The input voltage range */
+@c n_Bits=16, /* The ADC's number of bits */
+@c U_Ref=1.2*(1+.01*tol["U_Ref"]), /* The Adc's reference */
+@c E_Gain=1+1.2e-6*tol["E_Gain"], /* Gain error */
+@c E_Offset=1.5e-6 /* Offset error */
+@c ];
+@c ratprint:false;
+@c wc_inputvalueranges(vals);
+@c ndsadc:n_DSADC=((U_In*E_Gain+E_Offset)/U_Ref+.5)*(2^(n_Bits)-1);
+@c lhs(ndsadc)=wc_ewc_simplify(subst(vals,rhs(ndsadc)));
+@c lhs(ndsadc)=wc_ewc_simplify(subst(vals,rhs(ndsadc)),tol["U_In"]=1);
@c ===end===
@example maxima
+(%i1) load("wrstcse")$
+@group
+(%i2) vals: [
+ U_In=1.2*tol["U_In"], /* The input voltage range */
+ n_Bits=16, /* The ADC's number of bits */
+ U_Ref=1.2*(1+.01*tol["U_Ref"]), /* The Adc's reference */
+ E_Gain=1+1.2e-6*tol["E_Gain"], /* Gain error */
+ E_Offset=1.5e-6 /* Offset error */
+ ];
+(%o2) [U_In = 1.2 tol , n_Bits = 16,
+ U_In
+U_Ref = 1.2 (0.01 tol + 1), E_Gain = 1.2e-6 tol + 1,
+ U_Ref E_Gain
+E_Offset = 1.5e-6]
+@end group
+@group
+(%i3) ratprint:false;
+(%o3) false
+@end group
@group
-(%i1) vals:[
- R_1=100*(1+.01*tol[1]),
- R_2=200*(1+.01*tol[2])
-(%o1) [R_1 = 100 (0.01 tol + 1), R_2 = 200 (0.01 tol + 1)]
- 1 2
+(%i4) wc_inputvalueranges(vals);
+(%o4)
+ [ U_In min = - 1.2 typ = 0 max = 1.2 ]
+ [ ]
+ [ n_Bits min = 16 typ = 16 max = 16 ]
+ [ ]
+ [ U_Ref min = 1.188 typ = 1.2 max = 1.212 ]
+ [ ]
+ [ E_Gain min = 0.9999988 typ = 1 max = 1.0000012 ]
+ [ ]
+ [ E_Offset min = 1.5e-6 typ = 1.5e-6 max = 1.5e-6 ]
@end group
@group
-(%i2) ];
- R_1
- ---------
- R_2 + R_1
-(%o2) I_Out = %e
+(%i5) ndsadc:n_DSADC=((U_In*E_Gain+E_Offset)/U_Ref+.5)*(2^(n_Bits)-1);
+ n_Bits E_Gain U_In + E_Offset
+(%o5) n_DSADC = (2 - 1) (---------------------- + 0.5)
+ U_Ref
@end group
@group
-(%i3) ic:I_Out=exp(R_1/(R_1+R_2));
- 100 (0.01 tol + 1)
- 1
- -----------------------------------------
- 200 (0.01 tol + 1) + 100 (0.01 tol + 1)
- 2 1
-(%o3) I_Out = %e
+(%i6) lhs(ndsadc)=wc_ewc_simplify(subst(vals,rhs(ndsadc)));
+(%o6) n_DSADC = 65535 ((0.8333333333333334
+ (1.5e-6 - 1.2 (1.2e-6 tol + 1) tol ))
+ E_Gain U_Ref
+/(0.01 tol + 1) + 0.5)
+ U_Ref
@end group
@group
-(%i4) subst(vals,ic);
-(%o4) wc_toltaylor(expt(2.718281828459045,
- 100 (0.01 tol + 1)
- 1
- -----------------------------------------), 2.0)
- 200 (0.01 tol + 1) + 100 (0.01 tol + 1)
- 2 1
+(%i7) lhs(ndsadc)=wc_ewc_simplify(subst(vals,rhs(ndsadc)),tol["U_In"]=1);
+(%o7) n_DSADC = 65535 ((0.8333333333333334
+ (1.2 tol (1 - 1.2e-6 tol ) + 1.5e-6))
+ U_In U_Ref
+/(0.01 tol + 1) + 0.5)
+ U_Ref
@end group
-(%i5) float(wc_toltaylor(rhs(%),2));
@end example
@end deffn
diff --git a/share/contrib/wrstcse.mac b/share/contrib/wrstcse.mac
index 4932aedbb..59039341d 100644
--- a/share/contrib/wrstcse.mac
+++ b/share/contrib/wrstcse.mac
@@ -294,8 +294,13 @@ wc_mintypmax_percent([x]):=block([mintypmax:apply('wc_mintypmax,x)],
for a high number of tol[n]. This function now merges all tol[n] we can
determine for in which direction they will affect the tolerances,
starting at the typical case and merge them in order to speed up the
-brute-force step */
-wc_ewc_simplify(x):=block(
+brute-force step.
+
+defs allows to add things like
+ tol[1]=0 for preventing tol[1] from being merged, or
+ tol[2]=1 for preventing tol[1] from being merged and assuming it to read 1.
+*/
+wc_ewc_simplify(x,[defs]):=block(
[
/* The derivate of x to the tol[n] we currently look at */
wc_diffofwctol,
@@ -304,14 +309,25 @@ wc_ewc_simplify(x):=block(
/*the tol[n] we merge as many tolerances as we can to */
mergedtol:[],
/* Is the tol[n] we merge as many tolerances as we can to positive? */
- wc_mergedtoldirection:1
+ wc_mergedtoldirection:1,
+ /* x with defs temporarily substituted into it */
+ x_defs
],
- for wc_tol in %wc_tols(x) do
+
+ /* substitute the tol[n] our defs give us values to into x */
+ if errcatch(
+ x_defs:x,
+ if defs # [] then x_defs:subst(defs,x),
+ 'wc_success
+ ) # ['wc_success] then
+ error ("wc_ewc_simplify: parameters 2...n need to be assignments to tol[n]."),
+ /* Now let's see we can merge the remaining tol[n] */
+ for wc_tol in %wc_tols(x_defs) do
/* If one step of this loop errors out this means one tolerance isn't merged, but
the for loop can still continue. */
errcatch(
- /* Let's see if increasing the current tol[n] increases x*/
- wc_diffofwctol:%wc_typicalvalues(diff(x,wc_tol),wc_tol),
+ /* Let's see if increasing the current tol[n] increases x_defs*/
+ wc_diffofwctol:%wc_typicalvalues(diff(x_defs,wc_tol),wc_tol),
wc_diffofwctollimit:limit(wc_diffofwctol,wc_tol,0),
if wc_diffofwctollimit='ind then block(
[
@@ -321,7 +337,7 @@ wc_ewc_simplify(x):=block(
if (poslimit='pos and (neglimit='pos or neglimit='zero)) or
(neglimit='pos and (poslimit='pos or poslimit='zero)) then
(
- /* increasing tol[n] increases x */
+ /* increasing tol[n] increases x_defs */
if mergedtol = [] then
(
/* merge this tol[n] with all future ones */
@@ -329,27 +345,33 @@ wc_ewc_simplify(x):=block(
wc_mergedtoldirection:1
)
else
- x:subst(wc_tol=wc_mergedtoldirection*mergedtol,x)
- ),
- if (poslimit='neg and (neglimit='neg or neglimit='zero)) or
- (neglimit='neg and (poslimit='neg or poslimit='zero)) then
(
- /* increasing tol[n] decreases x */
- if mergedtol = [] then
- (
- /* merge this tol[n] with all future ones */
- mergedtol:wc_tol,
- wc_mergedtoldirection:-1
- )
+ x_defs:subst(wc_tol=wc_mergedtoldirection*mergedtol,x_defs),
+ x :subst(wc_tol=wc_mergedtoldirection*mergedtol,x )
+ )
+ ),
+ if (poslimit='neg and (neglimit='neg or neglimit='zero)) or
+ (neglimit='neg and (poslimit='neg or poslimit='zero)) then
+ (
+ /* increasing tol[n] decreases x_defs */
+ if mergedtol = [] then
+ (
+ /* merge this tol[n] with all future ones */
+ mergedtol:wc_tol,
+ wc_mergedtoldirection:-1
+ )
else
- x:subst(wc_tol=-wc_mergedtoldirection*mergedtol,x)
+ (
+ x_defs:subst(wc_tol=-wc_mergedtoldirection*mergedtol,x_defs),
+ x :subst(wc_tol=-wc_mergedtoldirection*mergedtol,x )
)
+ )
)
else
(
if wc_diffofwctollimit > 0 then
(
- /* increasing tol[n] increases x */
+ /* increasing tol[n] increases x_defs */
if mergedtol = [] then
(
/* merge this tol[n] with all future ones */
@@ -357,13 +379,17 @@ wc_ewc_simplify(x):=block(
wc_mergedtoldirection:1
)
else
- x:subst(wc_tol=wc_mergedtoldirection*mergedtol,x)
- ) else
+ (
+ x_defs:subst(wc_tol=wc_mergedtoldirection*mergedtol,x_defs),
+ x :subst(wc_tol=wc_mergedtoldirection*mergedtol,x )
+ )
+ )
+ else
(
/* The above if might have resulted in true or unknown */
if wc_diffofwctollimit < 0 then
(
- /* increasing wc_tol decreases x */
+ /* increasing wc_tol decreases x_defs */
if mergedtol = [] then
(
/* merge this wc_tol with all future ones */
@@ -372,7 +398,10 @@ wc_ewc_simplify(x):=block(
)
else
/* merge this wc_tol with the first one we identified a direction for */
- x:subst(wc_tol=-wc_mergedtoldirection*mergedtol,x)
+ (
+ x_defs:subst(wc_tol=-wc_mergedtoldirection*mergedtol,x_defs),
+ x :subst(wc_tol=-wc_mergedtoldirection*mergedtol,x )
+ )
)
)
)
-----------------------------------------------------------------------
Summary of changes:
doc/info/wrstcse.texi | 113 ++++++++++++++++++++++++++++------------------
share/contrib/wrstcse.mac | 77 +++++++++++++++++++++----------
2 files changed, 121 insertions(+), 69 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-10-03 17:16:26
|
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, rtoy-rework-highlightjs-vars has been created
at d974c31ece4986086fdf6ccbd60cdad160be139e (commit)
- Log -----------------------------------------------------------------
commit d974c31ece4986086fdf6ccbd60cdad160be139e
Author: Raymond Toy <toy...@gm...>
Date: Fri Oct 3 10:15:14 2025 -0700
Add some comments about the variables
It's important that the variables fit on one line. If they aren't the
generated makefile is broken.
diff --git a/configure.ac b/configure.ac
index b3455f3eb..46f0240bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,10 +745,17 @@ if test x"${enable_build_docs}" = xtrue ; then
TEXI_EXTRA_TAIL=')'
fi
if test x${syntax_highlighting} = xhighlightjs; then
+ dnl Update HIGHTLIGHT_VER, LIGHTMODE, and DARKMODE
+ dnl variables if we decide to change the version, the light
+ dnl mode style or the dark mode style.
CDN="https://cdnjs.cloudflare.com/ajax/libs/highlight.js"
HIGHLIGHT_VER="11.11.1"
LIGHTMODE="github.min.css"
DARKMODE="github-dark.min.css"
+ dnl Make sure HIGHLIGHT1 and HIGHLIGHT2 are all on one line
+ dnl because these variables are placed in the Makefile and
+ dnl make doesn't support multiple-line variable
+ dnl assignments.
HIGHLIGHT1=$(cat <<EOF
<link rel="stylesheet" media="(prefers-color-scheme: light)" href="$CDN/$HIGHLIGHT_VER/styles/$LIGHTMODE" > <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="$CDN/$HIGHLIGHT_VER/styles/$DARKMODE" > <script src="$CDN/$HIGHLIGHT_VER/highlight.min.js"></script> <script src="$CDN/$HIGHLIGHT_VER/languages/maxima.min.js"></script>
EOF
commit f17a1020bddf14d8ef983dfac36fc9e2d7f9ed08
Author: Raymond Toy <toy...@gm...>
Date: Fri Oct 3 10:08:00 2025 -0700
Rework highlightjs to make it easier read/modify
The variable HIGHLIGHT1 has a lot of redundant stuff. Let's define
some variables to make reading and modifying HIGHGLIGHT1 simpler.
* CDN si the main part of the URL where we're loading
highlightjs from.
* HIGHLIGHT_VER is the version we want to use
* LIGHTMODE is the CSS file we want for light mode display
* DARKMODE is the CSS file we want for dark mode display
Finally, use these variables to define the value of HIGHLIGHT1. To do
this we use `cat` with a `HERE` document to make shell substitution
easier. Otherwise we get into a huge mess of shell-quoting issues
with single- and double-quotes.
diff --git a/configure.ac b/configure.ac
index 2f81ef6fb..b3455f3eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,10 +745,15 @@ if test x"${enable_build_docs}" = xtrue ; then
TEXI_EXTRA_TAIL=')'
fi
if test x${syntax_highlighting} = xhighlightjs; then
- HIGHLIGHT1='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github.min.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" media="(prefers-color-scheme: dark)"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/maxima.min.js"> </script>
-'
- HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>
-"
+ CDN="https://cdnjs.cloudflare.com/ajax/libs/highlight.js"
+ HIGHLIGHT_VER="11.11.1"
+ LIGHTMODE="github.min.css"
+ DARKMODE="github-dark.min.css"
+ HIGHLIGHT1=$(cat <<EOF
+<link rel="stylesheet" media="(prefers-color-scheme: light)" href="$CDN/$HIGHLIGHT_VER/styles/$LIGHTMODE" > <link rel="stylesheet" media="(prefers-color-scheme: dark)" href="$CDN/$HIGHLIGHT_VER/styles/$DARKMODE" > <script src="$CDN/$HIGHLIGHT_VER/highlight.min.js"></script> <script src="$CDN/$HIGHLIGHT_VER/languages/maxima.min.js"></script>
+EOF
+)
+ HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>"
fi
if test x${syntax_highlighting} = xpygments; then
if test ${makeinfo_version} -ge 702; then
@@ -761,7 +766,7 @@ if test x"${enable_build_docs}" = xtrue ; then
dnl AC_SUBST(HLJS_CSS_SELECTOR)
AC_SUBST(TEXI_EXTRA_TAIL)
AC_SUBST(HIGHLIGHT1)
- AC_SUBST(HIGHLIGHT2)
+ AC_SUBST(HIGHLIGHT2)
AC_SUBST(USE_PYGMENTS)
TEXI2HTML=texi2html.init
AC_SUBST(TEXI2HTML)
commit 638aa82fc250aea133ce79ac87e8a1efa9f79fab
Author: Raymond Toy <toy...@gm...>
Date: Fri Sep 19 12:46:13 2025 -0700
Run update_examples on one example for integrate_use_rootsof
Apparently we didn't run update_examples on all the examples in
Integration.texi.m4. We missed one exapmle for integrate_use_rootsof.
Regenerate this example which also allows syntax highlighting for this
example.
diff --git a/doc/info/Integration.texi.m4 b/doc/info/Integration.texi.m4
index 4a382dba0..7c55b1abf 100644
--- a/doc/info/Integration.texi.m4
+++ b/doc/info/Integration.texi.m4
@@ -756,7 +756,7 @@ function:
@c integrate_use_rootsof: true$
@c integrate (1/(1+x+x^5), x);
@c ===end===
-@example
+@example maxima
(%i1) integrate_use_rootsof: true$
@group
(%i2) integrate (1/(1+x+x^5), x);
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: dauti <da...@us...> - 2025-10-02 19:22:03
|
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 bedbea55d4c78181c67a15c99496c70c536ec7c4 (commit)
from 6d08651cb3ab5fd28c2760b6f339a35c643b8320 (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 bedbea55d4c78181c67a15c99496c70c536ec7c4
Author: Wolfgang Dautermann <da...@us...>
Date: Thu Oct 2 21:21:36 2025 +0200
Windows installer: Update SBCL.
diff --git a/crosscompile-windows/sbcl/CMakeLists.txt b/crosscompile-windows/sbcl/CMakeLists.txt
index 0f06dbd07..9a105995b 100644
--- a/crosscompile-windows/sbcl/CMakeLists.txt
+++ b/crosscompile-windows/sbcl/CMakeLists.txt
@@ -11,8 +11,8 @@
# updated setup-file automatically.
if(BUILD_64BIT)
- set(SBCLVERSION "2.5.8")
- set(SBCL_MD5 "4ad6741131b9ba0846354608883a89ae")
+ set(SBCLVERSION "2.5.9")
+ set(SBCL_MD5 "9db0626b254ac75fe370c7a53e22a3f7")
set(SBCL_INSTALLERNAME "sbcl-${SBCLVERSION}-x86-64-windows-binary.msi")
else()
set(SBCLVERSION "2.3.2")
-----------------------------------------------------------------------
Summary of changes:
crosscompile-windows/sbcl/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: dauti <da...@us...> - 2025-09-28 20:22:55
|
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 6d08651cb3ab5fd28c2760b6f339a35c643b8320 (commit)
from a9566ae56b1ad08506f38bc6c06e4380dbd1773c (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 6d08651cb3ab5fd28c2760b6f339a35c643b8320
Author: Wolfgang Dautermann <da...@us...>
Date: Sun Sep 28 22:20:31 2025 +0200
Fix some table related error in the HTML manual.
Down from 775 to 748 messages in the W3C HTML validator.
diff --git a/doc/info/format.texi.m4 b/doc/info/format.texi.m4
index bfd61eb1c..f60f13a63 100644
--- a/doc/info/format.texi.m4
+++ b/doc/info/format.texi.m4
@@ -143,8 +143,8 @@ equivalents of structuring templates using subtemplates.
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{Algebraic}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{Algebraic}} @tab @tab
@item @code{%poly(@var{x}@sub{1},...), %p} @tab polynomial in @var{x@sub{i}} @tab coefficients (ascending exps.)
@item @code{%series(@emph{eps},@emph{n}), %s} @tab series in @emph{eps} through order @emph{n} @tab coefficients (ascending exps.)
@item @code{%Taylor(@emph{eps},@emph{n})} @tab Taylor in @emph{eps} through order @emph{n} @tab coefficients (ascending exps.)
@@ -155,16 +155,16 @@ equivalents of structuring templates using subtemplates.
@*
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{Sums}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{Sums}} @tab @tab
@item @code{%sum} @tab @emph{passive} @tab terms (@code{inpart} order)
@item @code{%partfrac(@var{x}), %pf} @tab partial fraction decomp in @var{x} @tab terms (@code{inpart} order)
@end multitable
@*
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{Products}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{Products}} @tab @tab
@item @code{%product, %prod} @tab @emph{passive} @tab factors (@code{inpart} order)
@item @code{%factor, %f} @tab factored form @tab factors (@code{inpart} order)
@item @code{%factor(@emph{minpoly}), %f} @tab factored with element adjoined @tab factors (@code{inpart} order)
@@ -173,24 +173,24 @@ equivalents of structuring templates using subtemplates.
@*
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{Fractions}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{Fractions}} @tab @tab
@item @code{%frac} @tab @emph{passive} @tab numerator and denominator
@item @code{%ratsimp, %r} @tab rationally simplified @tab numerator and denominator
@end multitable
@*
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{Complex}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{Complex}} @tab @tab
@item @code{%rectform, %g} @tab gaussian form @tab real and imaginary parts
@item @code{%polarform} @tab polar form @tab magnitude and phase
@end multitable
@*
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{Bags}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{Bags}} @tab @tab
@item @code{%equation, %eq} @tab equation @tab l.h.s. and r.h.s.
@item @code{%relation(@var{r}), %rel} @tab relation; @var{r} in @code{(=,>,>=,<,<=,!=)} @tab l.h.s. and r.h.s.
@item @code{%list} @tab list @tab elements
@@ -199,16 +199,16 @@ equivalents of structuring templates using subtemplates.
@*
@noindent
@multitable @columnfractions .3 .4 .4
-@strong{Class: @emph{General}}
@headitem Template(w/abbrev.) @tab Coersion to @tab Pieces and Ordering
+@item @strong{Class: @emph{General}} @tab @tab
@item @code{%expression, %expr} @tab @emph{passive} @tab the operands (@code{inpart} order)
@item @code{%preformat(@var{T@sub{1}},...)} @tab format accord. to chain @var{T@sub{i}} @tab the result, not the parts
@end multitable
@*
@noindent
@multitable @columnfractions .3 .7
-@strong{Class: @emph{Targeting}}
@headitem Template(w/abbrev.) @tab Function
+@item @strong{Class: @emph{Targeting}} @tab
@item @code{%arg(n)} @tab formats the @code{n}-th argument
@item @code{%lhs(@var{r})} @tab formats the l.h.s. of an eqn. or relation (default '=')
@item @code{%rhs(@var{r})} @tab formats the l.h.s. of an eqn.
@@ -219,15 +219,15 @@ equivalents of structuring templates using subtemplates.
@*
@noindent
@multitable @columnfractions .3 .7
-@strong{Class: @emph{Control}}
@headitem Template(w/abbrev.) @tab Function
+@item @strong{Class: @emph{Control}} @tab
@item @code{%if(@var{P@sub{1}},...)[@var{T@sub{1}},...,@var{T@sub{n+1}}]} @tab Find first @var{P@sub{i}(@emph{expr})} @arrow{} @code{true}, then format @emph{expr} using @var{T@sub{i}}, else @var{T@sub{n+1}}
@end multitable
@*
@noindent
@multitable @columnfractions .3 .7
-@strong{Class: @emph{Subtemplate Aids}}
@headitem Template(w/abbrev.) @tab Function
+@item @strong{Class: @emph{Subtemplate Aids}} @tab
@item @code{%noop} @tab does nothing; used to fill a subtemplate slot
@item @code{[@var{T@sub{1}},@var{T@sub{2}},...]} @tab creates a template chain where an individual template was expected
@item @code{%ditto(@var{T})} @tab repeats the template so that it applies to following pices
@@ -235,8 +235,8 @@ equivalents of structuring templates using subtemplates.
@*
@noindent
@multitable @columnfractions .3 .7
-@strong{Class: @emph{Convenience}}
@headitem Template(w/abbrev.) @tab Function
+@item @strong{Class: @emph{Convenience}} @tab
@item @code{%subst(@emph{eqns},...)} @tab substitutes @emph{eqns} into expression; result is formatted at next layer
@item @code{%ratsubst(@emph{eqns},...)} @tab @code{lratsubst}'s @emph{eqns} into expression; result is formatted at next layer
@end multitable
-----------------------------------------------------------------------
Summary of changes:
doc/info/format.texi.m4 | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: dauti <da...@us...> - 2025-09-27 16:11:39
|
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 a9566ae56b1ad08506f38bc6c06e4380dbd1773c (commit)
from 0f64482b64e36b3f06c2d506af664907c1fee745 (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 a9566ae56b1ad08506f38bc6c06e4380dbd1773c
Author: Wolfgang Dautermann <da...@us...>
Date: Sat Sep 27 18:09:45 2025 +0200
Syntax highlighting: Update highlight.js.
diff --git a/configure.ac b/configure.ac
index a4ce95a13..2f81ef6fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,7 +745,7 @@ if test x"${enable_build_docs}" = xtrue ; then
TEXI_EXTRA_TAIL=')'
fi
if test x${syntax_highlighting} = xhighlightjs; then
- HIGHLIGHT1='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github.min.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/styles/github-dark.min.css" media="(prefers-color-scheme: dark)"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.10.0/languages/maxima.min.js"> </script>
+ HIGHLIGHT1='<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github.min.css" media="(prefers-color-scheme: light)"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/github-dark.min.css" media="(prefers-color-scheme: dark)"> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/highlight.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/languages/maxima.min.js"> </script>
'
HIGHLIGHT2="<script> hljs.configure({languages: [['Maxima']], cssSelector: ${HLJS_CSS_SELECTOR}}); hljs.highlightAll(); </script>
"
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: villate <vi...@us...> - 2025-09-23 20:09:10
|
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 Website".
The branch, master has been updated
via d234abed2963a4952545c82fa0db75af955e4dbf (commit)
from 0ada990ecae7261a0fdd6376681f13b2912ff018 (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 d234abed2963a4952545c82fa0db75af955e4dbf
Author: villate <vi...@fe...>
Date: Tue Sep 23 21:08:19 2025 +0100
New list of third party software, contributed by Eirc Majzoub.
diff --git a/3rdpartycode.html b/3rdpartycode.html
index 43b123d..48c89cd 100644
--- a/3rdpartycode.html
+++ b/3rdpartycode.html
@@ -1,11 +1,11 @@
<!DOCTYPE html>
<html lang="en-US">
<head>
-<meta charset="UTF-8">
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Maxima is a fairly complete computer algebra system written in Lisp with an emphasis on symbolic computation. It is based on DOE-MACSYMA and licensed under the GPL free software license. Its abilities include symbolic integration, 3D plotting and solving differential equations.">
<meta name="keywords" content="Maxima, CAS, computer algebra, mathematics, Lisp, symbolic computation, MACSYMA, GPL, free software, differential equations, plotting">
-<title>Maxima – Third Party Code</title>
+<title>Maxima â Third Party Code</title>
<link rel="stylesheet" href="maxima.css">
<link rel="icon" type="image/svg+xml" href="img/maxima.svg">
<link rel="alternate icon" href="img/favicon.ico">
@@ -14,7 +14,7 @@
<div class="header">
<img class="contract2 center" alt="Maxima" src="img/maxima-title.svg">
<div class="language">
-<button class="languagebtn">æA <span>Languages ⌄</span></button>
+<button class="languagebtn">æA <span>Languages â</span></button>
<div class="language-content">
<a href="es/3rdpartycode.html">Español</a>
<a href="ru/3rdpartycode.html">Ð ÑÑÑкий</a>
@@ -22,7 +22,7 @@
</div>
</div>
<div class="sections">
-<button class="sectionsbtn">☰ <span>Sections ⌄</span></button>
+<button class="sectionsbtn">â° <span>Sections â</span></button>
<div class="sections-content">
<a href="index.html">Home</a>
<a href="download.html">Downloads</a>
@@ -39,31 +39,43 @@
</div>
<div class="card">
<h2>Third Party Code</h2>
-<p>The following list links to some packages that we cannot include in
-the official Maxima distribution due to legal restrictions or because
-they are not in a stable state yet.</p>
-<p>Other stable packages that are not part of the official Maxima
-distribution because they are being maintained somewhere else, can be
-found in <a href="relatedprojects.html">Projects Related to
-Maxima</a>.</p>
+<p>The following list links to some packages not included in
+the official Maxima distribution.</p>
<dl class="spacious">
<dt><a href="https://inside.mines.edu/~whereman/software.html">Hereman's
Software</a></dt>
<dd>Includes some Macsyma packages by Willy Hereman et
al. Commercial use is not permitted without consent of the
authors.</dd>
- <dt><a href="https://sourceforge.net/p/piecewisefunc/wiki/Home/">Pw.mac</a></dt>
+ <dt><a href="https://github.com/dprodanov/clifford">clifford</a></dt>
+ <dd>A package for performing geometric and Clifford algebra calculations.</dd>
+ <dt><a href="https://github.com/andrejv/discrete.mac">discrete</a></dt>
+ <dd>This is a package for discrete mathematics and combinatorics,
+ including functions for permutations, graphs, and number
+ theory.</dd>
+ <dt><a href="https://github.com/ahermann29/ode2singular">ode2singular</a></dt>
+ <dd>This is a symbolic solver for linear ordinary differential
+ equations of 2nd order.</dd>
+ <dt><a href="https://github.com/barton-willis/operator_algebra">operator_algebra</a></dt>
+ <dd>This is a package for handling operator algebra within the
+ Maxima Computer Algebra System, with a particular emphasis on
+ quantum mechanical operators.</dd>
+ <dt><a href="https://github.com/josanvallejo/padics">padics</a></dt>
+ <dd>A package for computing with p-adic numbers in Maxima.</dd>
+ <dt><a href="https://github.com/emmanuelroque/pdefourier">pdefourier</a></dt>
+ <dd>A package for doing Fourier analysis and solving partial
+ differential equations in Maxima.</dd>
+ <dt><a href="https://sourceforge.net/p/piecewisefunc/wiki/Home/">pw.mac</a></dt>
<dd>The package pw.mac extends Maxima by enabling it to work with
piecewise continuous functions.</dd>
- <dt><a href="http://www.johnlapeyre.com/qinf/index.html">Qinf</a></dt>
+ <dt><a href="https://github.com/jlapeyre/qinf">qinf</a></dt>
<dd>Quantum information and entanglement package. A quantum
information package that allows the manipulation of instances of
objects â operators, vectors, tensors, etc. â that appear in the
theory of quantum information and quantum entanglement.</dd>
- <dt><a href="https://sourceforge.net/projects/symsap/">SymSAP</a></dt>
- <dd>Symbolic matrix analysis of structures. SymSAP aims to become a
- powerful didactic tool to help students learn structural
- analysis.</dd>
+ <dt><a href="https://github.com/QMeqGR/qm-maxima">qm-maxima</a></dt>
+ <dd>A package providing computational tools for solving quantum
+mechanics problems in a finite-dimensional Hilbert space.</dd>
<dt><a href="http://rfmaxima.sourceforge.net/">rfMaxima</a></dt>
<dd>rfMaxima allows for symbolic derivation, as well as numerical
evaluation (incl. Bode and Smith chart plotting), of 2-port network
@@ -71,7 +83,11 @@ Maxima</a>.</p>
parameters. Derivations are based on the solution of the set of
Kirchoff current and voltage law equations representing the
2-port. Expressions can be exported to HTML or TeX. Figures can be
- exported to EPS or PNG.</dd>
+ exported to EPS or PNG.</dd>
+ <dt><a href="https://sourceforge.net/projects/symsap/">SymSAP</a></dt>
+ <dd>Symbolic matrix analysis of structures. SymSAP aims to become a
+ powerful didactic tool to help students learn structural
+ analysis.</dd>
</dl>
<p>If you know any old Macsyma code still available on the Internet or
new Maxima packages that should be included in this list, please tell
@@ -81,7 +97,7 @@ distribution, if its license is compatible with Maxima's.</p>
<div class="footer">
<p>Any questions about Maxima or this site can be sent to our
<a href="mailto:max...@li...">mailing list</a>.</p>
-<span>Last modified: 2025/07/24 14:41:37 UTC</span>
+<span>Last modified: 2025/09/23 20:03:54 UTC</span>
</div>
</body>
</html>
-----------------------------------------------------------------------
Summary of changes:
3rdpartycode.html | 54 +++++++++++++++++++++++++++++++++++-------------------
1 file changed, 35 insertions(+), 19 deletions(-)
hooks/post-receive
--
Maxima CAS Website
|
|
From: rtoy <rt...@us...> - 2025-09-19 16:47:39
|
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 0f64482b64e36b3f06c2d506af664907c1fee745 (commit)
from e69e26d612924d67caecee2e33572217a4b88ba7 (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 0f64482b64e36b3f06c2d506af664907c1fee745
Author: Raymond Toy <toy...@gm...>
Date: Fri Sep 19 09:45:37 2025 -0700
Add nice TeX formula for dblint formula for HTML
There was already a TeX formula for the double integral that was used
for the pdf manual. Modify this slightly to use `m4_displaymath` so
we get a nice TeX formula for the html and pdf manual, and a text
formula for text version of the manual.
diff --git a/doc/info/Integration.texi.m4 b/doc/info/Integration.texi.m4
index 7cb18a034..4a382dba0 100644
--- a/doc/info/Integration.texi.m4
+++ b/doc/info/Integration.texi.m4
@@ -130,10 +130,10 @@ top-level Maxima and then translated and compiled to machine code.
Use @code{load ("dblint")} to access this package. It uses the Simpson's rule
method in both the x and y directions to calculate
-@tex
-$$\int_a^b \int_{r\left(x\right)}^{s\left(x\right)} f\left(x,y\right) \, dy \, dx.$$
-@end tex
-@ifnottex
+m4_displaymath(
+<<<\int_a^b \int_{r\left(x\right)}^{s\left(x\right)} f\left(x,y\right) \, dy \, dx
+>>>,
+<<<
@example
@group
/b /s(x)
@@ -143,7 +143,7 @@ $$\int_a^b \int_{r\left(x\right)}^{s\left(x\right)} f\left(x,y\right) \, dy \, d
/a /r(x)
@end group
@end example
-@end ifnottex
+>>>)
The function @var{f} must be a translated or compiled function of two variables,
and @var{r} and @var{s} must each be a translated or compiled function of one
-----------------------------------------------------------------------
Summary of changes:
doc/info/Integration.texi.m4 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-09-19 14:56:04
|
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 e69e26d612924d67caecee2e33572217a4b88ba7 (commit)
from 3c5e3255a9be6a84aaeaeb779bbb2e83809f46c3 (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 e69e26d612924d67caecee2e33572217a4b88ba7
Author: Raymond Toy <toy...@gm...>
Date: Fri Sep 19 07:43:43 2025 -0700
PARSE-TEXINFO-VERSION handles texinfo dev version
Texinfo dev versions produces version strings like "7.2dev". Update
`parse-texinfo-version` to handle this by handling the "dev" part by
treating it as a patch version of 99. This assumes there will never
be 99 patches for any texinfo version.
This isn't perfect and could be made a lot more robust, but for now
it's good enough to handle all of the texinfo versions I've run
across.
diff --git a/doc/info/build-html-index.lisp b/doc/info/build-html-index.lisp
index ffd5f2d12..049cc3e70 100644
--- a/doc/info/build-html-index.lisp
+++ b/doc/info/build-html-index.lisp
@@ -320,7 +320,10 @@
;; Parse the texinfo version string. It should look something like
;; "M.m.p", where M and m are a sequence of (base 10) digits and ".p"
-;; is the optional patch version.
+;; is the optional patch version. However, development versions of
+;; texinfo look like "M.mdev" where there patch version is "dev"
+;; instead of ".p". In this case, set the patch version to be 99 on
+;; the assumption there will never be that many patches.
(defun parse-texinfo-version (string)
(when string
(let ((posn 0)
@@ -332,6 +335,21 @@
(parse-integer string
:start posn
:junk-allowed t)
+ ;; Debugging print to show parsing steps
+ #+nil
+ (format t "k = ~D: start ~D end ~d substring ~S~%"
+ k posn end (subseq string posn end))
+ (when (null digits)
+ ;; If there were no digits in the substring, and we're
+ ;; looking for the patch version (k = 2), assume we have
+ ;; a texinfo dev version and set digits to 99.
+ ;; Otherwise signal an error that we can't parse the
+ ;; texinfo version.
+ (if (= k 2)
+ (setf digits 99)
+ (error "Can't parse texinfo version string ~A for part ~D"
+ (subseq string posn)
+ k)))
(push digits version)
(setf posn (1+ end)))))
(apply #'texinfo-version-number (nreverse version)))))
-----------------------------------------------------------------------
Summary of changes:
doc/info/build-html-index.lisp | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|