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
(24) |
Nov
(69) |
Dec
(34) |
|
From: rtoy <rt...@us...> - 2025-12-16 02:38:38
|
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-improve-cdiv-accuracy has been updated
via bc85dbb6143c45a20b783e92bde2a4656a96aca2 (commit)
via bc2525b3064254c00efbf1e339599ce340412113 (commit)
via ca899141c50544575e6a58e9486368bce8ad67f1 (commit)
via cce856a60952c971e6f3604706335455c9a46fca (commit)
via a77814ea29d6693bdf7b704c824dbfb8ebeb4dd2 (commit)
via e6095d9c76d3dda5adfb3ca42aea303ce67892ed (commit)
via 77a6c862f000a41c36da522db27020a8b0626cc4 (commit)
via bb307e3ac366da08489246040006a3e00bddd635 (commit)
via f350ddd019079b69da22d3df4691392003f0e34d (commit)
via ee369a0f5d1a40bb26a0dc80b6ce3de0475cd469 (commit)
from 59aa93724b09dd2fe8685a73873fbc6597bf45e9 (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 bc85dbb6143c45a20b783e92bde2a4656a96aca2
Merge: 59aa93724 bc2525b30
Author: Raymond Toy <toy...@gm...>
Date: Mon Dec 15 07:54:54 2025 -0800
Merge branch 'master' into rtoy-improve-cdiv-accuracy
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 23 +---
ChangeLog => changelogs/ChangeLog-5.49.md | 5 +-
configure.ac | 2 +-
doc/info/Matrices.texi.m4 | 63 +++++++++
maxima.spec.in | 6 +-
share/diffequations/hstep.lisp | 77 -----------
src/comm2.lisp | 7 +
src/displa.lisp | 7 +-
src/hstep.lisp | 104 +++++++++++++++
src/max_ext.lisp | 3 +-
src/maxima.system | 1 +
src/testsuite.lisp | 4 +-
tests/rtest_hstep.mac | 210 ++++++++++++++++++++++++++++++
tests/test_matrix_display.mac | 23 +++-
14 files changed, 420 insertions(+), 115 deletions(-)
copy ChangeLog => changelogs/ChangeLog-5.49.md (83%)
delete mode 100644 share/diffequations/hstep.lisp
create mode 100644 src/hstep.lisp
create mode 100644 tests/rtest_hstep.mac
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-15 09:56:49
|
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, branch-5_49 has been updated
via 12384f54b4fdc30450bee5774e2801b7a4b3801e (commit)
from ca899141c50544575e6a58e9486368bce8ad67f1 (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 12384f54b4fdc30450bee5774e2801b7a4b3801e
Author: Viktor T. Toth <vt...@vt...>
Date: Mon Dec 15 04:56:28 2025 -0500
Updating configure.ac with new version number
diff --git a/configure.ac b/configure.ac
index abef6b000..b358afb88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ dnl Note: during Lisp-based builds (see INSTALL.lisp) the version
dnl number is read from the following AC_INIT line. It's sensitive to
dnl whitespace so when updating the version number only make changes
dnl within the second pair of square brackets.
-AC_INIT([maxima], [5.48post])
+AC_INIT([maxima], [5.49.0])
AC_CONFIG_SRCDIR([src/macsys.lisp])
AM_INIT_AUTOMAKE([-Wno-portability tar-ustar])
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-15 09:55:40
|
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 bc2525b3064254c00efbf1e339599ce340412113 (commit)
from ca899141c50544575e6a58e9486368bce8ad67f1 (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 bc2525b3064254c00efbf1e339599ce340412113
Author: Viktor T. Toth <vt...@vt...>
Date: Mon Dec 15 04:55:24 2025 -0500
Updating configure.ac with new version number
diff --git a/configure.ac b/configure.ac
index abef6b000..883a73fe3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ dnl Note: during Lisp-based builds (see INSTALL.lisp) the version
dnl number is read from the following AC_INIT line. It's sensitive to
dnl whitespace so when updating the version number only make changes
dnl within the second pair of square brackets.
-AC_INIT([maxima], [5.48post])
+AC_INIT([maxima], [5.49post])
AC_CONFIG_SRCDIR([src/macsys.lisp])
AM_INIT_AUTOMAKE([-Wno-portability tar-ustar])
-----------------------------------------------------------------------
Summary of changes:
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-15 09:54: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, branch-5_49 has been created
at ca899141c50544575e6a58e9486368bce8ad67f1 (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-15 09:54: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 annotated tag, branch-5_49-base has been created
at 00acb694f8128b8e8bfcc544e1540df3def04d3e (tag)
tagging cce856a60952c971e6f3604706335455c9a46fca (commit)
replaces branch-5_48-base
tagged by Viktor T. Toth
on Mon Dec 15 04:49:53 2025 -0500
- Log -----------------------------------------------------------------
Tag base of 5.49 release branch.
Atri Bhattacharya (2):
Draw: Add support for cairolatex pdf terminal
Draw: add support for standalone cairolatex pdf terminal.
Barton Willis (18):
#4602 taylorinfo ignores asymp
Fixes for \#4615, \#4609, and \#4613
Update ChangeLog
Append tests from \#3183 %i * 3^%i/2^%i; does not consistently simplify
Fix #4614: correct atan2 reflection rule
Update ChangeLog for fix to bug #4614
Insert a docstring for generalized-surd-p.
Fix for #4619: limit(inf = inf) causes stack overflow Fix for #4603: Control stack regression with abs_integrate in 5.48.0
update ChangeLog for bugs 4603 & 4619
Fix for #3041 limit(inf*(zeroa+inf)) => und, should be inf
Update ChangeLog for fix to bug 3041.
#4633 integrate(exp(- t) log(t), t, 0, 1) --> integral nounform
Update ChangeLog for fix to bug 4633.
Fix for #4636 signum(ind) is an error
Update ChangeLog for fix for bug #4636
Fix #4638 cabs/carg/polarform overflow/underflow and #4642 sign error
#4648 autoload problem with hstep #4646 minor hstep problems and missing features
Update ChangeLog for fixes for bugs 4646, 4642, and 4648
Dan Gildea (4):
better fix for text/html index mismatch
Need to assume p > 0
limit( ( integrate((1-1/t)^t*%e^(%e*t), t, %e, x) / %e^(%e*x) ) , x, inf);
limit(((expintegral_ei(x)/%e^x)*x-1)*x,x,inf);
David Billinghurst (2):
Remove stray comment string from colnew example 5
cobyla.texi.m4: Add hyperlinks and DOI to references. Hyperlink maxima files.
Gunter Königsmann (31):
wrstcse: Many improvements
wrstcse: A function that compiles sensitivity information
wrstcse: A test case for the new function.
wrstcse: wc_mintypmax2tol now no more overswings its target values.
wrstcse: Further improvements
wrstcse: Functions that generate tolerance data from a distibution of measurement values
wrstcse: A function that tells maxima what range which variable is in
wrstcse: Documented the new command
wrstcse: Tried to resolve the testsuite error
wrstcse: More test cases
wrstcse: Diagrams for the documentation
wrstcse/docu: Added another see also command
wrstcse: Made the defailt EWC depth configurable
Merge branch 'feature/koengu/wrstcseEWCsamples'
wrstcse: wc_ewc_simplify should continue on errors
wrstcse: Handle the case diff(expr,tol[n]='ind)
More test cases for the new code
wrstcse: Made one example look nicer.
Document that the RSS method has poor support for non-linear tolerances
wrstcse: A few type checks
wrstcse: wrstcse_append now only changes indices if necessary
wrstcse: Added a new command that creates taylor series of tolerance dependencies
wrstcse: Documented the new command
wrstcse: A test for the new function
wrstcse: taught the rss methods to deal with asymmetric limits
wrstcase: Better support for assymetrical tolerances
wrstcse: Temporary definitions for wc_ewc_simplify()
wrstcse: wc_ewc_simplify no more uses diff() and limit()
wrstcse: Added wc_tolassumptions, which tells maxima which range tol[n] will be in
wrstcse: wc_inputvalueranges now has an optional parameter that accepts a bool
wrstcse: Documented the new functionalities.
Leo Butler (1):
batch_answers_from_file: correct the texinfo documentation
Raymond Toy (179):
Allow def-simplifier not to define a defmfun
Don't define alias/reversealias properties with custom-defmfun
Use def-simplifier to define realpart/imagpart simplifiers.
Fix mismatch between html and text indices
Add comments and clean up implementation a little
Merge branch 'rtoy-fix-html-text-indices-mismatch'
Add some more info about the kbateman function.
Use \pi/2 instead of \frac{\pi}{2} in kbateman
Show kbateman in terms of %w
Tell Maxima about more properties of kbateman
Update kbateman section to include examples
Add some tests for kbateman
Merge branch 'master' into rtoy-more-kbateman-info
Need to assume t > 0
Only highlight "@example maxima" examples
Output "@example maxima" instead of just "@example"
Add some more ===beg=== stuff and update examples
Add some more ===beg=== stuff and update examples
Update more examples to be autogenerated via update_examples
Update more examples to be autogenerated via update_examples
Add example input blocks and run update_examples
Add comment on why we use "@example maxima" now.
Add example input blocks and run update_examples
Configure --enable-syntax-highlighting for highlightjs/pygments
Support using pygments
Update CSS for pygments
Mention HTML syntax highlighting in summary
Fix bugs in testing value of syntax highlighting
Use correct CSS comment style; change line-height
Fix typo: nav-bar -> nav-panel
Put closing double quote at end of TEXIOPTS
Override pygments background color
Change default pygments line-height
Fix typo in error message about pygments
Make the background for pygments to match examples
Support dark mode too for pygments
Rerun update_examples
Set intanalysis:false for the intanalysis example
Run update_example for the laplace function
Fix up examples for exponential integrals
Add code to compute example for breakup
Run update_examples
Run update_examples
Remove redundant entry for div.highlight
Rename Numerical.texi to Numerical.texi.m4
Mathjax for polartorect and recttopolar
Mathjax for inverse_fft and fft
Mathjax differential equations
Mathjax numerical solutiosn of diffeq
Add graphs for the examples using rk
Run update_examples on Matrix.texi.m4
Add comment blocks so update_examples can generate the examples
Run update_examples to regenerate examples
Run update_examples to regenerate examples
Merge branch 'rtoy-operators-update-examples'
Run update_examples to regenerate examples
Run update_examples to regenerate examples
Run update_examples to regenerate examples
Merge branch 'master' into rtoy-plotting-update-examples
Add blocks to autogenerate more examples.
Merge branch 'master' into rtoy-database-update-examples
Merge branch 'rtoy-database-update-examples'
Run update_examples to regenerate examples
Fix #4601: regression in spherical_bessel_j integral
Move package affine, atensor, ctensor, itensor chapters
Oops. Put affine package in the right place
Update main menu and all nodes
Move Package sym with the other packages
Add some xrefs to other tensor packages
Add blocks for autogenerating examples, and run update_examples
Remove @noindent in the middle of a paragraph in colnew
Fix a few typos
Move commandline options and runtime environment sections
Update detailedmenu too
Update detailedmenu for affine and tensor packages
Merge branch 'rtoy-move-commandline-runtime-sections'
Regenerate commandline options table
Fix bad display of formula for minpack_lsquares
Move Errors and Warnings section
Add comment blocks to generate examples and run update_examples
Remove declare-top for $trigexpandplus and $trigexpandtimes
Run update_examples
Run update_examples on existing examples.
Add comment blocks for examples and regenerate them
Merge branch 'rtoy-input-update-examples'
Regenerate existing examples
Add comment blocks for examples and regenerate them
Regenerate existing examples
Add comment blocks for examples and regenerate them
Add comment blocks for examples and regenerate them
Add comment blocks for examples and regenerate them
Regenerate existing examples
Run update_examples on existing examples.
Add new comment blocks for examples and regenerate them
Regenerate examples
Regenerate existing examples
Mark various examples as maxima code
Regenerate existing examples
Add new comment blocks for examples and regenerate them
Add new comment blocks for examples and regenerate them
Rename odepack.texi to odepack.texi.m4
Add TeX formulas and code blocks to generate the examples
Ignore odepack.texi
Clarify that the result of dlsode_init should not be modified
Editorial changes to make things a bit easier to read
Add new comment blocks for examples and regenerate them
Add more comment blocks for examples and regenerate them
Add more comment blocks for examples and regenerate them
Add more comment blocks for examples and regenerate them
Add more comment blocks for examples and regenerate them
Fix typo in example
Allow highlightjs to use github-dark when in dark mode.
Fix #4607: CF issues
Add some tests for cf
Merge branch 'master' into bug-4607-cf-issues
Update from Michel
Merge branch 'bug-4607-cf-issues'
PARSE-TEXINFO-VERSION handles texinfo dev version
Add nice TeX formula for dblint formula for HTML
Run update_examples on one example for integrate_use_rootsof
Rework highlightjs to make it easier read/modify
Add some comments about the variables
Remove commented out AC_SUBST(HLJS_CSS_SELECTOR)
Run update_examples on one example for integrate_use_rootsof
Merge branch 'rtoy-rework-highlightjs-vars'
Merge branch 'master' into rtoy-def-simp-rpart
Clean up implementation
Document :custom-defmfun, and rearrange some comments
Fix up some comments and fix typo in def-simplifier macro
Add new option :skip-properties to def-simplifier
Document :SKIP-PROPERTIES arg
Rearrange documentation of base-name-and-options
Add comment on why :skip-properties is set
Merge branch 'rtoy-def-simp-rpart'
Update give-up function in def-simplifier
Update genfact simplifier with new give-up functions
Implement def-simplifier for cabs
Add some comments for def-simplifier for cabs
Remove old code for cabs.
Merge branch 'rtoy-def-simp-cabs'
Move carg defmfun function into the simplifier
Remove the custom defmfun for cabs; update the simplifier
Clean up implementation of cabs def-simplifier.
More minor cleanup of cabs simplifier
Rename local fun $carg to carg
Remove old impl of carg simplifier
Add "demo" extension for file_search_demo
Merge branch 'rtoy-def-simp-cabs2'
Merge branch 'master' into rtoy-def-simp-carg
Removing debugging prints in carg def-simp
Simplify carg def-simplifier
Make --list-avail show correct version and be consistent
Remove old experimental version
Quit if MAXIMA_PREFIX is not defined
Use get-dirs to get directories and add some comments
Update get-dirs to support cmucl and add some comments
Add more info to unix-like-dirname docstring
Use AS_HELP_STRING for --enable-foo options
Use AS_HELP_STRING for --with-foo options
Use AS_HELP_STRING for languages and other options
Let lisp handle --list-avail
Merge branch 'rtoy-lisp-list-avail-consistently'
Remove support for scl in configure.ac
Remove SCL conditionals
Use CSS variables to set the colors for light and dark mode
Comment out CSS for textbox, titlebox, and synposisbox
Remove @media dark mode CSS that's not used anymore
Move pygment CSS stuff together
Remove support for scl in configure.ac
Remove SCL conditionals
Merge branch 'rtoy-remove-scl'
Rename bfhalf to *bfhalf*
Update more places with bfhalf and friends
Remove bigfloat%pi and friends
Missed on more use of bfmhalf
Really remove bigfloat%pi and friends
Merge branch 'rtoy-remove-bigfloat%pi'
Fix #4647: Error in --preload file causes Lisp error
Update Changelog for #4647
Robert Dodier (23):
test.sh.in: specify --no-init on Maxima command line to prevent initialization file from changing test results.
Remove share/maxima-init.lisp because (1) it is empty, and (2) it is not loaded by default.
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.
New flag display_matrix_brackets; when true, display matrices with a bracket on either side, otherwise without brackets. Default is display_matrix_brackets = true.
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.
Commit new script test_matrix_display.mac to test display flags for matrix and box.
In 2-d display for derivatives, correct depth of denominator in Leibniz notation.
Add a test case for SF #3795: "incorrect integration" Bug already fixed by commit 4d8e30.
In USOLVE, catch errors propagating out of attempt to find inverse via SIMPLIFY, and fail gracefully (returning an unsolved equation) in that case.
grobner.lisp: cut out function type declaration for POLY-ADD-VARIABLES which SBCL complained about. For good measure, also cut out OPTIMIZE and INLINE declarations, in hope of making the code more straightforward to debug, should the need arise.
testsuite.lisp: unify identical lists #+gcl and #-gcl for rtest_to_poly_solve.
Rework construction of box expressions (labeled and unlabeled).
gentran: update function GENTRANERR to call MTELL correctly.
In gentran, return a statement group from SEG and SEGEXP instead of a Lisp list of statements.
Package gentran: allow streams in place of file names for output.
Package gentran: bring test cases up to date with respect to current version of the code.
Package gentran: Maxima strings are Lisp strings, not symbols with leading ampersand, so update gentran code accordingly.
Package gentran: create test cases which output C, Fortran, and Ratfor code for a given expression.
Enable ABCL to load lapack and dlsode via ASDF:LOAD-SOURCE-OP instead of trying to compile, which causes an error for some functions which are too big; the error message appears to say the JVM offset does not fit into 16 bits.
New flag display_matrix_padding_vertical to control between-rows padding for matrix display.
New flag display_matrix_padding_horizontal to control between-columns padding for matrix display.
Give $BOX the ALIAS property, so that a bare box symbol (not an expression operator) is parsed to MBOX.
test_matrix_display.mac: rework matrix padding examples somewhat.
Viktor T. Toth (6):
Adding 5.48 change log.
Updating configure.ac with new version number
Added generated doc/info/Numerical.texi to .gitignore
Removed info/es/plotdf.texi from Makefile.am as it's no longer present
Two expected GCL failures in rtest_signum added
Add SBCL to RPM release builds
Wolfgang Dautermann (19):
Add missing file for crosscompiling to automake.
Fix replacing \ by / in maxima.bat.in.
Correct ABCL (included/not included) in the Lispselector (Windows).
Fix some spelling errors.
Windows installer: Update SBCL.
Typos fixed.
Fix HTML error when generating documentation.
Syntax highlighting: Update highlight.js.
Fix some table related error in the HTML manual.
Windows installer: Update SBCL.
Windows installer: Update SBCL.
Use Subresource Integrity for external CSS and JS files.
Fix some typos.
SBCL (not SCL) code was removed in commit ea4518bc2.
Remove SCL code from src/Makefile.am and tests/Makefile.am.
SBCL (not SCL) code was removed in commit 5e51fb89.
Remove SCL from README-lisps.md.
Windows: Update TCL/TK to 9.0.3.
Windows installer: Update SBCL.
villate (41):
Adds missing figure files, removes duplicate names and orders them alphabetically.
Recomends to also include in Makefile.am the mac file to create the figures.
Do not add the HTML version of the manual to the distribution tarball. It is not necessary, because those HTML files will be created again when Maxima is compiled and installed. And if the texinfo version of the user is different from the one used by the developer who created the tarball, it might lead to duplication of HTML files with different names. An additional advantage is that the size of the tarball is reduced by 10%.
Adds the .texi files missing fro the distribution tarball. With this commit the options --enable-lang-de, --enable-lang-ja and --enable-lang-ru now work. However, the links to the figures will be wrong. I still have to figure out how to replace './figures' by '../figures' in all of the non-English HTML pages.
New version of output_format_for_help: html, that should work in Windows. I have tested it in Linux with several different Lisp flavors and Browsers and it is working as the previous version. The change is to make it work with Windows, which apparently does, but I will only be able to tell for sure tomorrow, after I install the nightly build from Wolfgang's site. A change with respect to the older version is that browser should now be just a string with the name of a browser (can include the complete path). For instance browser: "firefox". It remains to introduce also an encoder for URL's so something such as file:///Linus Torvals!*/Linux0.0 becomes something such as: file:///inus%20Torvalds%2A%21/Linux0.0
Corrects errors the to display help in HTML format in Windows The system command does not need "cmd.exe /c" at the beginning because that is already added in $system (in fact, I added if myself 12 years ago :)). And the definition of $browser is better as Raymond set it originally: "firefox" by default, "start" in Windows, "open" in MacOS or "xdg-open" in Linux.
This completes my fixes of help output in html for release 5.48.1 System variable browser is now just the name of a web browser. It should work in any operating system. The manual for the section "Help" was updated accordingly, also explaining that decribe can be used to show the results in the manual in Maxima's website. 'output_format_for_help: frontend' now works in Xmaxima.
Updates the information about Xmaxima's configuration and hsitory files.
Explains in more detail the process followed by Xmaxima to save its configuration and history.
Fixes Xmaxima plots in ccl64 for Windows And also improved the way gnuplot plots are produced taking advantage of recent chages in $system.
Fixes a typo (a forgotten pair of braces).
Mac files to create rk examples figures and results in PNG and PDF.
Don't ignore PDF files in the doc/info/figures directory The only PDF file that is ignored by GIT in the doc/info directory is maxima.pdf. If other PDF files should be ignored, they must be added to the .gitignored file. The former *.pdf specification is too restrictive because it leads to all the PDF figures to be ignored.
Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code
Include all the png, pdf and mac files in the doc/info/figures
The name of new figure files no longer have to be added explicitly to doc/info/Makefile.am
Add another Texinfo macros to include figures in the manual.
Uses the new macro to include figures in the manual.
Uses the new macro to include figures in the manual.
Uses the new macro to include figures in the manual.
The new macro for figures works also for info format.
Replaces @image for the macro @altfigure.
Replaces @image for the macro altfigure.
Updates the procedure to include figures in the manual.
Updates the URL's.
Fixes some typos.
Shows the figures of chapter 66 (graphs) in the PDF and info versions of the manual.
Add the macro @smallfigure, that was forgotten in my last commit.
Fixes a typo.
Keeps the list AC_CONFIG_FILES in alphabetical order, for easier maintenance.
Reduces the size of small images in the PDF version of the manual.
Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code
Fixes the images in the Spanish version of the manual.
This fixes the figures in the Portuguese version of the manual.
Corrects some errors in the documentation about plotting.
Reverts commit [e0d262] that went wrong!
Corrects the description of a figure.
Parses the maximarc file instead of sourcing it. Sourcing a file poses a high security risk. The maximarc file should only be used to set some environment variables such as MAXIMA_LISP for the preferred Lisp flavor. Lines which are not used to set environment variables will now be ignored.
Replace legacy backquotes by the newer $(...) syntax
Updates the list of fixed bugs.
Fixes a typo in the Plotting chapter of the documentation.
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-15 09:54:21
|
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 ca899141c50544575e6a58e9486368bce8ad67f1 (commit)
from cce856a60952c971e6f3604706335455c9a46fca (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 ca899141c50544575e6a58e9486368bce8ad67f1
Author: Viktor T. Toth <vt...@vt...>
Date: Mon Dec 15 04:51:32 2025 -0500
Adding 5.49 change log.
diff --git a/ChangeLog b/ChangeLog
index a39d1a477..5da946186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,27 +1,3 @@
-Maxima 5.48-post change log
+Maxima 5.49-post change log
===========================
-Bug fixes for numbered bugs:
-----------------------------
- * \#3041: limit(inf*(zeroa+inf)) => und, should be inf
- * \#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)
- * \#4614: atan2 reflection rule
- * \#4615: carg range is not in (-%pi, %pi]
- * \#4603: Control stack regression with abs_integrate / 5.48.0
- * \#4619: limit(inf = inf) causes stack overflow
- * \#4633: integrate(exp(- t) log(t), t, 0, 1) --> integral nounform
- * \#4636: signum(ind) is an error
- * \#4642 sign(1.0e-310*%i) gives error because 1e-310*x/1e-310 fails
- * \#4646: minor hstep problems and missing features
- * \#4647: Maxima error in --preload file causes Lisp error
- * \#4648: autoload problem with hstep
-
-Changes in the Windows installer:
----------------------------------
- * Update SBCL
diff --git a/changelogs/ChangeLog-5.49.md b/changelogs/ChangeLog-5.49.md
new file mode 100644
index 000000000..3472b6fb8
--- /dev/null
+++ b/changelogs/ChangeLog-5.49.md
@@ -0,0 +1,27 @@
+Maxima 5.49 change log
+===========================
+
+Bug fixes for numbered bugs:
+----------------------------
+ * \#3041: limit(inf*(zeroa+inf)) => und, should be inf
+ * \#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)
+ * \#4614: atan2 reflection rule
+ * \#4615: carg range is not in (-%pi, %pi]
+ * \#4603: Control stack regression with abs_integrate / 5.48.0
+ * \#4619: limit(inf = inf) causes stack overflow
+ * \#4633: integrate(exp(- t) log(t), t, 0, 1) --> integral nounform
+ * \#4636: signum(ind) is an error
+ * \#4642 sign(1.0e-310*%i) gives error because 1e-310*x/1e-310 fails
+ * \#4646: minor hstep problems and missing features
+ * \#4647: Maxima error in --preload file causes Lisp error
+ * \#4648: autoload problem with hstep
+
+Changes in the Windows installer:
+---------------------------------
+ * Update SBCL
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 26 +-------------------------
ChangeLog => changelogs/ChangeLog-5.49.md | 2 +-
2 files changed, 2 insertions(+), 26 deletions(-)
copy ChangeLog => changelogs/ChangeLog-5.49.md (97%)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-14 23:45:34
|
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-improve-cdiv-accuracy has been updated
via 59aa93724b09dd2fe8685a73873fbc6597bf45e9 (commit)
via 179805472d09e8f696af1a0f62636451dfbfa59c (commit)
via c2ef25a6245e23759e6f17d9a71adb2929f51c90 (commit)
from 778b3b754ac8952f77c7662ca244961d0607afac (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 59aa93724b09dd2fe8685a73873fbc6597bf45e9
Author: Raymond Toy <toy...@gm...>
Date: Sun Dec 14 15:45:09 2025 -0800
Clean up indentation in two-arg-/
diff --git a/src/numeric.lisp b/src/numeric.lisp
index 715258ddc..b6f27507e 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -998,9 +998,9 @@
((cl:complex cl:double-float)
(typecase b
((cl:complex cl:double-float)
- (if *use-accurate-complex-div*
- (cdiv-double-float a b)
- (cl:/ a b)))
+ (if *use-accurate-complex-div*
+ (cdiv-double-float a b)
+ (cl:/ a b)))
(t
(cl:/ a b))))
(t
commit 179805472d09e8f696af1a0f62636451dfbfa59c
Author: Raymond Toy <toy...@gm...>
Date: Sun Dec 14 15:43:34 2025 -0800
Move all of the cdiv test stuff into the test-cdiv-double
To make it easier to run the tests, move all of the functions and
variables into the test-cdiv-double function so you can just compile
and run the test without knowing what else is needed.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index a5ed2ec26..715258ddc 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -842,157 +842,155 @@
(f (float (/ (- b (* a r)) denom) 1f0)))
(complex e f))))))
-#+nil
-(progn
-;;; Tests for cdiv-double-float
-
-(defun parse-%a (string)
- (let* ((sign (if (char= (aref string 0) #\-)
- -1
- 1))
- (dot-posn (position #\. string))
- (p-posn (position #\p string))
- (lead (parse-integer string :start (1- dot-posn) :end dot-posn))
- (frac (parse-integer string :start (1+ dot-posn) :end p-posn :radix 16))
- (exp (parse-integer string :start (1+ p-posn))))
- (cl:* sign
- (cl:scale-float (cl:float (cl:+ (cl:ash lead 52)
- frac)
- 1d0)
- (cl:- exp 52)))))
-
-;; Tests for complex division. Tests 1-10 are from Baudin and Smith.
-;; Test 11 is an example from Maxima. Test 12 is an example from the
-;; ansi-tests. Tests 13-16 are for examples for improvement
-;; iterations 1-4 from McGehearty.
-;;
-;; Each test is a list of values: x, y, z-true (the value of x/y), and
-;; the bits of accuracy.
-(defparameter *test-cases*
- (list
- ;; 1
- (list (cl:complex 1d0 1d0)
- (cl:complex 1d0 (cl:scale-float 1d0 1023))
- (cl:complex (cl:scale-float 1d0 -1023)
- (cl:scale-float -1d0 -1023))
- 53)
- ;; 2
- (list (cl:complex 1d0 1d0)
- (cl:complex (cl:scale-float 1d0 -1023) (cl:scale-float 1d0 -1023))
- (cl:complex (cl:scale-float 1d0 1023) 0)
- 53)
- ;; 3
- (list (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 -1023))
- (cl:complex (cl:scale-float 1d0 677) (cl:scale-float 1d0 -677))
- (cl:complex (cl:scale-float 1d0 346) (cl:scale-float -1d0 -1008))
- 53)
- ;; 4
- (list (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 1023))
- (cl:complex 1d0 1d0)
- (cl:complex (cl:scale-float 1d0 1023) 0)
- 53)
- ;; 5
- (list (cl:complex (cl:scale-float 1d0 1020) (cl:scale-float 1d0 -844))
- (cl:complex (cl:scale-float 1d0 656) (cl:scale-float 1d0 -780))
- (cl:complex (cl:scale-float 1d0 364) (cl:scale-float -1d0 -1072))
- 53)
- ;; 6
- (list (cl:complex (cl:scale-float 1d0 -71) (cl:scale-float 1d0 1021))
- (cl:complex (cl:scale-float 1d0 1001) (cl:scale-float 1d0 -323))
- (cl:complex (cl:scale-float 1d0 -1072) (cl:scale-float 1d0 20))
- 53)
- ;; 7
- (list (cl:complex (cl:scale-float 1d0 -347) (cl:scale-float 1d0 -54))
- (cl:complex (cl:scale-float 1d0 -1037) (cl:scale-float 1d0 -1058))
- (cl:complex 3.898125604559113300d289 8.174961907852353577d295)
- 53)
- ;; 8
- (list (cl:complex (cl:scale-float 1d0 -1074) (cl:scale-float 1d0 -1074))
- (cl:complex (cl:scale-float 1d0 -1073) (cl:scale-float 1d0 -1074))
- (cl:complex 0.6d0 0.2d0)
- 53)
- ;; 9
- (list (cl:complex (cl:scale-float 1d0 1015) (cl:scale-float 1d0 -989))
- (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 1023))
- (cl:complex 0.001953125d0 -0.001953125d0)
- 53)
- ;; 10
- (list (cl:complex (cl:scale-float 1d0 -622) (cl:scale-float 1d0 -1071))
- (cl:complex (cl:scale-float 1d0 -343) (cl:scale-float 1d0 -798))
- (cl:complex 1.02951151789360578d-84 6.97145987515076231d-220)
- 53)
- ;; 11
- ;; From Maxima
- (list #c(5.43d-10 1.13d-100)
- #c(1.2d-311 5.7d-312)
- #c(3.691993880674614517999740937026568563794896024143749539711267954d301
- -1.753697093319947872394996242210428954266103103602859195409591583d301)
- 52)
- ;; 12
- ;; Found by ansi tests. z/z should be exactly 1.
- (list #c(1.565640716292489d19 0.0d0)
- #c(1.565640716292489d19 0.0d0)
- #c(1d0 0)
- 53)
- ;; 13
- ;; Iteration 1. Without this, we would instead return
- ;;
- ;; (cl:complex (parse-%a "0x1.ba8df8075bceep+155") (parse-%a "-0x1.a4ad6329485f0p-895"))
- ;;
- ;; whose imaginary part is quite a bit off.
- (list (cl:complex (parse-%a "0x1.73a3dac1d2f1fp+509") (parse-%a "-0x1.c4dba4ba1ee79p-620"))
- (cl:complex (parse-%a "0x1.adf526c249cf0p+353") (parse-%a "0x1.98b3fbc1677bbp-697"))
- (cl:complex (parse-%a "0x1.BA8DF8075BCEEp+155") (parse-%a "-0x1.A4AD628DA5B74p-895"))
- 53)
- ;; 14
- ;; Iteration 2.
- (list (cl:complex (parse-%a "-0x0.000000008e4f8p-1022") (parse-%a "0x0.0000060366ba7p-1022"))
- (cl:complex (parse-%a "-0x1.605b467369526p-245") (parse-%a "0x1.417bd33105808p-256"))
- (cl:complex (parse-%a "0x1.cde593daa4ffep-810") (parse-%a "-0x1.179b9a63df6d3p-799"))
- 52)
- ;; 15
- ;; Iteration 3
- (list (cl:complex (parse-%a "0x1.cb27eece7c585p-355 ") (parse-%a "0x0.000000223b8a8p-1022"))
- (cl:complex (parse-%a "-0x1.74e7ed2b9189fp-22") (parse-%a "0x1.3d80439e9a119p-731"))
- (cl:complex (parse-%a "-0x1.3b35ed806ae5ap-333") (parse-%a "-0x0.05e01bcbfd9f6p-1022"))
- 53)
- ;; 16
- ;; Iteration 4
- (list (cl:complex (parse-%a "-0x1.f5c75c69829f0p-530") (parse-%a "-0x1.e73b1fde6b909p+316"))
- (cl:complex (parse-%a "-0x1.ff96c3957742bp+1023") (parse-%a "0x1.5bd78c9335899p+1021"))
- (cl:complex (parse-%a "-0x1.423c6ce00c73bp-710") (parse-%a "0x1.d9edcf45bcb0ep-708"))
- 52)
- ))
-
-;; Relative error in terms of bits of accuracy. This is the
-;; definition used by Baudin and Smith. A result of 53 means the two
-;; numbers have identical bits. For complex numbers, we use the min
-;; of the bits of accuracy of the real and imaginary parts.
-(defun rel-err (computed expected)
- (flet ((rerr (c e)
- (let ((diff (cl:abs (cl:- c e))))
- (if (cl:zerop diff)
- (cl:float-digits diff)
- (cl:floor (cl:- (cl:log (cl:/ diff (cl:abs e)) 2d0)))))))
- (cl:min (rerr (cl:realpart computed) (cl:realpart expected))
- (rerr (cl:imagpart computed) (cl:imagpart expected)))))
+;;; Simple test program for accurate complex double-float division.
+#+nil
(defun test-cdiv-double ()
- (loop for k from 1
- for test in *test-cases*
- do
- (destructuring-bind (x y z-true expected-rel)
- test
- (let* ((z (cdiv-double-float x y))
- (rel (rel-err z z-true)))
- (when (< rel expected-rel)
- (format t "Test ~D failed~%" k)
- (format t " x = ~A~%" x)
- (format t " y = ~A~%" y)
- (format t " z = ~A~%" z)
- (format t " true = ~A~%" z-true)
- (format t " acc = ~D, expected ~D~%" rel expected-rel))))))
-)
+ (flet ((rel-err (computed expected)
+ ;; Relative error in terms of bits of accuracy. This is the
+ ;; definition used by Baudin and Smith. A result of 53 means the two
+ ;; numbers have identical bits. For complex numbers, we use the min
+ ;; of the bits of accuracy of the real and imaginary parts.
+ (flet ((rerr (c e)
+ (let ((diff (cl:abs (cl:- c e))))
+ (if (cl:zerop diff)
+ (cl:float-digits diff)
+ (cl:floor (cl:- (cl:log (cl:/ diff (cl:abs e)) 2d0)))))))
+ (cl:min (rerr (cl:realpart computed) (cl:realpart expected))
+ (rerr (cl:imagpart computed) (cl:imagpart expected)))))
+ (parse-%a (string)
+ ;; A very rudimentary parser for the printed hexadecimal
+ ;; floating-point representation as produced the the %a
+ ;; format for printf.
+ (let* ((sign (if (char= (aref string 0) #\-)
+ -1
+ 1))
+ (dot-posn (position #\. string))
+ (p-posn (position #\p string))
+ (lead (parse-integer string :start (1- dot-posn) :end dot-posn))
+ (frac (parse-integer string :start (1+ dot-posn) :end p-posn :radix 16))
+ (exp (parse-integer string :start (1+ p-posn))))
+ (cl:* sign
+ (cl:scale-float (cl:float (cl:+ (cl:ash lead 52)
+ frac)
+ 1d0)
+ (cl:- exp 52))))))
+ (let ((test-cases
+ ;; Tests for complex division. Tests 1-10 are from Baudin and Smith.
+ ;; Test 11 is an example from Maxima. Test 12 is an example from the
+ ;; ansi-tests. Tests 13-16 are for examples for improvement
+ ;; iterations 1-4 from McGehearty.
+ ;;
+ ;; Each test is a list of values: x, y, z-true (the value of x/y), and
+ ;; the bits of accuracy.
+ (list
+ ;; 1
+ (list (cl:complex 1d0 1d0)
+ (cl:complex 1d0 (cl:scale-float 1d0 1023))
+ (cl:complex (cl:scale-float 1d0 -1023)
+ (cl:scale-float -1d0 -1023))
+ 53)
+ ;; 2
+ (list (cl:complex 1d0 1d0)
+ (cl:complex (cl:scale-float 1d0 -1023) (cl:scale-float 1d0 -1023))
+ (cl:complex (cl:scale-float 1d0 1023) 0)
+ 53)
+ ;; 3
+ (list (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 -1023))
+ (cl:complex (cl:scale-float 1d0 677) (cl:scale-float 1d0 -677))
+ (cl:complex (cl:scale-float 1d0 346) (cl:scale-float -1d0 -1008))
+ 53)
+ ;; 4
+ (list (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 1023))
+ (cl:complex 1d0 1d0)
+ (cl:complex (cl:scale-float 1d0 1023) 0)
+ 53)
+ ;; 5
+ (list (cl:complex (cl:scale-float 1d0 1020) (cl:scale-float 1d0 -844))
+ (cl:complex (cl:scale-float 1d0 656) (cl:scale-float 1d0 -780))
+ (cl:complex (cl:scale-float 1d0 364) (cl:scale-float -1d0 -1072))
+ 53)
+ ;; 6
+ (list (cl:complex (cl:scale-float 1d0 -71) (cl:scale-float 1d0 1021))
+ (cl:complex (cl:scale-float 1d0 1001) (cl:scale-float 1d0 -323))
+ (cl:complex (cl:scale-float 1d0 -1072) (cl:scale-float 1d0 20))
+ 53)
+ ;; 7
+ (list (cl:complex (cl:scale-float 1d0 -347) (cl:scale-float 1d0 -54))
+ (cl:complex (cl:scale-float 1d0 -1037) (cl:scale-float 1d0 -1058))
+ (cl:complex 3.898125604559113300d289 8.174961907852353577d295)
+ 53)
+ ;; 8
+ (list (cl:complex (cl:scale-float 1d0 -1074) (cl:scale-float 1d0 -1074))
+ (cl:complex (cl:scale-float 1d0 -1073) (cl:scale-float 1d0 -1074))
+ (cl:complex 0.6d0 0.2d0)
+ 53)
+ ;; 9
+ (list (cl:complex (cl:scale-float 1d0 1015) (cl:scale-float 1d0 -989))
+ (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 1023))
+ (cl:complex 0.001953125d0 -0.001953125d0)
+ 53)
+ ;; 10
+ (list (cl:complex (cl:scale-float 1d0 -622) (cl:scale-float 1d0 -1071))
+ (cl:complex (cl:scale-float 1d0 -343) (cl:scale-float 1d0 -798))
+ (cl:complex 1.02951151789360578d-84 6.97145987515076231d-220)
+ 53)
+ ;; 11
+ ;; From Maxima
+ (list #c(5.43d-10 1.13d-100)
+ #c(1.2d-311 5.7d-312)
+ #c(3.691993880674614517999740937026568563794896024143749539711267954d301
+ -1.753697093319947872394996242210428954266103103602859195409591583d301)
+ 52)
+ ;; 12
+ ;; Found by ansi tests. z/z should be exactly 1.
+ (list #c(1.565640716292489d19 0.0d0)
+ #c(1.565640716292489d19 0.0d0)
+ #c(1d0 0)
+ 53)
+ ;; 13
+ ;; Iteration 1. Without this, we would instead return
+ ;;
+ ;; (cl:complex (parse-%a "0x1.ba8df8075bceep+155") (parse-%a "-0x1.a4ad6329485f0p-895"))
+ ;;
+ ;; whose imaginary part is quite a bit off.
+ (list (cl:complex (parse-%a "0x1.73a3dac1d2f1fp+509") (parse-%a "-0x1.c4dba4ba1ee79p-620"))
+ (cl:complex (parse-%a "0x1.adf526c249cf0p+353") (parse-%a "0x1.98b3fbc1677bbp-697"))
+ (cl:complex (parse-%a "0x1.BA8DF8075BCEEp+155") (parse-%a "-0x1.A4AD628DA5B74p-895"))
+ 53)
+ ;; 14
+ ;; Iteration 2.
+ (list (cl:complex (parse-%a "-0x0.000000008e4f8p-1022") (parse-%a "0x0.0000060366ba7p-1022"))
+ (cl:complex (parse-%a "-0x1.605b467369526p-245") (parse-%a "0x1.417bd33105808p-256"))
+ (cl:complex (parse-%a "0x1.cde593daa4ffep-810") (parse-%a "-0x1.179b9a63df6d3p-799"))
+ 52)
+ ;; 15
+ ;; Iteration 3
+ (list (cl:complex (parse-%a "0x1.cb27eece7c585p-355 ") (parse-%a "0x0.000000223b8a8p-1022"))
+ (cl:complex (parse-%a "-0x1.74e7ed2b9189fp-22") (parse-%a "0x1.3d80439e9a119p-731"))
+ (cl:complex (parse-%a "-0x1.3b35ed806ae5ap-333") (parse-%a "-0x0.05e01bcbfd9f6p-1022"))
+ 53)
+ ;; 16
+ ;; Iteration 4
+ (list (cl:complex (parse-%a "-0x1.f5c75c69829f0p-530") (parse-%a "-0x1.e73b1fde6b909p+316"))
+ (cl:complex (parse-%a "-0x1.ff96c3957742bp+1023") (parse-%a "0x1.5bd78c9335899p+1021"))
+ (cl:complex (parse-%a "-0x1.423c6ce00c73bp-710") (parse-%a "0x1.d9edcf45bcb0ep-708"))
+ 52)
+ )))
+ (loop for k from 1
+ for test in test-cases
+ do
+ (destructuring-bind (x y z-true expected-rel)
+ test
+ (let* ((z (cdiv-double-float x y))
+ (rel (rel-err z z-true)))
+ (format t "Test ~D ~A~%"
+ k (if (< rel expected-rel) "failed" "passed"))
+ (format t " x = ~A~%" x)
+ (format t " y = ~A~%" y)
+ (format t " z = ~A~%" z)
+ (format t " true = ~A~%" z-true)
+ (format t " acc = ~D, expected ~D~%" rel expected-rel)))))))
;;; Divide two numbers
(defmethod two-arg-/ ((a cl:complex) (b cl:complex))
commit c2ef25a6245e23759e6f17d9a71adb2929f51c90
Author: Raymond Toy <toy...@gm...>
Date: Sun Dec 14 12:40:42 2025 -0800
Don't do the extra checks in two-arg-/
Also add `*use-accurate-complex-div*`, defaulting to T, so that we can
choose not to use the accurate complex division code. However, for
cmucl and ccl64, there appears to be no significant difference in
performance in the testsuite. Ecl appears to have a 12% slowdown.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index d54fd5bfc..a5ed2ec26 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -665,6 +665,10 @@
;; In particular iteration 1 and 3 are added. Iteration 2 and 4 were
;; not added. The test examples from iteration 2 and 4 didn't change
;; with or without changes added.
+
+(defvar *use-accurate-complex-div* t
+ "When non-NIL use the accurate complex division algorithm for double-floats.")
+
(let* (;; This is the value of Scilab's %eps variable.
(eps (cl:scale-float 1d0 -52))
(rmin least-positive-normalized-double-float)
@@ -996,19 +1000,9 @@
((cl:complex cl:double-float)
(typecase b
((cl:complex cl:double-float)
- (let ((ax (cl:abs (cl:realpart a)))
- (ay (cl:abs (cl:imagpart a)))
- (bx (cl:abs (cl:realpart b)))
- (by (cl:abs (cl:imagpart b)))
- (rbig (sqrt most-positive-double-float))
- (rmin (sqrt least-positive-normalized-double-float)))
- ;; If any component is too big (rbig) or too small (rmin),
- ;; use the accurate version. Otherwise, we'll assume CL:/
- ;; does a good job.
- (if (or (cl:> ax rbig) (cl:> ay rbig) (cl:> bx rbig) (cl:> by rbig)
- (cl:< ax rmin) (cl:< ay rmin) (cl:< bx rmin) (cl:< by rmin))
+ (if *use-accurate-complex-div*
(cdiv-double-float a b)
- (cl:/ a b))))
+ (cl:/ a b)))
(t
(cl:/ a b))))
(t
-----------------------------------------------------------------------
Summary of changes:
src/numeric.lisp | 316 +++++++++++++++++++++++++++----------------------------
1 file changed, 154 insertions(+), 162 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-14 04:22:36
|
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-improve-cdiv-accuracy has been updated
via 778b3b754ac8952f77c7662ca244961d0607afac (commit)
from cebad3234778912aea052d287467933c276b38e4 (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 778b3b754ac8952f77c7662ca244961d0607afac
Author: Raymond Toy <toy...@gm...>
Date: Sat Dec 13 20:21:41 2025 -0800
Comment out the test code.
I don't think we need to include the test code in the build, but we
leave it around so it can be tested in case we change the algorithm.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index 37e6d1bdc..d54fd5bfc 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -655,6 +655,7 @@
:imag (maxima::bcons
(maxima::fpquotient (maxima::fpminus a-re)
dn)))))))
+
;; An implementation of Baudin and Smith's robust complex division for
;; double-floats. This is a pretty straightforward translation of the
;; original in https://arxiv.org/pdf/1210.4539.
@@ -837,6 +838,8 @@
(f (float (/ (- b (* a r)) denom) 1f0)))
(complex e f))))))
+#+nil
+(progn
;;; Tests for cdiv-double-float
(defun parse-%a (string)
@@ -985,6 +988,7 @@
(format t " z = ~A~%" z)
(format t " true = ~A~%" z-true)
(format t " acc = ~D, expected ~D~%" rel expected-rel))))))
+)
;;; Divide two numbers
(defmethod two-arg-/ ((a cl:complex) (b cl:complex))
-----------------------------------------------------------------------
Summary of changes:
src/numeric.lisp | 4 ++++
1 file changed, 4 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-14 04:21:25
|
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-improve-cdiv-accuracy has been updated
via cebad3234778912aea052d287467933c276b38e4 (commit)
from f0cd355ea9ea15511535cab21ff330b3426c9f03 (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 cebad3234778912aea052d287467933c276b38e4
Author: Raymond Toy <toy...@gm...>
Date: Fri Dec 12 10:07:51 2025 -0800
Speed up complex division
The accurate method is quite expensive. To speed things up a bit,
check to see if any component of the complex numbers is too big or too
small. If so, use the accurate method. Otherwise, assume cl:/ does a
good job.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index 3da2b4df0..37e6d1bdc 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -992,7 +992,19 @@
((cl:complex cl:double-float)
(typecase b
((cl:complex cl:double-float)
- (cdiv-double-float a b))
+ (let ((ax (cl:abs (cl:realpart a)))
+ (ay (cl:abs (cl:imagpart a)))
+ (bx (cl:abs (cl:realpart b)))
+ (by (cl:abs (cl:imagpart b)))
+ (rbig (sqrt most-positive-double-float))
+ (rmin (sqrt least-positive-normalized-double-float)))
+ ;; If any component is too big (rbig) or too small (rmin),
+ ;; use the accurate version. Otherwise, we'll assume CL:/
+ ;; does a good job.
+ (if (or (cl:> ax rbig) (cl:> ay rbig) (cl:> bx rbig) (cl:> by rbig)
+ (cl:< ax rmin) (cl:< ay rmin) (cl:< bx rmin) (cl:< by rmin))
+ (cdiv-double-float a b)
+ (cl:/ a b))))
(t
(cl:/ a b))))
(t
-----------------------------------------------------------------------
Summary of changes:
src/numeric.lisp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-12 17:02:44
|
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-improve-cdiv-accuracy has been updated
via f0cd355ea9ea15511535cab21ff330b3426c9f03 (commit)
from 005ec98155ecfc882b4ea5dfecc4068839d8cdaf (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 f0cd355ea9ea15511535cab21ff330b3426c9f03
Author: Raymond Toy <toy...@gm...>
Date: Fri Dec 12 08:58:04 2025 -0800
Some cleanups and declarations
Forgot a few places where we really needed to prefix CL functions with
the cl package name.
Modify `maybe-scale` to take the components of the two complexes and
returns the possibly updated values as multiple values. Update
callers for this. (This gets rid of some extra boxing in cmucl.)
Add a few declarations to appease cmucl which can't deduce types if
you setf a variable.
Update the test code to prefix CL functions with the cl package name.
And make the test function call `cdiv-double-float` explicitly.
Finally, compile `cdiv-double-float` with speed 3 and safety 0. The
caller should make sure the appropriate types are passed to this
function.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index b7b81954c..3da2b4df0 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -673,8 +673,10 @@
(rmax2 (cl:* rbig rmin2))
(be (cl:/ 2 (cl:* eps eps)))
(2/eps (cl:/ 2 eps)))
+ (declare (double-float eps rmin rbig rmin2 rminscal rmax2 be 2/eps))
(defun cdiv-double-float (x y)
- (declare (type (cl:complex double-float) x y))
+ (declare (type (cl:complex double-float) x y)
+ (optimize (speed 3) (safety 0)))
(labels
((internal-compreal (a b c d r tt)
(declare (double-float a b c d r tt))
@@ -692,7 +694,7 @@
;; = (a + b*r)/(c + d*r).
;;
;; Thus tt = (c + d*r).
- (cond ((cl:>= (abs r) rmin)
+ (cond ((cl:>= (cl:abs r) rmin)
(let ((br (cl:* b r)))
#+nil
(format t "br = ~A~%" br)
@@ -732,7 +734,9 @@
(b (cl:imagpart x))
(c (cl:realpart y))
(d (cl:imagpart y)))
- (flet ((maybe-scale (abs-tst)
+ (declare (double-float a b c d))
+ (flet ((maybe-scale (abs-tst a b c d)
+ (declare (double-float abs-tst a b c d))
;; This implements McGehearty's iteration 3 to
;; handle the case when some values are too big
;; and should be scaled down. Also if some
@@ -760,15 +764,17 @@
(setf a (cl:* a rminscal)
b (cl:* b rminscal)
c (cl:* c rminscal)
- d (cl:* d rminscal))))))))
+ d (cl:* d rminscal)))))
+ (values a b c d))))
(cond
((cl:<= (cl:abs d) (cl:abs c))
;; |d| <= |c|, so we can use robust-subinternal to
;; perform the division.
- (maybe-scale (abs c))
- (multiple-value-bind (e f)
- (robust-subinternal a b c d)
- (cl:complex e f)))
+ (multiple-value-bind (a b c d)
+ (maybe-scale (cl:abs c) a b c d)
+ (multiple-value-bind (e f)
+ (robust-subinternal a b c d)
+ (cl:complex e f))))
(t
;; |d| > |c|. So, instead compute
;;
@@ -778,10 +784,11 @@
;; realpart of the former is the same, but the
;; imagpart of the former is the negative of the
;; desired division.
- (maybe-scale (cl:abs d))
- (multiple-value-bind (e f)
- (robust-subinternal b a d c)
- (cl:complex e (cl:- f)))))))))
+ (multiple-value-bind (a b c d)
+ (maybe-scale (cl:abs d) a b c d)
+ (multiple-value-bind (e f)
+ (robust-subinternal b a d c)
+ (cl:complex e (cl:- f))))))))))
(let* ((a (cl:realpart x))
(b (cl:imagpart x))
(c (cl:realpart y))
@@ -789,6 +796,7 @@
(ab (cl:max (cl:abs a) (cl:abs b)))
(cd (cl:max (cl:abs c) (cl:abs d)))
(s 1d0))
+ (declare (double-float s))
;; If a or b is big, scale down a and b.
(when (cl:>= ab rbig)
(setf x (cl:/ x 2)
@@ -829,7 +837,6 @@
(f (float (/ (- b (* a r)) denom) 1f0)))
(complex e f))))))
-#||
;;; Tests for cdiv-double-float
(defun parse-%a (string)
@@ -841,11 +848,11 @@
(lead (parse-integer string :start (1- dot-posn) :end dot-posn))
(frac (parse-integer string :start (1+ dot-posn) :end p-posn :radix 16))
(exp (parse-integer string :start (1+ p-posn))))
- (* sign
- (scale-float (float (+ (ash lead 52)
- frac)
- 1d0)
- (- exp 52)))))
+ (cl:* sign
+ (cl:scale-float (cl:float (cl:+ (cl:ash lead 52)
+ frac)
+ 1d0)
+ (cl:- exp 52)))))
;; Tests for complex division. Tests 1-10 are from Baudin and Smith.
;; Test 11 is an example from Maxima. Test 12 is an example from the
@@ -857,55 +864,55 @@
(defparameter *test-cases*
(list
;; 1
- (list (complex 1d0 1d0)
- (complex 1d0 (scale-float 1d0 1023))
- (complex (scale-float 1d0 -1023)
- (scale-float -1d0 -1023))
+ (list (cl:complex 1d0 1d0)
+ (cl:complex 1d0 (cl:scale-float 1d0 1023))
+ (cl:complex (cl:scale-float 1d0 -1023)
+ (cl:scale-float -1d0 -1023))
53)
;; 2
- (list (complex 1d0 1d0)
- (complex (scale-float 1d0 -1023) (scale-float 1d0 -1023))
- (complex (scale-float 1d0 1023) 0)
+ (list (cl:complex 1d0 1d0)
+ (cl:complex (cl:scale-float 1d0 -1023) (cl:scale-float 1d0 -1023))
+ (cl:complex (cl:scale-float 1d0 1023) 0)
53)
;; 3
- (list (complex (scale-float 1d0 1023) (scale-float 1d0 -1023))
- (complex (scale-float 1d0 677) (scale-float 1d0 -677))
- (complex (scale-float 1d0 346) (scale-float -1d0 -1008))
+ (list (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 -1023))
+ (cl:complex (cl:scale-float 1d0 677) (cl:scale-float 1d0 -677))
+ (cl:complex (cl:scale-float 1d0 346) (cl:scale-float -1d0 -1008))
53)
;; 4
- (list (complex (scale-float 1d0 1023) (scale-float 1d0 1023))
- (complex 1d0 1d0)
- (complex (scale-float 1d0 1023) 0)
+ (list (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 1023))
+ (cl:complex 1d0 1d0)
+ (cl:complex (cl:scale-float 1d0 1023) 0)
53)
;; 5
- (list (complex (scale-float 1d0 1020) (scale-float 1d0 -844))
- (complex (scale-float 1d0 656) (scale-float 1d0 -780))
- (complex (scale-float 1d0 364) (scale-float -1d0 -1072))
+ (list (cl:complex (cl:scale-float 1d0 1020) (cl:scale-float 1d0 -844))
+ (cl:complex (cl:scale-float 1d0 656) (cl:scale-float 1d0 -780))
+ (cl:complex (cl:scale-float 1d0 364) (cl:scale-float -1d0 -1072))
53)
;; 6
- (list (complex (scale-float 1d0 -71) (scale-float 1d0 1021))
- (complex (scale-float 1d0 1001) (scale-float 1d0 -323))
- (complex (scale-float 1d0 -1072) (scale-float 1d0 20))
+ (list (cl:complex (cl:scale-float 1d0 -71) (cl:scale-float 1d0 1021))
+ (cl:complex (cl:scale-float 1d0 1001) (cl:scale-float 1d0 -323))
+ (cl:complex (cl:scale-float 1d0 -1072) (cl:scale-float 1d0 20))
53)
;; 7
- (list (complex (scale-float 1d0 -347) (scale-float 1d0 -54))
- (complex (scale-float 1d0 -1037) (scale-float 1d0 -1058))
- (complex 3.898125604559113300d289 8.174961907852353577d295)
+ (list (cl:complex (cl:scale-float 1d0 -347) (cl:scale-float 1d0 -54))
+ (cl:complex (cl:scale-float 1d0 -1037) (cl:scale-float 1d0 -1058))
+ (cl:complex 3.898125604559113300d289 8.174961907852353577d295)
53)
;; 8
- (list (complex (scale-float 1d0 -1074) (scale-float 1d0 -1074))
- (complex (scale-float 1d0 -1073) (scale-float 1d0 -1074))
- (complex 0.6d0 0.2d0)
+ (list (cl:complex (cl:scale-float 1d0 -1074) (cl:scale-float 1d0 -1074))
+ (cl:complex (cl:scale-float 1d0 -1073) (cl:scale-float 1d0 -1074))
+ (cl:complex 0.6d0 0.2d0)
53)
;; 9
- (list (complex (scale-float 1d0 1015) (scale-float 1d0 -989))
- (complex (scale-float 1d0 1023) (scale-float 1d0 1023))
- (complex 0.001953125d0 -0.001953125d0)
+ (list (cl:complex (cl:scale-float 1d0 1015) (cl:scale-float 1d0 -989))
+ (cl:complex (cl:scale-float 1d0 1023) (cl:scale-float 1d0 1023))
+ (cl:complex 0.001953125d0 -0.001953125d0)
53)
;; 10
- (list (complex (scale-float 1d0 -622) (scale-float 1d0 -1071))
- (complex (scale-float 1d0 -343) (scale-float 1d0 -798))
- (complex 1.02951151789360578d-84 6.97145987515076231d-220)
+ (list (cl:complex (cl:scale-float 1d0 -622) (cl:scale-float 1d0 -1071))
+ (cl:complex (cl:scale-float 1d0 -343) (cl:scale-float 1d0 -798))
+ (cl:complex 1.02951151789360578d-84 6.97145987515076231d-220)
53)
;; 11
;; From Maxima
@@ -923,30 +930,30 @@
;; 13
;; Iteration 1. Without this, we would instead return
;;
- ;; (complex (parse-%a "0x1.ba8df8075bceep+155") (parse-%a "-0x1.a4ad6329485f0p-895"))
+ ;; (cl:complex (parse-%a "0x1.ba8df8075bceep+155") (parse-%a "-0x1.a4ad6329485f0p-895"))
;;
;; whose imaginary part is quite a bit off.
- (list (complex (parse-%a "0x1.73a3dac1d2f1fp+509") (parse-%a "-0x1.c4dba4ba1ee79p-620"))
- (complex (parse-%a "0x1.adf526c249cf0p+353") (parse-%a "0x1.98b3fbc1677bbp-697"))
- (complex (parse-%a "0x1.BA8DF8075BCEEp+155") (parse-%a "-0x1.A4AD628DA5B74p-895"))
+ (list (cl:complex (parse-%a "0x1.73a3dac1d2f1fp+509") (parse-%a "-0x1.c4dba4ba1ee79p-620"))
+ (cl:complex (parse-%a "0x1.adf526c249cf0p+353") (parse-%a "0x1.98b3fbc1677bbp-697"))
+ (cl:complex (parse-%a "0x1.BA8DF8075BCEEp+155") (parse-%a "-0x1.A4AD628DA5B74p-895"))
53)
;; 14
;; Iteration 2.
- (list (complex (parse-%a "-0x0.000000008e4f8p-1022") (parse-%a "0x0.0000060366ba7p-1022"))
- (complex (parse-%a "-0x1.605b467369526p-245") (parse-%a "0x1.417bd33105808p-256"))
- (complex (parse-%a "0x1.cde593daa4ffep-810") (parse-%a "-0x1.179b9a63df6d3p-799"))
+ (list (cl:complex (parse-%a "-0x0.000000008e4f8p-1022") (parse-%a "0x0.0000060366ba7p-1022"))
+ (cl:complex (parse-%a "-0x1.605b467369526p-245") (parse-%a "0x1.417bd33105808p-256"))
+ (cl:complex (parse-%a "0x1.cde593daa4ffep-810") (parse-%a "-0x1.179b9a63df6d3p-799"))
52)
;; 15
;; Iteration 3
- (list (complex (parse-%a "0x1.cb27eece7c585p-355 ") (parse-%a "0x0.000000223b8a8p-1022"))
- (complex (parse-%a "-0x1.74e7ed2b9189fp-22") (parse-%a "0x1.3d80439e9a119p-731"))
- (complex (parse-%a "-0x1.3b35ed806ae5ap-333") (parse-%a "-0x0.05e01bcbfd9f6p-1022"))
+ (list (cl:complex (parse-%a "0x1.cb27eece7c585p-355 ") (parse-%a "0x0.000000223b8a8p-1022"))
+ (cl:complex (parse-%a "-0x1.74e7ed2b9189fp-22") (parse-%a "0x1.3d80439e9a119p-731"))
+ (cl:complex (parse-%a "-0x1.3b35ed806ae5ap-333") (parse-%a "-0x0.05e01bcbfd9f6p-1022"))
53)
;; 16
;; Iteration 4
- (list (complex (parse-%a "-0x1.f5c75c69829f0p-530") (parse-%a "-0x1.e73b1fde6b909p+316"))
- (complex (parse-%a "-0x1.ff96c3957742bp+1023") (parse-%a "0x1.5bd78c9335899p+1021"))
- (complex (parse-%a "-0x1.423c6ce00c73bp-710") (parse-%a "0x1.d9edcf45bcb0ep-708"))
+ (list (cl:complex (parse-%a "-0x1.f5c75c69829f0p-530") (parse-%a "-0x1.e73b1fde6b909p+316"))
+ (cl:complex (parse-%a "-0x1.ff96c3957742bp+1023") (parse-%a "0x1.5bd78c9335899p+1021"))
+ (cl:complex (parse-%a "-0x1.423c6ce00c73bp-710") (parse-%a "0x1.d9edcf45bcb0ep-708"))
52)
))
@@ -956,12 +963,12 @@
;; of the bits of accuracy of the real and imaginary parts.
(defun rel-err (computed expected)
(flet ((rerr (c e)
- (let ((diff (abs (- c e))))
- (if (zerop diff)
- (float-digits diff)
- (floor (- (log (/ diff (abs e)) 2d0)))))))
- (min (rerr (realpart computed) (realpart expected))
- (rerr (imagpart computed) (imagpart expected)))))
+ (let ((diff (cl:abs (cl:- c e))))
+ (if (cl:zerop diff)
+ (cl:float-digits diff)
+ (cl:floor (cl:- (cl:log (cl:/ diff (cl:abs e)) 2d0)))))))
+ (cl:min (rerr (cl:realpart computed) (cl:realpart expected))
+ (rerr (cl:imagpart computed) (cl:imagpart expected)))))
(defun test-cdiv-double ()
(loop for k from 1
@@ -969,7 +976,7 @@
do
(destructuring-bind (x y z-true expected-rel)
test
- (let* ((z (/ x y))
+ (let* ((z (cdiv-double-float x y))
(rel (rel-err z z-true)))
(when (< rel expected-rel)
(format t "Test ~D failed~%" k)
@@ -978,7 +985,6 @@
(format t " z = ~A~%" z)
(format t " true = ~A~%" z-true)
(format t " acc = ~D, expected ~D~%" rel expected-rel))))))
-||#
;;; Divide two numbers
(defmethod two-arg-/ ((a cl:complex) (b cl:complex))
-----------------------------------------------------------------------
Summary of changes:
src/numeric.lisp | 146 +++++++++++++++++++++++++++++--------------------------
1 file changed, 76 insertions(+), 70 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: willisbl <wil...@us...> - 2025-12-12 16:52: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 cce856a60952c971e6f3604706335455c9a46fca (commit)
from a77814ea29d6693bdf7b704c824dbfb8ebeb4dd2 (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 cce856a60952c971e6f3604706335455c9a46fca
Author: Barton Willis <wi...@un...>
Date: Fri Dec 12 10:51:42 2025 -0600
Update ChangeLog for fixes for bugs 4646, 4642, and 4648
diff --git a/ChangeLog b/ChangeLog
index 4fa958860..a39d1a477 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,7 +17,10 @@ Bug fixes for numbered bugs:
* \#4619: limit(inf = inf) causes stack overflow
* \#4633: integrate(exp(- t) log(t), t, 0, 1) --> integral nounform
* \#4636: signum(ind) is an error
+ * \#4642 sign(1.0e-310*%i) gives error because 1e-310*x/1e-310 fails
+ * \#4646: minor hstep problems and missing features
* \#4647: Maxima error in --preload file causes Lisp error
+ * \#4648: autoload problem with hstep
Changes in the Windows installer:
---------------------------------
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
1 file changed, 3 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: willisbl <wil...@us...> - 2025-12-12 16:36:15
|
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 a77814ea29d6693bdf7b704c824dbfb8ebeb4dd2 (commit)
from e6095d9c76d3dda5adfb3ca42aea303ce67892ed (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 a77814ea29d6693bdf7b704c824dbfb8ebeb4dd2
Author: Barton Willis <wi...@un...>
Date: Fri Dec 12 10:35:59 2025 -0600
#4648 autoload problem with hstep
#4646 minor hstep problems and missing features
- Move hstep package from /share to /src and remove autoload code from max_ext.lisp (fixes #4648).
- Add antiderivative support to hstep.lisp.
- Add sign function for hstep.
- Change csign to $csign (fixes part of #4646).
- Convert hstep simplifier to def-simplifier scheme.
- Set `preserve-direction` locally to true in hstep limit code; add cases for zerob and zeroa limits.
- Append hstep.lisp to maxima.system.
- Add regression test rtest_hstep.mac to testsuite.lisp.
Testsuite: No unexpected failures with SBCL 2.4.7 or Clozure CL 1.13.
diff --git a/share/diffequations/hstep.lisp b/share/diffequations/hstep.lisp
deleted file mode 100644
index d7f91cdd0..000000000
--- a/share/diffequations/hstep.lisp
+++ /dev/null
@@ -1,77 +0,0 @@
-;;
-;; Copyright (C) 2010, 2011 Mark H. Weaver <mh...@ne...>
-;;
-;; hstep: Heaviside step function support for Maxima
-;;
-;; This program is free software; you can redistribute it and/or
-;; modify it under the terms of the GNU General Public License
-;; as published by the Free Software Foundation; either version 2
-;; of the License, or (at your option) any later version.
-;;
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-;;
-;; You should have received a copy of the GNU General Public License
-;; along with this program; if not, write to the Free Software
-;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-;;
-
-(in-package :maxima)
-
-($put '$hstep 1 '$version)
-
-(defprop $hstep %hstep verb)
-(defprop %hstep $hstep noun)
-
-(defprop $hstep %hstep alias)
-(defprop %hstep $hstep reversealias)
-
-(defprop %hstep simp-hstep operators)
-(setf (get '%hstep 'simplim%function) 'simplim%hstep)
-
-(setf (get '%hstep 'real-valued) t)
-
-;; TODO: other properties which would be nice to declare about hstep:
-;; non-negative
-;; non-decreasing
-
-(defprop %hstep ((x) (($delta) x)) grad)
-(defprop $delta ((x) ((%hstep) x)) integral)
-
-(defun $hstep (z) (take '(%hstep) z))
-
-;;
-;; TODO: should the following rule be included somehow?
-;;
-;; hstep(-x) --> 1 - hstep(x)
-;;
-;; It would also be nice to simplify products
-;; containing more than one hstep.
-;;
-(defun simp-hstep (expr z simpflag)
- (oneargcheck expr)
- (setq z (simpcheck (cadr expr) simpflag))
- (let ((sgn (csign z)))
- (cond ((eq sgn '$neg) 0)
- ((eq sgn '$zero) 1//2)
- ((eq sgn '$pos) 1)
- (t
- ;; positive * x --> x and negative * x --> -1 * x.
- (if (mtimesp z)
- (setq z (muln (mapcar #'(lambda (s)
- (let ((sgn (csign s)))
- (cond ((eq sgn '$neg) -1)
- ((eq sgn '$pos) 1)
- (t s))))
- (margs z))
- t)))
- (eqtest (list '(%hstep) z) expr)))))
-
-(defun simplim%hstep (e x pt)
- (let* ((e (limit (cadr e) x pt 'think))
- (sgn (mnqp e 0)))
- (cond ((eq t sgn) ($hstep e)) ;; limit of arg is not zero
- ((eq nil sgn) '$und) ;; limit of arg is zero
- (t (throw 'limit nil))))) ;; don't know
diff --git a/src/hstep.lisp b/src/hstep.lisp
new file mode 100644
index 000000000..d70c16654
--- /dev/null
+++ b/src/hstep.lisp
@@ -0,0 +1,104 @@
+;;
+;; Copyright (C) 2010, 2011 Mark H. Weaver <mh...@ne...>
+;;
+;; hstep: Heaviside step function support for Maxima
+;;
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License
+;; as published by the Free Software Foundation; either version 2
+;; of the License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software
+;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+;;
+
+(in-package :maxima)
+
+($put '$hstep 1 '$version)
+
+(setf (get '%hstep 'simplim%function) 'simplim%hstep)
+
+(setf (get '%hstep 'real-valued) t)
+
+;; TODO: other properties which would be nice to declare about hstep:
+;; non-negative
+;; non-decreasing
+;; But neither of these are established Maxima features. Also, it would also
+;; be nice to simplify products containing more than one hstep, but that is
+;; a simplification on products, not on hstep.
+
+(defprop %hstep ((x) (($delta) x)) grad)
+(defprop $delta ((x) ((%hstep) x)) integral)
+
+;; Unlike `signum`, we do not extend hstep to the complex plane. Maxima defines hstep(0) = 1/2,
+;; but the DLMF (http://dlmf.nist.gov/1.16.iv) defines hstep(0) = 0.
+(def-simplifier hstep (z)
+ "Simplify `hstep(z)`. "
+ (flet ((fn (s)
+ (let ((sgn ($csign s)))
+ (cond ((eq sgn '$neg) -1)
+ ((eq sgn '$pos) 1)
+ (t s)))))
+ ;; When z is a product, replace all negative terms by -1 and all positive terms by 1.
+ ;; We could replace all zero terms by 0, but this could cause some indeterminate products
+ ;; to simplify to zero.
+ (when (mtimesp z)
+ (setq z (fapply 'mtimes (mapcar #'fn (cdr z)))))
+ (let ((sgn ($csign z)))
+ (cond ((eq sgn '$neg) 0) ; hstep(neg) = 0
+ ((eq sgn '$zero) 1//2) ; hstep(zero) = 1/2
+ ((eq sgn '$pos) 1) ; hstep(pos) = 1
+ ((great (neg z) z) ; hstep(-z) = 1 - hstep(z)
+ (sub 1 (ftake '%hstep (neg z))))
+ (t (give-up)))))) ;no simplifications
+
+(defun simplim%hstep (e x pt)
+ "Return limit(e,x,pt), where e = hstep(X)."
+ (let* ((preserve-direction t)
+ (lim (limit (cadr e) x pt 'think))
+ (sgn (mnqp lim 0)))
+ (cond
+ ((eq lim '$zerob) 0) ;hstep(zerob) = 0
+ ((eq lim '$zeroa) 1) ;hstep(zeroa) = 1
+ ((eq t sgn) (ftake '%hstep lim)) ;; limit of arg is not zero, so use direct substitution
+ ((eq nil sgn) '$und) ;; limit of arg is zero; limit doesn't exist
+ (t (throw 'limit nil))))) ;; don't know
+
+;; Give hstep an antiderivative
+(defun hstep-integral (x)
+ "Return an antiderivative of hstep. Specifically: integrate(hstep(x),x) = x*hstep(x)."
+ (mul x (ftake '%hstep x)))
+
+(putprop '%hstep `((x) ,'hstep-integral) 'integral)
+
+;; A sign function for hstep.
+;; When either x < 0 or x > 0, hstep (x) simplifies, so the value of sgn should never be neg or pos.
+(defun hstep-sign (q)
+ (let ((sgn ($csign (cadr q))))
+ (setf sign
+ (cond
+ ;; sign(hstep(zero)) = pos
+ ((eq sgn '$zero) '$pos)
+ ;; sign(hstep(positive or zero)) = positive
+ ((or (eq sgn '$pos) (eq sgn '$pz)) '$pos)
+ ;; sign(hstep(negative)) = zero
+ ((eq sgn '$neg) '$zero)
+ ;; sign(hstep(negative or zero)) = pz
+ ((eq sgn '$nz) '$pz)
+ ;; sign(hstep(pnz)) = pz
+ ((eq sgn '$pnz) '$pz)
+ ;; sign(hstep(pn)) = pz
+ ((eq sgn '$pn) '$pz)
+ ;; Maxima is inconsistent with the sign of something that is undefined. We'll throw a merror.
+ (*complexsign*
+ (merror (intl:gettext "The csign of ~M is undefined ~%") q))
+ (t
+ (merror (intl:gettext "The sign of ~M is undefined ~%") q))))))
+
+(setf (get '%hstep 'sign-function) 'hstep-sign)
\ No newline at end of file
diff --git a/src/max_ext.lisp b/src/max_ext.lisp
index f3437b269..37531b450 100644
--- a/src/max_ext.lisp
+++ b/src/max_ext.lisp
@@ -406,6 +406,5 @@
(setf (get f 'autoload) "tocl"))
(dolist (f
- '($hstep
- $pwilt))
+ '($pwilt))
(setf (get f 'autoload) "pwilt"))
diff --git a/src/maxima.system b/src/maxima.system
index e9e02f817..2225c12db 100644
--- a/src/maxima.system
+++ b/src/maxima.system
@@ -749,6 +749,7 @@
(:file "conjugate")
(:file "expintegral")
(:file "gamma")
+ (:file "hstep")
(:file "mstuff")))
(:module polynomial :source-pathname ""
:depends-on ("defmfun")
diff --git a/src/testsuite.lisp b/src/testsuite.lisp
index 72b4a79c5..e27003b83 100644
--- a/src/testsuite.lisp
+++ b/src/testsuite.lisp
@@ -152,6 +152,7 @@
((mlist simp) "rtest_atan2" ((mlist simp) 65))
"rtest_gcd"
+ ((mlist simp) "rtest_hstep")
;; The tests that failed with abcl 1.5.0
((mlist simp) "rtest_hg"
#+(or gcl abcl) ((mlist simp) 120)
diff --git a/tests/rtest_hstep.mac b/tests/rtest_hstep.mac
new file mode 100644
index 000000000..935f4dd94
--- /dev/null
+++ b/tests/rtest_hstep.mac
@@ -0,0 +1,210 @@
+/* Basic values */
+
+'hstep(0);
+1/2$
+
+'hstep(20252);
+1$
+
+'hstep(-20252);
+0$
+
+hstep(-5);
+0$
+
+hstep(0);
+1/2$
+
+hstep(3);
+1$
+
+hstep(-1e-10);
+0$
+
+hstep(1e-10);
+1$
+
+hstep(2.0^(-1021));
+1$
+
+hstep(exp(x));
+1$
+
+/* Reflection property */
+hstep(-2) + hstep(2);
+1$
+
+hstep(-3);
+0$
+
+hstep(-10);
+0$
+
+/* symbolic reflection */
+hstep(-x);
+1 - hstep(x)$
+
+/* simplifications */
+hstep((1+x^2)*q);
+hstep(q)$
+
+hstep(20252 * b);
+hstep(b)$
+
+hstep(28*(a+b));
+hstep(a+b)$
+
+hstep(-28*(a+b));
+1-hstep(a+b)$
+
+/* compositions with hstep */
+realpart(hstep(x));
+hstep(x)$
+
+imagpart(hstep(x));
+0$
+
+abs(hstep(x));
+hstep(x)$
+
+conjugate(hstep(x));
+hstep(x)$
+
+/* Integrals */
+integrate(hstep(x), x);
+x*hstep(x)$
+
+integrate(hstep(x), x, -1, 1);
+1$
+
+integrate(hstep(x), x, -2, 2);
+2$
+
+integrate(hstep(x), x, -5, 5);
+5$
+
+integrate(hstep(x), x, 0, 3);
+3$
+
+integrate(hstep(x), x, -3, 0);
+0$
+
+integrate(hstep(x), x, -3, -1);
+0$
+
+integrate(hstep(x), x, 1, 4);
+3$
+
+integrate(hstep(x), x, -10, 10);
+10$
+
+integrate(hstep(-x), x, -2, 2);
+2$ /* reflection integral */
+
+integrate(hstep(x-1), x, 0, 3);
+2$
+
+integrate(hstep(2-x), x, 0, 5);
+2$
+
+integrate(hstep(x) + hstep(-x), x, -2, 2);
+4$
+
+/* Limits at zero */
+limit(hstep(x), x, 0, minus);
+0$
+
+limit(hstep(x), x, 0, plus);
+1$
+
+limit(hstep(x), x, 0);
+ind$
+
+/* Limits at infinity */
+limit(hstep(x), x, inf);
+1$
+
+limit(hstep(x), x, minf);
+0$
+
+/* Shifted step function */
+limit(hstep(x-2), x, 2, minus);
+0$
+
+limit(hstep(x-2), x, 2, plus);
+1$
+
+limit(hstep(x+3), x, -3, minus);
+0$
+
+limit(hstep(x+3), x, -3, plus);
+1$
+
+/* Symmetry check with reflection */
+limit(hstep(-x), x, 0, minus);
+1$
+
+limit(hstep(-x), x, 0, plus);
+0$
+
+limit(hstep(1/x),x,0);
+ind$
+
+limit(hstep(x) * cos(x),x,0);
+ind$
+
+limit(hstep(x) * cos(x),x,0,plus);
+1$
+
+limit(hstep(x) * cos(x),x,0,minus);
+0$
+
+/* sign of hstep */
+sign(hstep(x));
+pz$
+
+sign(hstep(x) + 8);
+pos$
+
+block([ans],
+ assume(x >=0),
+ ans : sign(hstep(x)),
+ forget(x >=0),
+ ans);
+pos$
+
+block([ans],
+ assume(x <= 0),
+ ans : sign(hstep(x)),
+ forget(x <= 0),
+ ans);
+pz$
+
+/* \#4646 minor hstep problems and missing features */
+hstep(x^2+1);
+1$
+
+block([ans],
+ declare(z,complex),
+ ans : hstep(z^2+1),
+ remove(z,complex),
+ [inpart(ans,0), inpart(ans,1)]);
+[hstep, z^2+1]$
+
+errcatch(sign(hstep(1-%i)));
+[]$
+
+errcatch(csign(hstep(1-%i)));
+[]$
+
+hstep(exp(z));
+1$
+
+block([ans],
+ declare(z,complex),
+ ans : hstep(exp(z)),
+ remove(z,complex),
+ [inpart(ans,0), inpart(ans,1)]);
+[hstep,%e^z]$
+
+
-----------------------------------------------------------------------
Summary of changes:
share/diffequations/hstep.lisp | 77 ---------------
src/hstep.lisp | 104 ++++++++++++++++++++
src/max_ext.lisp | 3 +-
src/maxima.system | 1 +
src/testsuite.lisp | 1 +
tests/rtest_hstep.mac | 210 +++++++++++++++++++++++++++++++++++++++++
6 files changed, 317 insertions(+), 79 deletions(-)
delete mode 100644 share/diffequations/hstep.lisp
create mode 100644 src/hstep.lisp
create mode 100644 tests/rtest_hstep.mac
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-12 15:07: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, rtoy-improve-cdiv-accuracy has been created
at 005ec98155ecfc882b4ea5dfecc4068839d8cdaf (commit)
- Log -----------------------------------------------------------------
commit 005ec98155ecfc882b4ea5dfecc4068839d8cdaf
Author: Raymond Toy <toy...@gm...>
Date: Fri Dec 12 07:05:30 2025 -0800
Add accurate complex division algorithm
This is Baudin and Smith's algorithm with improvements by McGehearty.
See code for references.
We also add test cases from Baudin and Smith and McGehearty and a
simple test program. These are all commented out.
diff --git a/src/numeric.lisp b/src/numeric.lisp
index d2862ac26..b7b81954c 100644
--- a/src/numeric.lisp
+++ b/src/numeric.lisp
@@ -655,7 +655,343 @@
:imag (maxima::bcons
(maxima::fpquotient (maxima::fpminus a-re)
dn)))))))
+;; An implementation of Baudin and Smith's robust complex division for
+;; double-floats. This is a pretty straightforward translation of the
+;; original in https://arxiv.org/pdf/1210.4539.
+;;
+;; This also includes improvements mentioned in
+;; https://lpc.events/event/11/contributions/1005/attachments/856/1625/Complex_divide.pdf.
+;; In particular iteration 1 and 3 are added. Iteration 2 and 4 were
+;; not added. The test examples from iteration 2 and 4 didn't change
+;; with or without changes added.
+(let* (;; This is the value of Scilab's %eps variable.
+ (eps (cl:scale-float 1d0 -52))
+ (rmin least-positive-normalized-double-float)
+ (rbig (cl:/ most-positive-double-float 2))
+ (rmin2 (cl:scale-float 1d0 -53))
+ (rminscal (cl:scale-float 1d0 51))
+ (rmax2 (cl:* rbig rmin2))
+ (be (cl:/ 2 (cl:* eps eps)))
+ (2/eps (cl:/ 2 eps)))
+ (defun cdiv-double-float (x y)
+ (declare (type (cl:complex double-float) x y))
+ (labels
+ ((internal-compreal (a b c d r tt)
+ (declare (double-float a b c d r tt))
+ ;; Compute the real part of the complex division
+ ;; (a+ib)/(c+id), assuming |c| <= |d|. r = d/c and tt = 1/(c+d*r).
+ ;;
+ ;; The realpart is (a*c+b*d)/(c^2+d^2).
+ ;;
+ ;; c^2+d^2 = c*(c+d*(d/c)) = c*(c+d*r)
+ ;;
+ ;; Then
+ ;;
+ ;; (a*c+b*d)/(c^2+d^2) = (a*c+b*d)/(c*(c+d*r))
+ ;; = (a + b*d/c)/(c+d*r)
+ ;; = (a + b*r)/(c + d*r).
+ ;;
+ ;; Thus tt = (c + d*r).
+ (cond ((cl:>= (abs r) rmin)
+ (let ((br (cl:* b r)))
+ #+nil
+ (format t "br = ~A~%" br)
+ (if (cl:/= br 0)
+ (cl:/ (cl:+ a br) tt)
+ ;; b*r underflows. Instead, compute
+ ;;
+ ;; (a + b*r)*tt = a*tt + b*tt*r
+ ;; = a*tt + (b*tt)*r
+ ;; (a + b*r)/tt = a/tt + b/tt*r
+ ;; = a*tt + (b*tt)*r
+ (cl:+ (cl:/ a tt)
+ (cl:* (cl:/ b tt)
+ r)))))
+ (t
+ ;; r = 0 so d is very tiny compared to c.
+ ;;
+ ;; (a + b*r)/tt = (a + b*(d/c))/tt
+ (cl:/ (cl:+ a (cl:* d (cl:/ b c)))
+ tt))))
+ (robust-subinternal (a b c d)
+ (declare (double-float a b c d))
+ (let* ((r (cl:/ d c))
+ (tt (cl:+ c (cl:* d r))))
+ ;; e is the real part and f is the imaginary part. We
+ ;; can use internal-compreal for the imaginary part by
+ ;; noticing that the imaginary part of (a+i*b)/(c+i*d) is
+ ;; the same as the real part of (b-i*a)/(c+i*d).
+ (let ((e (internal-compreal a b c d r tt))
+ (f (internal-compreal b (cl:- a) c d r tt)))
+ (values e
+ f))))
+
+ (robust-internal (x y)
+ (declare (type (cl:complex double-float) x y))
+ (let ((a (cl:realpart x))
+ (b (cl:imagpart x))
+ (c (cl:realpart y))
+ (d (cl:imagpart y)))
+ (flet ((maybe-scale (abs-tst)
+ ;; This implements McGehearty's iteration 3 to
+ ;; handle the case when some values are too big
+ ;; and should be scaled down. Also if some
+ ;; values are too tiny, scale them up.
+ (let ((abs-a (cl:abs a))
+ (abs-b (cl:abs b)))
+ (if (or (cl:> abs-tst rbig)
+ (cl:> abs-a rbig)
+ (cl:> abs-b rbig))
+ (setf a (cl:* a 0.5d0)
+ b (cl:* b 0.5d0)
+ c (cl:* c 0.5d0)
+ d (cl:* d 0.5d0))
+ (if (cl:< abs-tst rmin2)
+ (setf a (cl:* a rminscal)
+ b (cl:* b rminscal)
+ c (cl:* c rminscal)
+ d (cl:* d rminscal))
+ (if (or (and (cl:< abs-a rmin)
+ (cl:< abs-b rmax2)
+ (cl:< abs-tst rmax2))
+ (and (cl:< abs-b rmin)
+ (cl:< abs-a rmax2)
+ (cl:< abs-tst rmax2)))
+ (setf a (cl:* a rminscal)
+ b (cl:* b rminscal)
+ c (cl:* c rminscal)
+ d (cl:* d rminscal))))))))
+ (cond
+ ((cl:<= (cl:abs d) (cl:abs c))
+ ;; |d| <= |c|, so we can use robust-subinternal to
+ ;; perform the division.
+ (maybe-scale (abs c))
+ (multiple-value-bind (e f)
+ (robust-subinternal a b c d)
+ (cl:complex e f)))
+ (t
+ ;; |d| > |c|. So, instead compute
+ ;;
+ ;; (b + i*a)/(d + i*c) = ((b*d+a*c) + (a*d-b*c)*i)/(d^2+c^2)
+ ;;
+ ;; Compare this to (a+i*b)/(c+i*d) and we see that
+ ;; realpart of the former is the same, but the
+ ;; imagpart of the former is the negative of the
+ ;; desired division.
+ (maybe-scale (cl:abs d))
+ (multiple-value-bind (e f)
+ (robust-subinternal b a d c)
+ (cl:complex e (cl:- f)))))))))
+ (let* ((a (cl:realpart x))
+ (b (cl:imagpart x))
+ (c (cl:realpart y))
+ (d (cl:imagpart y))
+ (ab (cl:max (cl:abs a) (cl:abs b)))
+ (cd (cl:max (cl:abs c) (cl:abs d)))
+ (s 1d0))
+ ;; If a or b is big, scale down a and b.
+ (when (cl:>= ab rbig)
+ (setf x (cl:/ x 2)
+ s (cl:* s 2)))
+ ;; If c or d is big, scale down c and d.
+ (when (cl:>= cd rbig)
+ (setf y (cl:/ y 2)
+ s (cl:/ s 2)))
+ ;; If a or b is tiny, scale up a and b.
+ (when (cl:<= ab (cl:* rmin 2/eps))
+ (setf x (cl:* x be)
+ s (cl:/ s be)))
+ ;; If c or d is tiny, scale up c and d.
+ (when (cl:<= cd (cl:* rmin 2/eps))
+ (setf y (cl:* y be)
+ s (cl:* s be)))
+ (cl:* s
+ (robust-internal x y))))))
+
+;; Smith's algorithm for complex division for (complex single-float).
+;; We convert the parts to double-floats before computing the result.
+(defun cdiv-single-float (x y)
+ (declare (type (complex single-float) x y))
+ (let ((a (float (realpart x) 1d0))
+ (b (float (imagpart x) 1d0))
+ (c (float (realpart y) 1d0))
+ (d (float (imagpart y) 1d0)))
+ (cond ((< (abs c) (abs d))
+ (let* ((r (/ c d))
+ (denom (+ (* c r) d))
+ (e (float (/ (+ (* a r) b) denom) 1f0))
+ (f (float (/ (- (* b r) a) denom) 1f0)))
+ (complex e f)))
+ (t
+ (let* ((r (/ d c))
+ (denom (+ c (* d r)))
+ (e (float (/ (+ a (* b r)) denom) 1f0))
+ (f (float (/ (- b (* a r)) denom) 1f0)))
+ (complex e f))))))
+
+#||
+;;; Tests for cdiv-double-float
+
+(defun parse-%a (string)
+ (let* ((sign (if (char= (aref string 0) #\-)
+ -1
+ 1))
+ (dot-posn (position #\. string))
+ (p-posn (position #\p string))
+ (lead (parse-integer string :start (1- dot-posn) :end dot-posn))
+ (frac (parse-integer string :start (1+ dot-posn) :end p-posn :radix 16))
+ (exp (parse-integer string :start (1+ p-posn))))
+ (* sign
+ (scale-float (float (+ (ash lead 52)
+ frac)
+ 1d0)
+ (- exp 52)))))
+
+;; Tests for complex division. Tests 1-10 are from Baudin and Smith.
+;; Test 11 is an example from Maxima. Test 12 is an example from the
+;; ansi-tests. Tests 13-16 are for examples for improvement
+;; iterations 1-4 from McGehearty.
+;;
+;; Each test is a list of values: x, y, z-true (the value of x/y), and
+;; the bits of accuracy.
+(defparameter *test-cases*
+ (list
+ ;; 1
+ (list (complex 1d0 1d0)
+ (complex 1d0 (scale-float 1d0 1023))
+ (complex (scale-float 1d0 -1023)
+ (scale-float -1d0 -1023))
+ 53)
+ ;; 2
+ (list (complex 1d0 1d0)
+ (complex (scale-float 1d0 -1023) (scale-float 1d0 -1023))
+ (complex (scale-float 1d0 1023) 0)
+ 53)
+ ;; 3
+ (list (complex (scale-float 1d0 1023) (scale-float 1d0 -1023))
+ (complex (scale-float 1d0 677) (scale-float 1d0 -677))
+ (complex (scale-float 1d0 346) (scale-float -1d0 -1008))
+ 53)
+ ;; 4
+ (list (complex (scale-float 1d0 1023) (scale-float 1d0 1023))
+ (complex 1d0 1d0)
+ (complex (scale-float 1d0 1023) 0)
+ 53)
+ ;; 5
+ (list (complex (scale-float 1d0 1020) (scale-float 1d0 -844))
+ (complex (scale-float 1d0 656) (scale-float 1d0 -780))
+ (complex (scale-float 1d0 364) (scale-float -1d0 -1072))
+ 53)
+ ;; 6
+ (list (complex (scale-float 1d0 -71) (scale-float 1d0 1021))
+ (complex (scale-float 1d0 1001) (scale-float 1d0 -323))
+ (complex (scale-float 1d0 -1072) (scale-float 1d0 20))
+ 53)
+ ;; 7
+ (list (complex (scale-float 1d0 -347) (scale-float 1d0 -54))
+ (complex (scale-float 1d0 -1037) (scale-float 1d0 -1058))
+ (complex 3.898125604559113300d289 8.174961907852353577d295)
+ 53)
+ ;; 8
+ (list (complex (scale-float 1d0 -1074) (scale-float 1d0 -1074))
+ (complex (scale-float 1d0 -1073) (scale-float 1d0 -1074))
+ (complex 0.6d0 0.2d0)
+ 53)
+ ;; 9
+ (list (complex (scale-float 1d0 1015) (scale-float 1d0 -989))
+ (complex (scale-float 1d0 1023) (scale-float 1d0 1023))
+ (complex 0.001953125d0 -0.001953125d0)
+ 53)
+ ;; 10
+ (list (complex (scale-float 1d0 -622) (scale-float 1d0 -1071))
+ (complex (scale-float 1d0 -343) (scale-float 1d0 -798))
+ (complex 1.02951151789360578d-84 6.97145987515076231d-220)
+ 53)
+ ;; 11
+ ;; From Maxima
+ (list #c(5.43d-10 1.13d-100)
+ #c(1.2d-311 5.7d-312)
+ #c(3.691993880674614517999740937026568563794896024143749539711267954d301
+ -1.753697093319947872394996242210428954266103103602859195409591583d301)
+ 52)
+ ;; 12
+ ;; Found by ansi tests. z/z should be exactly 1.
+ (list #c(1.565640716292489d19 0.0d0)
+ #c(1.565640716292489d19 0.0d0)
+ #c(1d0 0)
+ 53)
+ ;; 13
+ ;; Iteration 1. Without this, we would instead return
+ ;;
+ ;; (complex (parse-%a "0x1.ba8df8075bceep+155") (parse-%a "-0x1.a4ad6329485f0p-895"))
+ ;;
+ ;; whose imaginary part is quite a bit off.
+ (list (complex (parse-%a "0x1.73a3dac1d2f1fp+509") (parse-%a "-0x1.c4dba4ba1ee79p-620"))
+ (complex (parse-%a "0x1.adf526c249cf0p+353") (parse-%a "0x1.98b3fbc1677bbp-697"))
+ (complex (parse-%a "0x1.BA8DF8075BCEEp+155") (parse-%a "-0x1.A4AD628DA5B74p-895"))
+ 53)
+ ;; 14
+ ;; Iteration 2.
+ (list (complex (parse-%a "-0x0.000000008e4f8p-1022") (parse-%a "0x0.0000060366ba7p-1022"))
+ (complex (parse-%a "-0x1.605b467369526p-245") (parse-%a "0x1.417bd33105808p-256"))
+ (complex (parse-%a "0x1.cde593daa4ffep-810") (parse-%a "-0x1.179b9a63df6d3p-799"))
+ 52)
+ ;; 15
+ ;; Iteration 3
+ (list (complex (parse-%a "0x1.cb27eece7c585p-355 ") (parse-%a "0x0.000000223b8a8p-1022"))
+ (complex (parse-%a "-0x1.74e7ed2b9189fp-22") (parse-%a "0x1.3d80439e9a119p-731"))
+ (complex (parse-%a "-0x1.3b35ed806ae5ap-333") (parse-%a "-0x0.05e01bcbfd9f6p-1022"))
+ 53)
+ ;; 16
+ ;; Iteration 4
+ (list (complex (parse-%a "-0x1.f5c75c69829f0p-530") (parse-%a "-0x1.e73b1fde6b909p+316"))
+ (complex (parse-%a "-0x1.ff96c3957742bp+1023") (parse-%a "0x1.5bd78c9335899p+1021"))
+ (complex (parse-%a "-0x1.423c6ce00c73bp-710") (parse-%a "0x1.d9edcf45bcb0ep-708"))
+ 52)
+ ))
+
+;; Relative error in terms of bits of accuracy. This is the
+;; definition used by Baudin and Smith. A result of 53 means the two
+;; numbers have identical bits. For complex numbers, we use the min
+;; of the bits of accuracy of the real and imaginary parts.
+(defun rel-err (computed expected)
+ (flet ((rerr (c e)
+ (let ((diff (abs (- c e))))
+ (if (zerop diff)
+ (float-digits diff)
+ (floor (- (log (/ diff (abs e)) 2d0)))))))
+ (min (rerr (realpart computed) (realpart expected))
+ (rerr (imagpart computed) (imagpart expected)))))
+
+(defun test-cdiv-double ()
+ (loop for k from 1
+ for test in *test-cases*
+ do
+ (destructuring-bind (x y z-true expected-rel)
+ test
+ (let* ((z (/ x y))
+ (rel (rel-err z z-true)))
+ (when (< rel expected-rel)
+ (format t "Test ~D failed~%" k)
+ (format t " x = ~A~%" x)
+ (format t " y = ~A~%" y)
+ (format t " z = ~A~%" z)
+ (format t " true = ~A~%" z-true)
+ (format t " acc = ~D, expected ~D~%" rel expected-rel))))))
+||#
+
;;; Divide two numbers
+(defmethod two-arg-/ ((a cl:complex) (b cl:complex))
+ (typecase a
+ ((cl:complex cl:double-float)
+ (typecase b
+ ((cl:complex cl:double-float)
+ (cdiv-double-float a b))
+ (t
+ (cl:/ a b))))
+ (t
+ (cl:/ a b))))
+
(defmethod two-arg-/ ((a number) (b number))
(cl:/ a b))
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-12 06:18:18
|
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 e6095d9c76d3dda5adfb3ca42aea303ce67892ed (commit)
from 77a6c862f000a41c36da522db27020a8b0626cc4 (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 e6095d9c76d3dda5adfb3ca42aea303ce67892ed
Author: Viktor T. Toth <vt...@vt...>
Date: Fri Dec 12 01:17:56 2025 -0500
Add SBCL to RPM release builds
diff --git a/maxima.spec.in b/maxima.spec.in
index 78c6b86b7..bba196c0e 100644
--- a/maxima.spec.in
+++ b/maxima.spec.in
@@ -11,10 +11,10 @@
# ccl_flags --enable-ccl-exec --with-ccl=lx86cl
%define enable_cmucl 0
%define cmucl_flags --disable-cmucl
-%define enable_sbcl 0
-%define sbcl_flags --disable-sbcl-exec
+%define enable_sbcl 1
+%define sbcl_flags --enable-sbcl
%define enable_gcl 1
-%define gcl_flags --enable-gcl
+%define gcl_flags --enable-gcl --with-default-lisp=gcl
# Options to build language packs
# Spanish
-----------------------------------------------------------------------
Summary of changes:
maxima.spec.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-12-12 05:46: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".
The branch, master has been updated
via 77a6c862f000a41c36da522db27020a8b0626cc4 (commit)
from bb307e3ac366da08489246040006a3e00bddd635 (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 77a6c862f000a41c36da522db27020a8b0626cc4
Author: Robert Dodier <rob...@so...>
Date: Thu Dec 11 21:45:37 2025 -0800
test_matrix_display.mac: rework matrix padding examples somewhat.
diff --git a/tests/test_matrix_display.mac b/tests/test_matrix_display.mac
index 87e9e6c6f..fb31d8086 100644
--- a/tests/test_matrix_display.mac
+++ b/tests/test_matrix_display.mac
@@ -143,15 +143,28 @@ print (recip_abs_box_foo3) $
print (recip_abs_box_foo4) $
print (recip_abs_box_foo5) $
-display_matrix_padding_vertical: false;
+reset ();
-recip_abs_box_foo5;
-print (recip_abs_box_foo5);
+display_matrix_padding_vertical: false;
blurf: print (box (genmatrix (lambda ([i, j], x^i/sum (y[k], k, 1, j)), 8, 5)));
-display_matrix_brackets: true;
+block ([display_matrix_brackets: true], print (recip_abs_box_foo5), print (blurf));
+block ([display_matrix_brackets: false], print (recip_abs_box_foo5), print (blurf));
+
+reset ();
+
+display_matrix_padding_horizontal: false;
+
+block ([display_matrix_brackets: true], print (recip_abs_box_foo5), print (blurf));
+block ([display_matrix_brackets: false], print (recip_abs_box_foo5), print (blurf));
+
+reset ();
+
+display_matrix_padding_horizontal: false;
+display_matrix_padding_vertical: false;
-print (blurf);
+block ([display_matrix_brackets: true], print (recip_abs_box_foo5), print (blurf));
+block ([display_matrix_brackets: false], print (recip_abs_box_foo5), print (blurf));
reset ();
-----------------------------------------------------------------------
Summary of changes:
tests/test_matrix_display.mac | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-12-11 07:05:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, master has been updated
via bb307e3ac366da08489246040006a3e00bddd635 (commit)
from f350ddd019079b69da22d3df4691392003f0e34d (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 bb307e3ac366da08489246040006a3e00bddd635
Author: Robert Dodier <rob...@so...>
Date: Wed Dec 10 23:04:17 2025 -0800
Give $BOX the ALIAS property, so that a bare box symbol (not an expression operator) is parsed to MBOX.
This makes e.g. map(box, [e1, e2, e3]) work as expected.
diff --git a/src/comm2.lisp b/src/comm2.lisp
index 089b5300d..e1da8ba48 100644
--- a/src/comm2.lisp
+++ b/src/comm2.lisp
@@ -736,7 +736,14 @@ the hashtable.")
;;;; BOX
+;; Alias makes `box` in input parse to symbol MBOX.
+;; (The MHEADER property is only applied to nonatomic expressions;
+;; the alias property covers `box` as a symbol.)
+
+(defprop $box mbox alias)
+
;; Reverse alias makes MBOX and MLABOX display as box in 1-d output.
+
(defprop mbox $box reversealias)
(defprop mlabox $box reversealias)
-----------------------------------------------------------------------
Summary of changes:
src/comm2.lisp | 7 +++++++
1 file changed, 7 insertions(+)
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-12-11 06:53: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 f350ddd019079b69da22d3df4691392003f0e34d (commit)
from ee369a0f5d1a40bb26a0dc80b6ce3de0475cd469 (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 f350ddd019079b69da22d3df4691392003f0e34d
Author: Robert Dodier <rob...@so...>
Date: Wed Dec 10 22:52:58 2025 -0800
New flag display_matrix_padding_horizontal to control between-columns padding for matrix display.
Default value is true (spaces between columns and a space
before the first column and after the last column).
When false, omit spaces between, before, and after;
columns are adjacent.
This commit includes a reference manual item and
some examples in tests/test_matrix_display.mac.
diff --git a/doc/info/Matrices.texi.m4 b/doc/info/Matrices.texi.m4
index b30582984..08b7cebda 100644
--- a/doc/info/Matrices.texi.m4
+++ b/doc/info/Matrices.texi.m4
@@ -1622,6 +1622,67 @@ only the matrix elements are displayed.
@end deffn
+@c -----------------------------------------------------------------------------
+@anchor{display_matrix_padding_horizontal}
+@deffn {Option variable} display_matrix_padding_horizontal
+Default value: @code{true}
+
+When @code{display_matrix_padding_horizontal} is @code{true},
+matrices are displayed with spaces between successive columns,
+and a space before the first column and a space after the last column.
+
+When @code{display_matrix_padding_horizontal} is @code{false},
+matrices are not displayed with spaces between successive columns,
+and no space before the first column and no space after the last column.
+Successive columns are immediately adjacent to each other,
+and the first column is immediately adjacent to the left bracket,
+and the last column is immediately adjacent to the right bracket,
+if the brackets are present (see @mref{display_matrix_brackets}).
+
+See also @mrefdot{display_matrix_padding_vertical}
+
+Examples:
+
+@c ===beg===
+@c display_matrix_padding_horizontal;
+@c foo: matrix ([a, b, c], [d, e, f], [g, h, i]);
+@c display_matrix_padding_horizontal: false;
+@c foo;
+@c ===end===
+@example maxima
+@group
+(%i1) display_matrix_padding_horizontal;
+(%o1) true
+(%i2) foo: matrix ([a, b, c], [d, e, f], [g, h, i]);
+ ┌ ┐
+ │ a b c │
+ │ │
+(%o2) │ d e f │
+ │ │
+ │ g h i │
+ └ ┘
+@end group
+@group
+(%i3) display_matrix_padding_horizontal: false;
+(%o3) false
+(%i4) foo;
+ ┌ ┐
+ │abc│
+ │ │
+(%o4) │def│
+ │ │
+ │ghi│
+ └ ┘
+@end group
+@end example
+
+@opencatbox{Categories:}
+@category{Matrices}
+@category{Display flags and variables}
+@closecatbox
+
+@end deffn
+
@c -----------------------------------------------------------------------------
@anchor{display_matrix_padding_vertical}
@deffn {Option variable} display_matrix_padding_vertical
@@ -1634,6 +1695,8 @@ When @code{display_matrix_padding_vertical} is @code{false},
matrices are not displayed with an empty line between successive rows;
successive rows are immediately adjacent to each other.
+See also @mrefdot{display_matrix_padding_horizontal}
+
Examples:
@c ===beg===
diff --git a/src/displa.lisp b/src/displa.lisp
index 10b7bdf73..f3e2ddfe2 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1202,6 +1202,7 @@
(defmvar $display_matrix_brackets t)
(defmvar $display_matrix_padding_vertical t)
+(defmvar $display_matrix_padding_horizontal t)
(defun dim-$matrix (form result)
(prog (dmstr rstr cstr consp cols)
@@ -1221,7 +1222,7 @@
(do ((r (cdr form) (cdr r)) (h1 0) (d1 0))
((or consp (null r))
(setq width 0)
- (do ((cs cstr (cdr cs))) ((null cs)) (setq width (+ 2 (car cs) width)))
+ (do ((cs cstr (cdr cs))) ((null cs)) (setq width (+ (if $display_matrix_padding_horizontal 2 0) (car cs) width)))
(if (display2d-unicode-enabled)
(setq h1 (1+ (+ h1 d1)) depth (truncate h1 2) height (- h1 depth))
(setq h1 (1- (+ h1 d1)) depth (truncate h1 2) height (- h1 depth))))
@@ -1245,7 +1246,7 @@
(defun matout (dmstr cstr rstr result)
(when $display_matrix_brackets (push `(d-matrix left ,height ,depth) result))
- (push #\space result)
+ (when $display_matrix_padding_horizontal (push #\space result))
(do ((d dmstr (cdr d)) (c cstr (cdr c)) (w 0 0))
((null d))
(do ((d (car d) (cdr d)) (r rstr (cdr r))) ((null d))
@@ -1253,7 +1254,7 @@
(rplaca (cdar d) (- (truncate (- (car c) (caar d)) 2) w))
(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 result (cons (list (+ (if $display_matrix_padding_horizontal 2 (if (cdr c) 0 1)) (- (car c) w)) 0) (nreconc (car d) result))))
(if $display_matrix_brackets
(setq width (+ 2 width))
(when $display2d_unicode
-----------------------------------------------------------------------
Summary of changes:
doc/info/Matrices.texi.m4 | 63 +++++++++++++++++++++++++++++++++++++++++++++++
src/displa.lisp | 7 +++---
2 files changed, 67 insertions(+), 3 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: vttoth <vt...@us...> - 2025-12-11 05:26: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 ee369a0f5d1a40bb26a0dc80b6ce3de0475cd469 (commit)
from 854c4e4cd0819d2498a09f0a18e79dfc64582d0e (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 ee369a0f5d1a40bb26a0dc80b6ce3de0475cd469
Author: Viktor T. Toth <vt...@vt...>
Date: Thu Dec 11 00:25:34 2025 -0500
Two expected GCL failures in rtest_signum added
diff --git a/src/testsuite.lisp b/src/testsuite.lisp
index 3b54b5a29..72b4a79c5 100644
--- a/src/testsuite.lisp
+++ b/src/testsuite.lisp
@@ -108,7 +108,8 @@
((mlist simp) "rtest_gamma"
#+allegro ((mlist simp) 48 198 663 745))
"rtest_expintegral"
- "rtest_signum"
+ ((mlist simp) "rtest_signum"
+ #+gcl ((mlist simp) 78 79))
"rtest_lambert_w"
((mlist simp) "rtest_elliptic"
#-allegro ((mlist simp) 135)
-----------------------------------------------------------------------
Summary of changes:
src/testsuite.lisp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-10 23:14:22
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Maxima CAS".
The branch, master has been updated
via 854c4e4cd0819d2498a09f0a18e79dfc64582d0e (commit)
via ce3f0a0a184fe44f540020502d32bb4084e60ee3 (commit)
from ff646590d9341cebf39f658ea86da2b48c61caf4 (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 854c4e4cd0819d2498a09f0a18e79dfc64582d0e
Author: Raymond Toy <toy...@gm...>
Date: Wed Dec 10 15:13:57 2025 -0800
Update Changelog for #4647
diff --git a/ChangeLog b/ChangeLog
index c043af3d2..4fa958860 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,7 +17,8 @@ Bug fixes for numbered bugs:
* \#4619: limit(inf = inf) causes stack overflow
* \#4633: integrate(exp(- t) log(t), t, 0, 1) --> integral nounform
* \#4636: signum(ind) is an error
-
+ * \#4647: Maxima error in --preload file causes Lisp error
+
Changes in the Windows installer:
---------------------------------
* Update SBCL
commit ce3f0a0a184fe44f540020502d32bb4084e60ee3
Author: Raymond Toy <toy...@gm...>
Date: Wed Dec 10 15:10:47 2025 -0800
Fix #4647: Error in --preload file causes Lisp error
Instead of a Lisp error, we should continue to the repl. To do so, we
need to catch 'macsyma-quit which is thrown when an error is
encountered. This works when the file is either a mac or lisp file.
diff --git a/src/init-cl.lisp b/src/init-cl.lisp
index 771897d8d..9289a2b67 100644
--- a/src/init-cl.lisp
+++ b/src/init-cl.lisp
@@ -512,7 +512,9 @@ maxima [options] --batch-string='batch_answers_from_file:false; ...'
;; $loadprint T so we can see the file being loaded;
;; unless *maxima-quiet* is T.
(let (($loadprint (not *maxima-quiet*)))
- ($load file)))
+ ;; If there's an error, catch
+ (catch 'macsyma-quit
+ ($load file))))
:help-string
"Preload <file>, which may be any file time accepted by
Maxima's LOAD function. The <file> is loaded before any other
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 ++-
src/init-cl.lisp | 4 +++-
2 files changed, 5 insertions(+), 2 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-10 18:10:44
|
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 ff646590d9341cebf39f658ea86da2b48c61caf4 (commit)
via 79a5ff19027758b327747a81559adc665eccdaad (commit)
via b5553c1cb7bfc31cdc054fbfac3450336022045e (commit)
from ce92a9eaf335223a0a089eab19729a8f0ced94cd (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 ff646590d9341cebf39f658ea86da2b48c61caf4
Merge: ce92a9eaf 79a5ff190
Author: Raymond Toy <toy...@gm...>
Date: Wed Dec 10 10:10:09 2025 -0800
Merge branch 'rtoy-remove-bigfloat%pi'
Full testsuite+share passes with cmucl and ecl.
-----------------------------------------------------------------------
Summary of changes:
share/numeric/rtest_decfp.mac | 2 +-
src/float.lisp | 7 -------
src/globals.lisp | 12 ------------
3 files changed, 1 insertion(+), 20 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-10 16:53:24
|
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-remove-bigfloat%pi has been created
at 79a5ff19027758b327747a81559adc665eccdaad (commit)
- Log -----------------------------------------------------------------
commit 79a5ff19027758b327747a81559adc665eccdaad
Author: Raymond Toy <toy...@gm...>
Date: Wed Dec 10 08:51:43 2025 -0800
Really remove bigfloat%pi and friends
These were just commented out. Now really remove them from the source
code.
diff --git a/src/float.lisp b/src/float.lisp
index cd07422cb..a7458906c 100644
--- a/src/float.lisp
+++ b/src/float.lisp
@@ -46,16 +46,6 @@
(defvar *decfp nil)
-;; FIXME: These don't appear to be used anywhere. Remove these.
-#+nil
-(progn
-(defvar max-bfloat-%pi bigfloat%pi)
-(defvar max-bfloat-%e bigfloat%e)
-(defvar max-bfloat-%gamma bigfloat%gamma)
-(defvar max-bfloat-log2 bigfloat_log2)
-)
-
-
(declare-top (special *cancelled $bfloat))
;; Representation of a Bigfloat: ((BIGFLOAT SIMP precision) mantissa exponent)
diff --git a/src/globals.lisp b/src/globals.lisp
index a0f0f37fd..9091f4f59 100644
--- a/src/globals.lisp
+++ b/src/globals.lisp
@@ -815,22 +815,6 @@
"Bigfloat representation of -1/2. Automatically updated whenever
fpprec is set.")
-#+nil
-(defmvar bigfloat%e '((bigfloat simp 56.) 48968212118944587. 2)
- "Bigfloat representation of %E")
-
-#+nil
-(defmvar bigfloat%pi '((bigfloat simp 56.) 56593902016227522. 2)
- "Bigfloat representation of %pi")
-
-#+nil
-(defmvar bigfloat%gamma '((bigfloat simp 56.) 41592772053807304. 0)
- "Bigfloat representation of %gamma")
-
-#+nil
-(defmvar bigfloat_log2 '((bigfloat simp 56.) 49946518145322874. 0)
- "Bigfloat representation of log(2)")
-
;; Number of bits of precision in the mantissa of newly created bigfloats.
;; FPPREC = ($FPPREC+1)*(Log base 2 of 10)
commit b5553c1cb7bfc31cdc054fbfac3450336022045e
Author: Raymond Toy <toy...@gm...>
Date: Wed Dec 10 08:19:26 2025 -0800
Remove bigfloat%pi and friends
This includes bigfloat%e, bigfloat%gamma, and bigfloat_log2. Whenver
these variables were used, they were always bound to the correct
bigfloat value (via `$bfloat`) before use. Hence, there's no reason
to have these special variables.
Also bigfloat_log2 was never used anywhere.
Removing these also allows us to remove max-bfloat-%pi, max-bfloat-%e,
max-bfloat-%gamma and max-bfloat-log2. These were never used
anywhere (as mentioned in the comment in float.lisp).
diff --git a/share/numeric/rtest_decfp.mac b/share/numeric/rtest_decfp.mac
index 7ff87fcba..04d9f4d14 100644
--- a/share/numeric/rtest_decfp.mac
+++ b/share/numeric/rtest_decfp.mac
@@ -84,5 +84,5 @@ block(
/* The decfp code changes the value of bigfloatone (and possibly other
such values) to decimal floats. Let's reset them. */
-(reset(?bigfloat%pi,?bigfloat%e,?\*bfmhalf\*,?\*bfhalf\*,?\*bigfloatone\*,?\*bigfloatzero\*),0);
+(reset(?\*bfmhalf\*,?\*bfhalf\*,?\*bigfloatone\*,?\*bigfloatzero\*),0);
0$
\ No newline at end of file
diff --git a/src/float.lisp b/src/float.lisp
index 73462c3ec..cd07422cb 100644
--- a/src/float.lisp
+++ b/src/float.lisp
@@ -47,10 +47,13 @@
(defvar *decfp nil)
;; FIXME: These don't appear to be used anywhere. Remove these.
+#+nil
+(progn
(defvar max-bfloat-%pi bigfloat%pi)
(defvar max-bfloat-%e bigfloat%e)
(defvar max-bfloat-%gamma bigfloat%gamma)
(defvar max-bfloat-log2 bigfloat_log2)
+)
(declare-top (special *cancelled $bfloat))
diff --git a/src/globals.lisp b/src/globals.lisp
index fbdc95be6..a0f0f37fd 100644
--- a/src/globals.lisp
+++ b/src/globals.lisp
@@ -815,15 +815,19 @@
"Bigfloat representation of -1/2. Automatically updated whenever
fpprec is set.")
+#+nil
(defmvar bigfloat%e '((bigfloat simp 56.) 48968212118944587. 2)
"Bigfloat representation of %E")
+#+nil
(defmvar bigfloat%pi '((bigfloat simp 56.) 56593902016227522. 2)
"Bigfloat representation of %pi")
+#+nil
(defmvar bigfloat%gamma '((bigfloat simp 56.) 41592772053807304. 0)
"Bigfloat representation of %gamma")
+#+nil
(defmvar bigfloat_log2 '((bigfloat simp 56.) 49946518145322874. 0)
"Bigfloat representation of log(2)")
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-10 16:50:16
|
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 ce92a9eaf335223a0a089eab19729a8f0ced94cd (commit)
from 2f4278f02e14872ee19b00291a8799e36a9f3b89 (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 ce92a9eaf335223a0a089eab19729a8f0ced94cd
Author: Raymond Toy <toy...@gm...>
Date: Wed Dec 10 08:49:03 2025 -0800
Missed on more use of bfmhalf
We missed one place where we failed to rename bfmhalf to *bfmhalf*.
diff --git a/src/nummod.lisp b/src/nummod.lisp
index e5094b2c9..46affc85a 100644
--- a/src/nummod.lisp
+++ b/src/nummod.lisp
@@ -94,7 +94,7 @@
;; For an example, see pretty-good-floor-or-ceiling. Code courtesy of Stavros Macrakis.
(defmacro bind-fpprec (val &body exprs)
- `(let (fpprec *bigfloatzero* *bigfloatone* *bfhalf* bfmhalf)
+ `(let (fpprec *bigfloatzero* *bigfloatone* *bfhalf* *bfmhalf*)
(let (($fpprec (fpprec1 nil ,val)))
,@exprs)))
-----------------------------------------------------------------------
Summary of changes:
src/nummod.lisp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-10 16:01:12
|
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 2f4278f02e14872ee19b00291a8799e36a9f3b89 (commit)
via 9b8a8d96afc8fbbaf68cbc6236700a03c23ff3bf (commit)
from 1406e6ed34252b55cfe2b9caf2accd7aad8062fa (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 -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
share/contrib/binsplit/binsplit.lisp | 2 +-
share/linearalgebra/mring.lisp | 6 ++---
share/numeric/rtest_decfp.mac | 2 +-
src/cpoly.lisp | 14 +++++-----
src/expintegral.lisp | 50 ++++++++++++++++++------------------
src/float-properties.lisp | 2 +-
src/float.lisp | 34 ++++++++++++------------
src/gamma.lisp | 20 +++++++--------
src/globals.lisp | 24 +++++++++++------
src/nummod.lisp | 2 +-
src/rpart.lisp | 2 +-
src/simp.lisp | 12 ++++-----
tests/rtest_allnummod.mac | 4 +--
13 files changed, 91 insertions(+), 83 deletions(-)
hooks/post-receive
--
Maxima CAS
|
|
From: rtoy <rt...@us...> - 2025-12-10 16:00: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, rtoy-rename-bfhalf-with-stars has been created
at 2f4278f02e14872ee19b00291a8799e36a9f3b89 (commit)
- Log -----------------------------------------------------------------
commit 2f4278f02e14872ee19b00291a8799e36a9f3b89
Author: Raymond Toy <toy...@gm...>
Date: Tue Dec 9 08:11:00 2025 -0800
Update more places with bfhalf and friends
These files also need to rename `bfhalf` to `*bfhalf*` and friends.
Testsuite + share passes with no new failures.
diff --git a/share/contrib/binsplit/binsplit.lisp b/share/contrib/binsplit/binsplit.lisp
index 8f83b5bb8..50f16fb80 100644
--- a/share/contrib/binsplit/binsplit.lisp
+++ b/share/contrib/binsplit/binsplit.lisp
@@ -87,7 +87,7 @@
(let ((e 0) phi)
;; bs-carg11 needs im-z < 1/2 (i.e. phi < pi/6)
;; when im-z >= 1/2 bisect phi by taking the complex sqrt
- (when (not (fplessp im-z (cdr bfhalf)))
+ (when (not (fplessp im-z (cdr *bfhalf*)))
(multiple-value-setq (re-z im-z) (complex-sqrt (bcons re-z) (bcons im-z)))
(setq e 1) )
(setq phi (bs-carg11 (list re-z im-z) prec))
diff --git a/share/linearalgebra/mring.lisp b/share/linearalgebra/mring.lisp
index 4460a361b..a3b9255a7 100644
--- a/share/linearalgebra/mring.lisp
+++ b/share/linearalgebra/mring.lisp
@@ -260,9 +260,9 @@
:sub #'(lambda (a b) ($rectform (sub a b)))
:negate #'(lambda (a) (mul -1 a))
:psqrt #'(lambda (s) (if (mlsp s 0) nil (ftake '%sqrt s)))
- :add-id #'(lambda () bigfloatzero)
- :mult-id #'(lambda () bigfloatone)
- :fzerop #'(lambda (s) (like s bigfloatzero))
+ :add-id #'(lambda () *bigfloatzero*)
+ :mult-id #'(lambda () *bigfloatone*)
+ :fzerop #'(lambda (s) (like s *bigfloatzero*))
:adjoint #'cl:identity
:mring-to-maxima #'cl:identity
:maxima-to-mring #'(lambda (s)
diff --git a/share/numeric/rtest_decfp.mac b/share/numeric/rtest_decfp.mac
index f10328ce4..7ff87fcba 100644
--- a/share/numeric/rtest_decfp.mac
+++ b/share/numeric/rtest_decfp.mac
@@ -84,5 +84,5 @@ block(
/* The decfp code changes the value of bigfloatone (and possibly other
such values) to decimal floats. Let's reset them. */
-(reset(?bigfloat%pi,?bigfloat%e,?bfmhalf,?bfhalf,?bigfloatone,?bigfloatzero),0);
+(reset(?bigfloat%pi,?bigfloat%e,?\*bfmhalf\*,?\*bfhalf\*,?\*bigfloatone\*,?\*bigfloatzero\*),0);
0$
\ No newline at end of file
diff --git a/src/float-properties.lisp b/src/float-properties.lisp
index 9f4fb65ad..a14a6fdb1 100644
--- a/src/float-properties.lisp
+++ b/src/float-properties.lisp
@@ -125,7 +125,7 @@
(expon (- (caddr f) (bigfloat-prec f))))
(cond ((= 0 significand)
; ULP is arbitrarily small for bigfloat 0
- bigfloatzero)
+ *bigfloatzero*)
;; precision of resulting bigfloat not necessarily the same as input
;; but that doesn't matter, since 2^n can be represented exactly in all
;; precisions
diff --git a/tests/rtest_allnummod.mac b/tests/rtest_allnummod.mac
index e8be42e8f..3aee2cea2 100644
--- a/tests/rtest_allnummod.mac
+++ b/tests/rtest_allnummod.mac
@@ -266,10 +266,10 @@ trigsimp(ceiling(asin(cos(sqrt(2))^2 + sin(sqrt(2))^2 - 1/7)));
/* SF bug #1644378 */
-(x : ?bigfloatone,0);
+(x : ?\*bigfloatone\*,0);
0$
-(ceiling(log(2)), is(x = ?bigfloatone));
+(ceiling(log(2)), is(x = ?\*bigfloatone\*));
true$
(remvalue(x),0);
commit 9b8a8d96afc8fbbaf68cbc6236700a03c23ff3bf
Author: Raymond Toy <toy...@gm...>
Date: Tue Dec 9 07:27:15 2025 -0800
Rename bfhalf to *bfhalf*
Rename this special var using the lisp convention. This makes it
clear bfhalf is a special variable. We do the same for
`bigfloatzero`, `bigfloatone`, and `bfmhalf`. Update docstrings to
say that these are updated when fpprec is set.
diff --git a/src/cpoly.lisp b/src/cpoly.lisp
index 19d52c988..6de509cca 100644
--- a/src/cpoly.lisp
+++ b/src/cpoly.lisp
@@ -1057,12 +1057,12 @@
dx (fpquotient (fpdifference (fplog (aref *shr-sl* *nn*))
(fplog (aref *shr-sl* 0)))
(intofp *nn*))
- *polysc1* (fpentier (bcons (fpplus (cdr bfhalf)
+ *polysc1* (fpentier (bcons (fpplus (cdr *bfhalf*)
(fpquotient dx *logbas*))))
x (fpplus x (fptimes* (intofp (* *polysc1* *nn*))
(fptimes* *logbas*
- (cdr bfhalf))))
- *polysc* (fpentier (bcons (fpplus (cdr bfhalf) (fpquotient x *logbas*))))))
+ (cdr *bfhalf*))))
+ *polysc* (fpentier (bcons (fpplus (cdr *bfhalf*) (fpquotient x *logbas*))))))
(cond ((equalp (aref *shr-sl* i) (intofp 0))
(setq j (1+ j)))
(t
@@ -1142,7 +1142,7 @@
((or bool1
(fpgreaterp omp mp)
;;(not (< relstp 0.05))
- (fpgreaterp relstp (cdr bfhalf)))
+ (fpgreaterp relstp (cdr *bfhalf*)))
(if (fpgreaterp (fptimes* (intofp 0.1) mp)
omp)
(return t)
@@ -1199,7 +1199,7 @@
(cond ((and (not *bool*)
test
(not (= j l2)))
- (cond ((fpgreaterp (fptimes* (cdr bfhalf) (bf-cmod-sl *zr* *zi*))
+ (cond ((fpgreaterp (fptimes* (cdr *bfhalf*) (bf-cmod-sl *zr* *zi*))
(bf-cmod-sl (fpdifference *tr* otr)
(fpdifference *ti* oti)))
(cond (pasd
@@ -1231,7 +1231,7 @@
;; bfloat epsilon. 2^(-fpprec)
(*are* (bf-scale-float (intofp 2) (- fpprec)))
(*mre* (intofp 0))
- (xx (fproot bfhalf 2))
+ (xx (fproot *bfhalf* 2))
(yy (intofp 0))
;; cos(94deg). Probably don't need full bfloat precision here.
(cosr (intofp -0.0697564737441253007759588351941433286009032016527965250436172961370711270667891229125378568280742923028942076107741717160209821557740512756197740925891665208235244345674420755726285778495732000059330205461129612198466216775458241726113210999152981126990497403794217445425671287263223529689424188857433131142804))
@@ -1469,7 +1469,7 @@
(*infin* (intofp +most-positive-flonum+))
(*are* (bf-scale-float (intofp 2) (- fpprec)))
(*mre* (intofp 0))
- (xx (fproot bfhalf 2))
+ (xx (fproot *bfhalf* 2))
(yy (intofp 0))
;; cos(94deg)
(cosr (intofp
diff --git a/src/expintegral.lisp b/src/expintegral.lisp
index 77c523c98..88af88e04 100644
--- a/src/expintegral.lisp
+++ b/src/expintegral.lisp
@@ -703,7 +703,7 @@
(defun bfloat-expintegral-e (n z)
(let ((*expint-eps* (power ($bfloat 10.0) (- $fpprec)))
(*expint-maxit* 5000) ; arbitrarily chosen, we need a better choice
- (bigfloattwo (add bigfloatone bigfloatone))
+ (bigfloattwo (add *bigfloatone* *bigfloatone*))
(bigfloat%e ($bfloat '$%e))
(bigfloat%gamma ($bfloat '$%gamma))
(flz (complex ($float ($realpart z)) ($float ($imagpart z)))))
@@ -721,8 +721,8 @@
(when *debug-expintegral*
(format t "~&We expand in continued fractions.~%"))
(let* ((b (add z n))
- (c (div bigfloatone (mul *expint-eps* *expint-eps*)))
- (d (cdiv bigfloatone b))
+ (c (div *bigfloatone* (mul *expint-eps* *expint-eps*)))
+ (d (cdiv *bigfloatone* b))
(n1 (- n 1))
(h d)
(e 0.0))
@@ -733,12 +733,12 @@
(intl:gettext "expintegral_e: continued fractions failed.")))
(setq b (add b bigfloattwo))
- (setq d (cdiv bigfloatone (add (mul a d) b)))
+ (setq d (cdiv *bigfloatone* (add (mul a d) b)))
(setq c (add b (cdiv a c)))
(setq e (cmul c d))
(setq h (cmul h e))
- (when (eq ($sign (sub (cabs (sub e bigfloatone)) *expint-eps*))
+ (when (eq ($sign (sub (cabs (sub e *bigfloatone*)) *expint-eps*))
'$neg)
(when *debug-expintegral*
(setq *debug-expint-bfloatmaxit*
@@ -750,9 +750,9 @@
(format t "~&We expand in a power series.~%"))
(let* ((n1 (- n 1))
(meuler (mul -1 bigfloat%gamma))
- (r (if (= n1 0) (sub meuler ($log z)) (div bigfloatone n1)))
- (f bigfloatone)
- (e bigfloatzero))
+ (r (if (= n1 0) (sub meuler ($log z)) (div *bigfloatone* n1)))
+ (f *bigfloatone*)
+ (e *bigfloatzero*))
(do* ((i 1 (+ i 1)))
((> i *expint-maxit*)
(merror (intl:gettext "expintegral_e: series failed.")))
@@ -761,7 +761,7 @@
((= i n1)
(let ((psi meuler))
(dotimes (ii n1)
- (setq psi (add psi (cdiv bigfloatone (+ ii 1)))))
+ (setq psi (add psi (cdiv *bigfloatone* (+ ii 1)))))
(setq e (cmul f (sub psi ($log z))))))
(t
(setq e (cdiv (mul -1 f) (- i n1)))))
@@ -783,7 +783,7 @@
(defun frac-bfloat-expintegral-e (n z)
(let ((*expint-eps* (power ($bfloat 10.0) (- $fpprec)))
(*expint-maxit* 5000) ; arbitrarily chosen, we need a better choice
- (bigfloattwo (add bigfloatone bigfloatone))
+ (bigfloattwo (add *bigfloatone* *bigfloatone*))
(bigfloat%e ($bfloat '$%e))
(bigfloat%gamma ($bfloat '$%gamma)))
@@ -795,13 +795,13 @@
(cond
((and (or (eq ($sign ($realpart z)) '$pos)
(eq ($sign ($realpart z)) '$zero))
- (eq ($sign (sub (cabs z) bigfloatone)) '$pos))
+ (eq ($sign (sub (cabs z) *bigfloatone*)) '$pos))
;; We expand in continued fractions.
(when *debug-expintegral*
(format t "We expand in continued fractions.~%"))
(let* ((b (add z n))
- (c (div bigfloatone (mul *expint-eps* *expint-eps*)))
- (d (cdiv bigfloatone b))
+ (c (div *bigfloatone* (mul *expint-eps* *expint-eps*)))
+ (d (cdiv *bigfloatone* b))
(n1 (sub n 1))
(h d)
(e 0.0))
@@ -812,12 +812,12 @@
(intl:gettext "expintegral_e: continued fractions failed.")))
(setq b (add b bigfloattwo))
- (setq d (cdiv bigfloatone (add (mul a d) b)))
+ (setq d (cdiv *bigfloatone* (add (mul a d) b)))
(setq c (add b (cdiv a c)))
(setq e (cmul c d))
(setq h (cmul h e))
- (when (eq ($sign (sub (cabs (sub e bigfloatone)) *expint-eps*))
+ (when (eq ($sign (sub (cabs (sub e *bigfloatone*)) *expint-eps*))
'$neg)
(when *debug-expintegral*
(setq *debug-expint-fracbfloatmaxit*
@@ -831,7 +831,7 @@
(and ($bfloatp n)
(eq ($sign n) '$pos)
(equal (sub (mul 2 ($fix n)) (mul 2 n))
- bigfloatzero)))
+ *bigfloatzero*)))
;; We have a Float or Bigfloat representation of positive integer.
;; We call bfloat-expintegral-e.
(when *debug-expintegral*
@@ -843,16 +843,16 @@
;; of an integer) or complex. We expand in a power series.
(when *debug-expintegral*
(format t "We expand in a power series.~%"))
- (let* ((n1 (sub n bigfloatone))
- (n2 (sub bigfloatone n))
+ (let* ((n1 (sub n *bigfloatone*))
+ (n2 (sub *bigfloatone* n))
(gm (take '(%gamma) n2))
- (r (sub (cmul (cpower z n1) gm) (cdiv bigfloatone n2)))
- (f bigfloatone)
- (e bigfloatzero))
+ (r (sub (cmul (cpower z n1) gm) (cdiv *bigfloatone* n2)))
+ (f *bigfloatone*)
+ (e *bigfloatzero*))
(do ((i 1 (+ i 1)))
((> i *expint-maxit*)
(merror (intl:gettext "expintegral_e: series failed.")))
- (setq f (cmul (mul -1 bigfloatone) (cmul f (cdiv z i))))
+ (setq f (cmul (mul -1 *bigfloatone*) (cmul f (cdiv z i))))
(setq e (cdiv (mul -1 f) (sub i n1)))
(setq r (add r e))
(when (eq ($sign (sub (cabs e) (cmul (cabs r) *expint-eps*)))
@@ -1180,11 +1180,11 @@
(defun bfloat-expintegral-ei (z)
(let ((mz (mul -1 z)))
- (add (cmul (mul -1 bigfloatone)
+ (add (cmul (mul -1 *bigfloatone*)
(bfloat-expintegral-e 1 mz))
- (sub (cmul (div bigfloatone 2)
+ (sub (cmul (div *bigfloatone* 2)
(sub (take '(%log) z)
- (take '(%log) (cdiv bigfloatone z))))
+ (take '(%log) (cdiv *bigfloatone* z))))
(take '(%log) mz)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/src/float.lisp b/src/float.lisp
index 1ecacc822..73462c3ec 100644
--- a/src/float.lisp
+++ b/src/float.lisp
@@ -73,10 +73,10 @@
(if (or (not (fixnump q)) (< q 1))
(merror (intl:gettext "fpprec: value must be a positive integer; found: ~M") q))
(setq fpprec (+ 2 (integer-length (expt 10. q)))
- bigfloatone ($bfloat 1)
- bigfloatzero ($bfloat 0)
- bfhalf (list (car bigfloatone) (cadr bigfloatone) 0)
- bfmhalf (list (car bigfloatone) (- (cadr bigfloatone)) 0))
+ *bigfloatone* ($bfloat 1)
+ *bigfloatzero* ($bfloat 0)
+ *bfhalf* (list (car *bigfloatone*) (cadr *bigfloatone*) 0)
+ *bfmhalf* (list (car *bigfloatone*) (- (cadr *bigfloatone*)) 0))
q)
;; FPSCAN is called by lexical scan when a
@@ -598,7 +598,7 @@
(let ((fprateps (cdr ($bfloat (if $bftorat
(list '(rat simp) 1 (exptrl 2 (1- fpprec)))
$ratepsilon)))))
- (or (and (equal x bigfloatzero) (cons 0 1))
+ (or (and (equal x *bigfloatzero*) (cons 0 1))
(prog (y a)
(return (do ((xx x (setq y (invertbigfloat
(bcons (fpdifference (cdr xx) (cdr ($bfloat a)))))))
@@ -768,7 +768,7 @@
;; that and signal a domain error if so. There
;; are no other bfloat values where tan(x) or
;; sin(x) is zero.
- (when (equal (second x) bigfloatzero)
+ (when (equal (second x) *bigfloatzero*)
(domain-error (second x) (caar x)))
(invertbigfloat
($bfloat (list (ncons (safe-get (caar x) 'recip)) y))))
@@ -788,7 +788,7 @@
(defun addbigfloat (h)
(prog (fans tst r nfans)
- (setq fans (setq tst bigfloatzero) nfans 0)
+ (setq fans (setq tst *bigfloatzero*) nfans 0)
(do ((l h (cdr l)))
((null l))
(cond ((setq r (bigfloatp (car l)))
@@ -1222,7 +1222,7 @@
;; value because 1 is always an exact bfloat.
(defun fpone ()
(cond (*decfp (intofp 1))
- ((= fpprec (bigfloat-prec bigfloatone)) (cdr bigfloatone))
+ ((= fpprec (bigfloat-prec *bigfloatone*)) (cdr *bigfloatone*))
(t (intofp 1))))
;;----------------------------------------------------------------------------;;
@@ -1729,9 +1729,9 @@
(power -1 n))
(exptbigfloat (bcons (fpminus (cdr p))) n)))
((and (< (cadr p) 0) (not (integerp n)))
- (cond ((or (equal n 0.5) (equal n bfhalf))
+ (cond ((or (equal n 0.5) (equal n *bfhalf*))
(exptbigfloat p '((rat simp) 1 2)))
- ((or (equal n -0.5) (equal n bfmhalf))
+ ((or (equal n -0.5) (equal n *bfmhalf*))
(exptbigfloat p '((rat simp) -1 2)))
(($bfloatp (setq n ($bfloat n)))
(cond ((equal n ($bfloat (fpentier n)))
@@ -2193,7 +2193,7 @@
(cond ((minusp (car fp-x))
;; asin(-x) = -asin(x);
(mul -1 (fpasin (bcons (fpminus fp-x)))))
- ((fplessp fp-x (cdr bfhalf))
+ ((fplessp fp-x (cdr *bfhalf*))
;; 0 <= x < 1/2
;; asin(x) = atan(x/sqrt(1-x^2))
(bcons
@@ -2349,17 +2349,17 @@
(multiple-value-bind (u v)
(complex-atanh x (bcons (intofp 0)))
(add u (mul '$%i v))))
- ((fpgreaterp fp-x (cdr bfhalf))
+ ((fpgreaterp fp-x (cdr *bfhalf*))
;; atanh(x) = 1/2*log1p(2*x/(1-x))
(bcons
- (fptimes* (cdr bfhalf)
+ (fptimes* (cdr *bfhalf*)
(fplog1p (fpquotient (fptimes* (intofp 2) fp-x)
(fpdifference (fpone) fp-x))))))
(t
;; atanh(x) = 1/2*log1p(2*x + 2*x*x/(1-x))
(let ((2x (fptimes* (intofp 2) fp-x)))
(bcons
- (fptimes* (cdr bfhalf)
+ (fptimes* (cdr *bfhalf*)
(fplog1p (fpplus 2x
(fpquotient (fptimes* 2x fp-x)
(fpdifference (fpone) fp-x)))))))))))
@@ -2424,11 +2424,11 @@
(fppi-val (fppi)))
(if x-lt-minus-1
- (fptimes* fppi-val (cdr bfhalf))
+ (fptimes* fppi-val (cdr *bfhalf*))
(if x-gt-plus-1
- (fptimes* fppi-val (cdr bfmhalf))
+ (fptimes* fppi-val (cdr *bfmhalf*))
'(0 0))))
- (fptimes* (cdr bfmhalf)
+ (fptimes* (cdr *bfmhalf*)
(fpatan2 (fptimes* (intofp 2) y)
(fpdifference (fptimes* 1-x (fpplus fp1 x))
t1^2))))))
diff --git a/src/gamma.lisp b/src/gamma.lisp
index c7a0d0f2e..176d4210e 100644
--- a/src/gamma.lisp
+++ b/src/gamma.lisp
@@ -312,7 +312,7 @@
(defun bfloat-double-factorial (z)
(let* ((pival ($bfloat '$%pi))
- (bigfloat1 ($bfloat bigfloatone))
+ (bigfloat1 ($bfloat *bigfloatone*))
(bigfloat2 (add bigfloat1 bigfloat1))
(bigfloat4 (add bigfloat2 bigfloat2))
($ratprint nil))
@@ -2032,10 +2032,10 @@
(bfloat-log-gamma z))))
(t
(let* ((k (* 2 (+ 1 ($entier (* 0.41 $fpprec)))))
- (m ($bfloat bigfloatone))
+ (m ($bfloat *bigfloatone*))
(z+k (add z k -1))
(y (power z+k 2))
- (x ($bfloat bigfloatzero))
+ (x ($bfloat *bigfloatzero*))
(ii))
(dotimes (i (/ k 2))
(setq ii (* 2 (+ i 1)))
@@ -2080,10 +2080,10 @@
(complex-bfloat-log-gamma z))))
(t
(let* ((k (* 2 (+ 1 ($entier (* 0.41 $fpprec)))))
- (m ($bfloat bigfloatone))
+ (m ($bfloat *bigfloatone*))
(z+k (add z k -1))
(y ($rectform (power z+k 2)))
- (x ($bfloat bigfloatzero))
+ (x ($bfloat *bigfloatzero*))
(ii))
(dotimes (i (/ k 2))
(setq ii (* 2 (+ i 1)))
@@ -2250,20 +2250,20 @@
(simplify (list '(%signum) z))
(sub 1
(mul
- (div 1 (power ($bfloat '$%pi) bfhalf))
- (bfloat-gamma-incomplete bfhalf ($bfloat (power z 2))))))))
+ (div 1 (power ($bfloat '$%pi) *bfhalf*))
+ (bfloat-gamma-incomplete *bfhalf* ($bfloat (power z 2))))))))
(defun complex-bfloat-erf (z)
;; Warning! This has round-off problems when abs(z) is very small.
(let* (($ratprint nil)
(result
(cmul
- (cdiv (cpower (cpower z 2) bfhalf) z)
+ (cdiv (cpower (cpower z 2) *bfhalf*) z)
(sub 1
(cmul
- (div 1 (power ($bfloat '$%pi) bfhalf))
+ (div 1 (power ($bfloat '$%pi) *bfhalf*))
(complex-bfloat-gamma-incomplete
- bfhalf
+ *bfhalf*
($bfloat (cpower z 2))))))))
(cond
((zerop1 ($imagpart z))
diff --git a/src/globals.lisp b/src/globals.lisp
index 76644e4d4..fbdc95be6 100644
--- a/src/globals.lisp
+++ b/src/globals.lisp
@@ -793,19 +793,27 @@
rounding purposes."
:properties ((assign 'fpprec1)))
-(defmvar bigfloatzero '((bigfloat simp 56.) 0 0)
- "Bigfloat representation of 0"
+(defmvar *bigfloatzero*
+ '((bigfloat simp 56.) 0 0)
+ "Bigfloat representation of 0 Automatically updated whenever fpprec
+ is set."
in-core)
-(defmvar bigfloatone '((bigfloat simp 56.) #.(expt 2 55.) 1)
- "Bigfloat representation of 1"
+(defmvar *bigfloatone*
+ '((bigfloat simp 56.) #.(expt 2 55.) 1)
+ "Bigfloat representation of 1. Automatically updated whenever fpprec
+ is set."
in-core)
-(defmvar bfhalf '((bigfloat simp 56.) #.(expt 2 55.) 0)
- "Bigfloat representation of 1/2")
+(defmvar *bfhalf*
+ '((bigfloat simp 56.) #.(expt 2 55.) 0)
+ "Bigfloat representation of 1/2. Automatically updated whenever fpprec
+ is set.")
-(defmvar bfmhalf '((bigfloat simp 56.) #.(- (expt 2 55.)) 0)
- "Bigfloat representation of -1/2")
+(defmvar *bfmhalf*
+ '((bigfloat simp 56.) #.(- (expt 2 55.)) 0)
+ "Bigfloat representation of -1/2. Automatically updated whenever
+ fpprec is set.")
(defmvar bigfloat%e '((bigfloat simp 56.) 48968212118944587. 2)
"Bigfloat representation of %E")
diff --git a/src/nummod.lisp b/src/nummod.lisp
index c2fa9f300..e5094b2c9 100644
--- a/src/nummod.lisp
+++ b/src/nummod.lisp
@@ -94,7 +94,7 @@
;; For an example, see pretty-good-floor-or-ceiling. Code courtesy of Stavros Macrakis.
(defmacro bind-fpprec (val &body exprs)
- `(let (fpprec bigfloatzero bigfloatone bfhalf bfmhalf)
+ `(let (fpprec *bigfloatzero* *bigfloatone* *bfhalf* bfmhalf)
(let (($fpprec (fpprec1 nil ,val)))
,@exprs)))
diff --git a/src/rpart.lisp b/src/rpart.lisp
index 09396e1f3..2365cc72c 100644
--- a/src/rpart.lisp
+++ b/src/rpart.lisp
@@ -689,7 +689,7 @@
(t (cons (take '(mabs) l) (genatan 0 l))))))))
((eq '$zero (let ((sign-imag-errp nil)) (catch 'sign-imag-err ($sign l))))
(cond ((some-bfloatp l)
- (cons bigfloatzero bigfloatzero)) ; contagious
+ (cons *bigfloatzero* *bigfloatzero*)) ; contagious
((some-floatp l)
(cons 0.0 0.0))
(t (cons 0 0))))
diff --git a/src/simp.lisp b/src/simp.lisp
index 1a1b97d41..760e8f679 100644
--- a/src/simp.lisp
+++ b/src/simp.lisp
@@ -1269,7 +1269,7 @@
(/ (cadr x) (caddr x)))
((and (floatp (cadr x)) (floatp (caddr x)) #-ieee-floating-point (not (zerop (caddr x))))
(/ (cadr x) (caddr x)))
- ((and ($bfloatp (cadr x)) ($bfloatp (caddr x)) (not (equal bigfloatzero (caddr x))))
+ ((and ($bfloatp (cadr x)) ($bfloatp (caddr x)) (not (equal *bigfloatzero* (caddr x))))
;; Call BIGFLOATP to ensure that arguments have same precision.
;; Otherwise FPQUOTIENT could return a spurious value.
(bcons (fpquotient (cdr (bigfloatp (cadr x))) (cdr (bigfloatp (caddr x))))))
@@ -1893,10 +1893,10 @@
(cond ((mnump r1) (addk 0.0 r1))
;; Do not simplify the type of the number away.
(t (list '(mexpt simp) r1 1.0))))
- ((equal r2 bigfloatone)
+ ((equal r2 *bigfloatone*)
(cond ((mnump r1) ($bfloat r1))
;; Do not simplify the type of the number away.
- (t (list '(mexpt simp) r1 bigfloatone))))
+ (t (list '(mexpt simp) r1 *bigfloatone*))))
((zerop1 r1)
(cond ((or (zerop1 r2) (mnegp r2))
(if (not errorsw)
@@ -1904,7 +1904,7 @@
(throw 'errorsw t)))
(t (zerores r1 r2))))
((or (zerop1 r2) (onep1 r1))
- (cond ((or ($bfloatp r1) ($bfloatp r2)) bigfloatone)
+ (cond ((or ($bfloatp r1) ($bfloatp r2)) *bigfloatone*)
((or (floatp r1) (floatp r2)) 1.0)
(t 1)))
((or ($bfloatp r1) ($bfloatp r2)) ($bfloat (list '(mexpt) r1 r2)))
@@ -2196,7 +2196,7 @@
;; A numeric constant like %e, %pi, ... and
;; exponent is a float or bigfloat value.
(return (if (and (member gr *builtin-numeric-constants*)
- (equal pot bigfloatone))
+ (equal pot *bigfloatone*))
;; Return a bigfloat value.
($bfloat gr)
;; Return a float value.
@@ -2742,7 +2742,7 @@
(t (list '(mexpt simp) '$%e pot))))
(defun zerores (r1 r2)
- (cond ((or ($bfloatp r1) ($bfloatp r2)) bigfloatzero)
+ (cond ((or ($bfloatp r1) ($bfloatp r2)) *bigfloatzero*)
((or (floatp r1) (floatp r2)) 0.0)
(t 0)))
-----------------------------------------------------------------------
hooks/post-receive
--
Maxima CAS
|
|
From: <ap...@us...> - 2025-12-09 06:08:19
|
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 1406e6ed34252b55cfe2b9caf2accd7aad8062fa (commit)
from 1c6a095f833c3b3e15d13880c2476065a09bf9cf (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 1406e6ed34252b55cfe2b9caf2accd7aad8062fa
Author: Robert Dodier <rob...@so...>
Date: Mon Dec 8 22:07:44 2025 -0800
New flag display_matrix_padding_vertical to control between-rows padding for matrix display.
Default value is true (blank line between rows).
When false, omit the blank line; rows are adjacent.
This commit includes a reference manual item and
some examples in tests/test_matrix_display.mac.
Incidentally silence a warning about the unused variable
DUMMY in the function definition for DIM-MBOX-OR-MLABOX.
diff --git a/doc/info/Matrices.texi.m4 b/doc/info/Matrices.texi.m4
index 4a4792ecc..b30582984 100644
--- a/doc/info/Matrices.texi.m4
+++ b/doc/info/Matrices.texi.m4
@@ -1622,6 +1622,58 @@ only the matrix elements are displayed.
@end deffn
+@c -----------------------------------------------------------------------------
+@anchor{display_matrix_padding_vertical}
+@deffn {Option variable} display_matrix_padding_vertical
+Default value: @code{true}
+
+When @code{display_matrix_padding_vertical} is @code{true},
+matrices are displayed with an empty line between successive rows.
+
+When @code{display_matrix_padding_vertical} is @code{false},
+matrices are not displayed with an empty line between successive rows;
+successive rows are immediately adjacent to each other.
+
+Examples:
+
+@c ===beg===
+@c display_matrix_padding_vertical;
+@c foo: matrix ([a, b, c], [d, e, f], [g, h, i]);
+@c display_matrix_padding_vertical: false;
+@c foo;
+@c ===end===
+@example maxima
+@group
+(%i1) display_matrix_padding_vertical;
+(%o1) true
+(%i2) foo: matrix ([a, b, c], [d, e, f], [g, h, i]);
+ ┌ ┐
+ │ a b c │
+ │ │
+(%o2) │ d e f │
+ │ │
+ │ g h i │
+ └ ┘
+@end group
+@group
+(%i3) display_matrix_padding_vertical: false;
+(%o3) false
+(%i4) foo;
+ ┌ ┐
+ │ a b c │
+(%o4) │ d e f │
+ │ g h i │
+ └ ┘
+@end group
+@end example
+
+@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})
@@ -1666,7 +1718,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.
+Option variables @mref{display_matrix_brackets} and @mref{display_matrix_padding_vertical}
+govern the display of matrices.
Examples:
diff --git a/src/displa.lisp b/src/displa.lisp
index 353f727f0..10b7bdf73 100644
--- a/src/displa.lisp
+++ b/src/displa.lisp
@@ -1201,6 +1201,7 @@
(displa-def %matrix dim-$matrix)
(defmvar $display_matrix_brackets t)
+(defmvar $display_matrix_padding_vertical t)
(defun dim-$matrix (form result)
(prog (dmstr rstr cstr consp cols)
@@ -1227,7 +1228,7 @@
(do ((c (cdar r) (cdr c))
(nc dmstr (cdr nc))
(cs cstr (cdr cs)) (dummy) (h2 0) (d2 0))
- ((null c) (setq d1 (+ d1 h1 h2) h1 (1+ d2)))
+ ((null c) (setq d1 (+ (if (or $display_matrix_padding_vertical (null rstr)) d1 (1- d1)) h1 h2) h1 (1+ d2)))
(setq dummy (dimension (car c) nil 'mparen 'mparen nil 0)
h2 (max h2 height) d2 (max d2 depth))
(cond ((not (checkfit (+ 14. width))) (setq consp t) (return nil))
@@ -1283,7 +1284,7 @@
(displa-def mbox dim-mbox-or-mlabox)
(displa-def %mbox dim-mbox-or-mlabox)
-(defun dim-mbox-or-mlabox (form result &aux dummy)
+(defun dim-mbox-or-mlabox (form result)
(if (= (length form) 3)
(dim-mlabox form result)
(dim-mbox form result)))
diff --git a/tests/test_matrix_display.mac b/tests/test_matrix_display.mac
index d20617023..87e9e6c6f 100644
--- a/tests/test_matrix_display.mac
+++ b/tests/test_matrix_display.mac
@@ -143,3 +143,15 @@ print (recip_abs_box_foo3) $
print (recip_abs_box_foo4) $
print (recip_abs_box_foo5) $
+display_matrix_padding_vertical: false;
+
+recip_abs_box_foo5;
+print (recip_abs_box_foo5);
+
+blurf: print (box (genmatrix (lambda ([i, j], x^i/sum (y[k], k, 1, j)), 8, 5)));
+
+display_matrix_brackets: true;
+
+print (blurf);
+
+reset ();
-----------------------------------------------------------------------
Summary of changes:
doc/info/Matrices.texi.m4 | 55 ++++++++++++++++++++++++++++++++++++++++++-
src/displa.lisp | 5 ++--
tests/test_matrix_display.mac | 12 ++++++++++
3 files changed, 69 insertions(+), 3 deletions(-)
hooks/post-receive
--
Maxima CAS
|