From b56b01ed217cf5e6f8c9a04d987cb278b3c06561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Tue, 31 Mar 2026 19:46:33 -0300 Subject: [PATCH 1/5] ecl: update to 26.3.27. --- common/shlibs | 2 +- srcpkgs/ecl/files/cross_config | 4 +++- srcpkgs/ecl/template | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/common/shlibs b/common/shlibs index b0cec4d73b7a4d..0d9dc2c5c46b38 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4241,7 +4241,7 @@ libcxsparse.so.4 SuiteSparse-6.0.1_1 libspqr.so.4 SuiteSparse-7.2.0_1 libsuitesparseconfig.so.7 SuiteSparse-7.0.1_1 libumfpack.so.6 SuiteSparse-6.0.1_1 -libecl.so.24.5 ecl-24.5.10_1 +libecl.so.26.3 ecl-26.3.27_1 libecm.so.1 ecm-7.0.4_3 libcliquer.so.1 cliquer-1.22_1 libomalloc-0.9.6.so singular-4.2.1_1 diff --git a/srcpkgs/ecl/files/cross_config b/srcpkgs/ecl/files/cross_config index 78b074c3c7c0e2..d490c2d0bbf7e6 100644 --- a/srcpkgs/ecl/files/cross_config +++ b/srcpkgs/ecl/files/cross_config @@ -13,10 +13,11 @@ ECL_STACK_DIR=down ### 1.2) Choose an integer datatype which is large enough to host a pointer if [ "$XBPS_TARGET_WORDSIZE" = "64" ]; then - CL_FIXNUM_TYPE="long long int" + CL_FIXNUM_TYPE=long CL_FIXNUM_BITS=64 CL_FIXNUM_MAX=2305843009213693951LL CL_FIXNUM_MIN=-2305843009213693952LL + CL_SHORT_BITS=16 CL_INT_BITS=32 CL_LONG_BITS=64 else @@ -24,6 +25,7 @@ else CL_FIXNUM_BITS=32 CL_FIXNUM_MAX=536870911L CL_FIXNUM_MIN=-536870912L + CL_SHORT_BITS=16 CL_INT_BITS=32 CL_LONG_BITS=32 fi diff --git a/srcpkgs/ecl/template b/srcpkgs/ecl/template index de21325cb01876..2fdcfdf8656c83 100644 --- a/srcpkgs/ecl/template +++ b/srcpkgs/ecl/template @@ -1,6 +1,6 @@ # Template file for 'ecl' pkgname=ecl -version=24.5.10 +version=26.3.27 revision=1 build_style=gnu-configure configure_args="--enable-gmp=system --enable-boehm=system @@ -14,7 +14,7 @@ license="LGPL-2.1-or-later" homepage="https://ecl.common-lisp.dev/" changelog="https://gitlab.com/embeddable-common-lisp/ecl/-/raw/develop/CHANGELOG" distfiles="https://ecl.common-lisp.dev/static/files/release/ecl-${version}.tgz" -checksum=e4ea65bb1861e0e495386bfa8bc673bd014e96d3cf9d91e9038f91435cbe622b +checksum=416d5707bf11d2b3d8d33d6791419a786e4cc59ac0cc3ec505ee59b51a9f5c9a if [ "$CROSS_BUILD" ]; then # Depend on system ecl From 3b3e5b89f798da5d52cf5e27b6e470990d2c8c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 13 Apr 2026 17:52:03 -0300 Subject: [PATCH 2/5] maxima: update to 5.49.0. --- srcpkgs/maxima/template | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/srcpkgs/maxima/template b/srcpkgs/maxima/template index 9259b48f50822b..6044cae7918eaa 100644 --- a/srcpkgs/maxima/template +++ b/srcpkgs/maxima/template @@ -1,10 +1,10 @@ # Template file for 'maxima' pkgname=maxima -version=5.47.0 -revision=4 +version=5.49.0 +revision=1 build_style=gnu-configure -configure_args="$(vopt_enable clisp) $(vopt_enable sbcl) $(vopt_enable ecl) - makeinfo_found=true" +configure_args="$(vopt_enable clisp) $(vopt_enable sbcl) $(vopt_enable ecl)" +hostmakedepends="texinfo" makedepends="$(vopt_if clisp clisp) $(vopt_if sbcl sbcl) $(vopt_if ecl ecl)" depends="$(vopt_if clisp clisp) rlwrap" checkdepends="gnuplot" @@ -14,7 +14,7 @@ license="GPL-2.0-only" homepage="http://maxima.sourceforge.net" changelog="https://sourceforge.net/p/maxima/code/ci/master/tree/changelogs/ChangeLog-${version%.*}.md?format=raw" distfiles="${SOURCEFORGE_SITE}/maxima/maxima-${version}.tar.gz" -checksum=9104021b24fd53e8c03a983509cb42e937a925e8c0c85c335d7709a14fd40f7a +checksum=6d401a4aa307cd3a5a9cadca4fa96c4ef0e24ff95a18bb6a8f803e3d2114adee nocross=yes # maxima-sbcl is nopie and should NOT be stripped or it won't work @@ -43,22 +43,6 @@ esac vopt_conflict clisp sbcl -pre_build() { - # do not rebuild these files if they exist - touch -c doc/info/*.html - touch -c doc/info/maxima.info* - touch -c doc/info/maxima_toc.html - touch -c doc/info/maxima-index.lisp - touch -c doc/info/maxima-index-html.lisp - touch -c interfaces/xmaxima/doc/xmaxima.info - touch -c interfaces/xmaxima/doc/xmaxima.html -} - -post_build() { - # this one needs to be done after building - touch -c interfaces/emacs/imaxima/imaxima.info -} - do_check() { if [ "$build_option_ecl" ]; then echo "maxima-ecl: check that maxima.fas works (#34273)" @@ -80,7 +64,7 @@ do_check() { timeout -v 30s ./maxima-local -q -l sbcl --batch-string=" showtime : true $ a : 10^(10^5) $ - b : a^1000 $ + b : a^600 $ " echo PASS fi From 4769eec239f59ef44cc6b31b79772042dd261866 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 13 Apr 2026 20:27:36 -0300 Subject: [PATCH 3/5] sagemath: patch for maxima 5.49.0 --- .../patches/40679-Update_to_maxima_5.49.patch | 615 ++++++++++++++++++ .../patches/fix-doctest-maxima-5.49.patch | 11 + srcpkgs/sagemath/patches/get_patches | 1 + srcpkgs/sagemath/template | 2 +- 4 files changed, 628 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/sagemath/patches/40679-Update_to_maxima_5.49.patch create mode 100644 srcpkgs/sagemath/patches/fix-doctest-maxima-5.49.patch diff --git a/srcpkgs/sagemath/patches/40679-Update_to_maxima_5.49.patch b/srcpkgs/sagemath/patches/40679-Update_to_maxima_5.49.patch new file mode 100644 index 00000000000000..cd7e96ee47c0ae --- /dev/null +++ b/srcpkgs/sagemath/patches/40679-Update_to_maxima_5.49.patch @@ -0,0 +1,615 @@ +diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py +index 270e3c49058..0f64e09e18b 100644 +--- a/src/sage/calculus/calculus.py ++++ b/src/sage/calculus/calculus.py +@@ -133,8 +133,8 @@ + [x^2 + x 2*x^3] + [ 2 x^2 + x] + sage: e^M +- [ 1/2*(e^(2*sqrt(x)) + 1)*e^(x - sqrt(x)) 1/2*(x*e^(2*sqrt(x)) - x)*sqrt(x)*e^(x - sqrt(x))] +- [ 1/2*(e^(2*sqrt(x)) - 1)*e^(x - sqrt(x))/x^(3/2) 1/2*(e^(2*sqrt(x)) + 1)*e^(x - sqrt(x))] ++ [ 1/2*(e^(2*sqrt(x)) + 1)*e^(x - sqrt(x)) 1/2*x^(3/2)*(e^(2*sqrt(x)) - 1)*e^(x - sqrt(x))] ++ [1/2*(e^(2*sqrt(x)) - 1)*e^(x - sqrt(x))/x^(3/2) 1/2*(e^(2*sqrt(x)) + 1)*e^(x - sqrt(x))] + + Complex exponentiation works, but may require a patched version of + maxima (:issue:`32898`) for now:: +@@ -1247,7 +1247,7 @@ def limit(ex, *args, dir=None, taylor=False, algorithm='maxima', **kwargs): + + sage: limit(sin(x)/x, x, 0, algorithm='sympy') + 1 +- sage: limit(sin(x)/x, x, 0, algorithm='giac') # needs sage.libs.giac ++ sage: limit(sin(x)/x, x, 0, algorithm='giac') # needs sage.libs.giac + 1 + sage: limit(x^x, x, 0, dir='+', algorithm='fricas') # optional - fricas + 1 +diff --git a/src/sage/calculus/test_sympy.py b/src/sage/calculus/test_sympy.py +index aa084799a10..e081e9674d9 100644 +--- a/src/sage/calculus/test_sympy.py ++++ b/src/sage/calculus/test_sympy.py +@@ -63,7 +63,7 @@ + sage: diff(tan(x), x) + tan(x)^2 + 1 + sage: limit((tan(x+y) - tan(x))/y, y=0) +- cos(x)^(-2) ++ tan(x)^2 + 1 + sage: diff(sin(2*x), x, 1) + 2*cos(2*x) + sage: diff(sin(2*x), x, 2) +diff --git a/src/sage/calculus/tests.py b/src/sage/calculus/tests.py +index 2879dda115d..abdbbad932e 100644 +--- a/src/sage/calculus/tests.py ++++ b/src/sage/calculus/tests.py +@@ -119,7 +119,7 @@ + sage: integrate(exp(1-x^2),x) + 1/2*sqrt(pi)*erf(x)*e + sage: integrate(sin(x^2),x) +- 1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) + (I + 1)*sqrt(2)*erf((-1)^(1/4)*x)) ++ 1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) - 2*sqrt(2)*imag_part(erf((-1)^(1/4)*x)) + 2*sqrt(2)*real_part(erf((-1)^(1/4)*x))) + + sage: integrate((1-x^2)^n,x) # long time + x*hypergeometric((1/2, -n), (3/2,), x^2*exp_polar(2*I*pi)) +diff --git a/src/sage/functions/bessel.py b/src/sage/functions/bessel.py +index db32eebe381..056bceaf49c 100644 +--- a/src/sage/functions/bessel.py ++++ b/src/sage/functions/bessel.py +@@ -1864,7 +1864,7 @@ class SphericalHankel1(BuiltinFunction): + sage: spherical_hankel1(3 + 0.2 * I, 3) + 0.201654587512037 - 0.531281544239273*I + sage: spherical_hankel1(1, x).simplify() +- -(x + I)*e^(I*x)/x^2 ++ -I*(-I*x + 1)*e^(I*x)/x^2 + sage: spherical_hankel1(3 + 2 * I, 5 - 0.2 * I) + 1.25375216869913 - 0.518011435921789*I + sage: integrate(spherical_hankel1(3, x), x) +@@ -1962,11 +1962,11 @@ class SphericalHankel2(BuiltinFunction): + sage: spherical_hankel2(3 + 0.2 * I, 3) + 0.0998874108557565 + 0.479149050937147*I + sage: spherical_hankel2(1, x).simplify() +- -(x - I)*e^(-I*x)/x^2 ++ I*(I*x + 1)*e^(-I*x)/x^2 + sage: spherical_hankel2(2,i).simplify() + -e + sage: spherical_hankel2(2,x).simplify() +- (-I*x^2 - 3*x + 3*I)*e^(-I*x)/x^3 ++ -I*(x^2 - 3*I*x - 3)*e^(-I*x)/x^3 + sage: spherical_hankel2(3 + 2*I, 5 - 0.2*I) + 0.0217627632692163 + 0.0224001906110906*I + sage: integrate(spherical_hankel2(3, x), x) +diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py +index 154a2cc34e0..1eebc46e03a 100644 +--- a/src/sage/interfaces/maxima.py ++++ b/src/sage/interfaces/maxima.py +@@ -194,7 +194,7 @@ + You can even nicely typeset the solution in latex:: + + sage: latex(s) +- \left[ \left[ a=-...{{\sqrt{79}\,i-11}\over{4}}... , b={{...\sqrt{79}\,i+9...}\over{4}} , c={{\sqrt{79}\,i+1}\over{10}} \right] , \left[ a={{...\sqrt{79}\,i+11}\over{4}} , b=-...{{\sqrt{79}\,i-9...}\over{4}}... , c=-...{{...\sqrt{79}\,i-1}\over{10}}... \right] \right] ++ \left[ \left[ a=-\left({{\sqrt{79}\,i-11}\over{4}}\right) , b={{\sqrt{79}\,i +9}\over{4}} , c={{\sqrt{79}\,i+1}\over{10}} \right] , \left[ a={{\sqrt{79} \,i+11}\over{4}} , b=-\left({{\sqrt{79}\,i-9}\over{4}}\right) , c=-\left({{ \sqrt{79}\,i-1}\over{10}}\right) \right] \right] + + To have the above appear onscreen via ``xdvi``, type + ``view(s)``. (TODO: For OS X should create pdf output +@@ -216,11 +216,11 @@ + :: + + sage: f = maxima('x^3 * %e^(k*x) * sin(w*x)'); f +- x^3*%e^(k*x)*sin(w*x) ++ %e^(k*x)*x^3*sin(w*x) + sage: f.diff('x') +- k*x^3*%e^(k*x)*sin(w*x)+3*x^2*%e^(k*x)*sin(w*x)+w*x^3*%e^(k*x) *cos(w*x) ++ %e^(k*x)*k*x^3*sin(w*x)+3*%e^(k*x)*x^2*sin(w*x)+%e^(k*x)*w*x^3 *cos(w*x) + sage: f.integrate('x') +- (((k*w^6+3*k^3*w^4+3*k^5*w^2+k^7)*x^3 +(3*w^6+3*k^2*w^4-3*k^4*w^2-3*k^6)*x^2+(...-...18*k*w^4)-12*k^3*w^2+6*k^5)*x-6*w^4 +36*k^2*w^2-6*k^4) *%e^(k*x)*sin(w*x) +((...-w^7...-3*k^2*w^5-3*k^4*w^3-k^6*w)*x^3...+(6*k*w^5+12*k^3*w^3+6*k^5*w)*x^2...+(6*w^5-12*k^2*w^3-18*k^4*w)*x-24*k*w^3 +24*k^3*w) *%e^(k*x)*cos(w*x)) /(w^8+4*k^2*w^6+6*k^4*w^4+4*k^6*w^2+k^8) ++ (((%e^(k*x)*k*w^6+3*%e^(k*x)*k^3*w^4+3*%e^(k*x)*k^5*w^2+%e^(k*x)*k^7)*x ^3 +(3*%e^(k*x)*w^6+3*%e^(k*x)*k^2*w^4-3*%e^(k*x)*k^4*w^2-3*%e^(k*x)*k^6)*x^2 +(-(18*%e^(k*x)*k*w^4)-12*%e^(k*x)*k^3*w^2+6*%e^(k*x)*k^5)*x-6*%e^(k*x)*w^4 +36*%e^(k*x)*k^2*w^2-6*%e^(k*x)*k^4) *sin(w*x) +((-(%e^(k*x)*w^7)-3*%e^(k*x)*k^2*w^5-3*%e^(k*x)*k^4*w^3-%e^(k*x)*k^6*w)*x^3 +(6*%e^(k*x)*k*w^5+12*%e^(k*x)*k^3*w^3+6*%e^(k*x)*k^5*w)*x^2 +(6*%e^(k*x)*w^5-12*%e^(k*x)*k^2*w^3-18*%e^(k*x)*k^4*w)*x-24*%e^(k*x)*k*w^3 +24*%e^(k*x)*k^3*w) *cos(w*x)) /(w^8+4*k^2*w^6+6*k^4*w^4+4*k^6*w^2+k^8) + + :: + +@@ -291,13 +291,14 @@ + + sage: _ = maxima.eval("f(t) := t^5*exp(t)*sin(t)") + sage: maxima("laplace(f(t),t,s)") +- (360*(2*s-2))/(s^2-2*s+2)^4-(480*(2*s-2)^3)/(s^2-2*s+2)^5 +(120*(2*s-2)^5)/(s^2-2*s+2)^6 ++ (720*s^5-3600*s^4+4800*s^3-2880*s+960) /(s^12-12*s^11+72*s^10-280*s^9+780*s^8-1632*s^7+2624*s^6-3264*s^5+3120*s^4 -2240*s^3+1152*s^2-384*s+64) + sage: print(maxima("laplace(f(t),t,s)")) +- 3 5 +- 360 (2 s - 2) 480 (2 s - 2) 120 (2 s - 2) +- --------------- - --------------- + --------------- +- 2 4 2 5 2 6 +- (s - 2 s + 2) (s - 2 s + 2) (s - 2 s + 2) ++ 5 4 3 ++ (720 s - 3600 s + 4800 s - 2880 s + 960) ++ 12 11 10 9 8 7 6 5 ++ /(s - 12 s + 72 s - 280 s + 780 s - 1632 s + 2624 s - 3264 s ++ 4 3 2 ++ + 3120 s - 2240 s + 1152 s - 384 s + 64) + + :: + +@@ -363,11 +364,11 @@ + + sage: S = maxima('nusum(exp(1+2*i/n),i,1,n)') + sage: print(S) +- 2/n + 3 2/n + 1 +- %e %e +- ----------------------- - ----------------------- +- 1/n 1/n 1/n 1/n +- (%e - 1) (%e + 1) (%e - 1) (%e + 1) ++ 2/n + 3 2/n + 1 ++ %e %e ++ ─────────────────────── - ─────────────────────── ++ 1/n 1/n 1/n 1/n ++ (%e - 1) (%e + 1) (%e - 1) (%e + 1) + + We formally compute the limit as `n\to\infty` of + `2S/n` as follows:: +@@ -418,7 +419,7 @@ + sage: from sage.interfaces.maxima import maxima + sage: g = maxima('exp(3*%i*x)/(6*%i) + exp(%i*x)/(2*%i) + c') + sage: latex(g) +- -...{{i\,e^{3\,i\,x}}\over{6}}...-{{i\,e^{i\,x}}\over{2}}+c ++ c-{{e^{3\,i\,x}\,i}\over{6}}-{{e^{i\,x}\,i}\over{2}} + + Long Input + ---------- +diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py +index 5866b955bb0..e7c1da2a277 100644 +--- a/src/sage/interfaces/maxima_abstract.py ++++ b/src/sage/interfaces/maxima_abstract.py +@@ -866,11 +866,11 @@ def de_solve(self, de, vars, ics=None): + sage: maxima.de_solve('diff(y,x,2) + 3*x = y', ['x','y'], [1,1,1]) + y = 3*x-2*%e^(x-1) + sage: maxima.de_solve('diff(y,x,2) + 3*x = y', ['x','y']) +- y = %k1*%e^x+%k2*%e^-x+3*x ++ y = 3*x+%e^-x*%k2+%e^x*%k1 + sage: maxima.de_solve('diff(y,x) + 3*x = y', ['x','y']) +- y = (%c-3*(...-x...-1)*%e^-x)*%e^x ++ y = %e^x*(%c-3*%e^-x*(-x-1)) + sage: maxima.de_solve('diff(y,x) + 3*x = y', ['x','y'],[1,1]) +- y = -...%e^-1*(5*%e^x-3*%e*x-3*%e)... ++ y = %e^-1*(3*%e*x-5*%e^x+3*%e) + """ + if not isinstance(vars, str): + str_vars = '%s, %s' % (vars[1], vars[0]) +@@ -910,20 +910,20 @@ def de_solve_laplace(self, de, vars, ics=None): + sage: from sage.interfaces.maxima_lib import maxima + sage: maxima.clear('x'); maxima.clear('f') + sage: maxima.de_solve_laplace("diff(f(x),x,2) = 2*diff(f(x),x)-f(x)", ["x","f"], [0,1,2]) +- f(x) = x*%e^x+%e^x ++ f(x) = %e^x*x+%e^x + + :: + + sage: maxima.clear('x'); maxima.clear('f') + sage: f = maxima.de_solve_laplace("diff(f(x),x,2) = 2*diff(f(x),x)-f(x)", ["x","f"]) + sage: f +- f(x) = x*%e^x*('at('diff(f(x),x,1),x = 0))-f(0)*x*%e^x+f(0)*%e^x ++ f(x) = %e^x*x*('at('diff(f(x),x,1),x = 0))-%e^x*f(0)*x+%e^x*f(0) + sage: print(f) +- ! +- x d ! x x +- f(x) = x %e (-- (f(x))! ) - f(0) x %e + f(0) %e +- dx ! +- !x = 0 ++ │ ++ x d │ x x ++ f(x) = %e x (── (f(x))│ ) - %e f(0) x + %e f(0) ++ dx │ ++ │x = 0 + + .. NOTE:: + +@@ -1136,10 +1136,10 @@ def __str__(self): + sage: f = maxima('1/(x-1)^3'); f + 1/(x-1)^3 + sage: print(f) +- 1 +- -------- +- 3 +- (x - 1) ++ 1 ++ ──────── ++ 3 ++ (x - 1) + """ + return self.display2d(onscreen=False) + +@@ -1798,9 +1798,9 @@ def _latex_(self): + sage: y,d = var('y,d') + sage: f = function('f') + sage: latex(maxima(derivative(f(x*y), x))) +- \left(\left.{{{\it \partial}}\over{{\it \partial}\, {\it \_symbol}_{0}}}\,f\left( {\it \_symbol}_{0}\right)\right|_{ {\it \_symbol}_{0}={\it x}\, {\it y}}\right)\,{\it y} ++ \left(\left.{{{\it \partial}}\over{{\it \partial}\, {\it \_symbol}_{0}}}\,f\left({\it \_symbol}_{0} \right)\right|_{{\it \_symbol}_{0}={\it x}\, {\it y}}\right)\,{\it y} + sage: latex(maxima(derivative(f(x,y,d), d,x,x,y))) +- {{{\it \partial}^4}\over{{\it \partial}\,{\it d}\, {\it \partial}\,{\it x}^2\,{\it \partial}\, {\it y}}}\,f\left({\it x} , {\it y} , {\it d}\right) ++ {{{\it \partial}^4}\over{{\it \partial}\,{\it d}\, {\it \partial}\,{\it x}^2\,{\it \partial}\,{\it y} }}\,f\left({\it x} , {\it y} , {\it d} \right) + sage: latex(maxima(d/(d-2))) + {{{\it d}}\over{{\it d}-2}} + """ +@@ -1929,9 +1929,9 @@ def partial_fraction_decomposition(self, var='x'): + sage: f.partial_fraction_decomposition('x') + 1/(2*(x-1))-1/(2*(x+1)) + sage: print(f.partial_fraction_decomposition('x')) +- 1 1 +- --------- - --------- +- 2 (x - 1) 2 (x + 1) ++ 1 1 ++ ───────── - ───────── ++ 2 (x - 1) 2 (x + 1) + """ + return self.partfrac(var) + +diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py +index 637ef29a6f2..fff2a6ee39c 100644 +--- a/src/sage/interfaces/maxima_lib.py ++++ b/src/sage/interfaces/maxima_lib.py +@@ -164,7 +164,7 @@ + ecl_eval("(setq $nolabels t))") + ecl_eval("(defun add-lineinfo (x) x)") + ecl_eval(r"(defun tex-derivative (x l r) (tex (if $derivabbrev (tex-dabbrev x) (tex-d x '\\partial)) l r lop rop ))") +-ecl_eval('(defun principal nil (cond ($noprincipal (diverg)) ((not pcprntd) (merror "Divergent Integral"))))') ++ecl_eval('(defun principal nil (cond ($noprincipal (diverg)) ((not *pcprntd*) (merror "Divergent Integral"))))') + ecl_eval("(remprop 'mfactorial 'grind)") # don't use ! for factorials (#11539) + ecl_eval("(setf $errormsg nil)") + +@@ -1224,6 +1224,8 @@ def reduce_load_MaximaLib(): + sage.functions.error.erf: "%ERF", + sage.functions.gamma.gamma_inc: "%GAMMA_INCOMPLETE", + sage.functions.other.conjugate: "$CONJUGATE", ++ sage.functions.other.imag_part: "%IMAGPART", ++ sage.functions.other.real_part: "%REALPART", + } + # we compile the dictionary + sage_op_dict = {k: EclObject(sage_op_dict[k]) for k in sage_op_dict} +diff --git a/src/sage/manifolds/chart.py b/src/sage/manifolds/chart.py +index 7232f0c4ddb..1240fe5ad83 100644 +--- a/src/sage/manifolds/chart.py ++++ b/src/sage/manifolds/chart.py +@@ -3761,7 +3761,7 @@ def set_inverse(self, *transformations, **kwds): + sage: spher_to_cart.set_inverse(sqrt(x^2+y^2), atan2(y,x)) + Check of the inverse coordinate transformation: + r == r *passed* +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + x == x *passed* + y == y *passed* + NB: a failed report can reflect a mere lack of simplification. +@@ -3798,8 +3798,8 @@ def set_inverse(self, *transformations, **kwds): + + sage: spher_to_cart.set_inverse(sqrt(x^3+y^2), atan2(y,x)) + Check of the inverse coordinate transformation: +- r == sqrt(r*cos(ph)^3 + sin(ph)^2)*r **failed** +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ r == r*sqrt(abs(r*cos(ph)^3 + sin(ph)^2)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + x == sqrt(x^3 + y^2)*x/sqrt(x^2 + y^2) **failed** + y == sqrt(x^3 + y^2)*y/sqrt(x^2 + y^2) **failed** + NB: a failed report can reflect a mere lack of simplification. +diff --git a/src/sage/manifolds/continuous_map.py b/src/sage/manifolds/continuous_map.py +index e673f0ced6d..bd9db2f3e2b 100644 +--- a/src/sage/manifolds/continuous_map.py ++++ b/src/sage/manifolds/continuous_map.py +@@ -1578,7 +1578,7 @@ def expr(self, chart1=None, chart2=None): + sage: ch_spher_cart.set_inverse(sqrt(x^2+y^2), atan2(y,x)) + Check of the inverse coordinate transformation: + r == r *passed* +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + x == x *passed* + y == y *passed* + NB: a failed report can reflect a mere lack of simplification. +@@ -1627,7 +1627,7 @@ def set_expr(self, chart1, chart2, coord_functions): + x == x *passed* + y == y *passed* + r == r *passed* +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + NB: a failed report can reflect a mere lack of simplification. + sage: rot = U.continuous_map(U, ((x - sqrt(3)*y)/2, (sqrt(3)*x + y)/2), + ....: name='R') +@@ -1681,7 +1681,7 @@ def set_expr(self, chart1, chart2, coord_functions): + x == x *passed* + y == y *passed* + r == r *passed* +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + NB: a failed report can reflect a mere lack of simplification. + sage: rot = U.continuous_map(U, ((x - sqrt(3)*y)/2, (sqrt(3)*x + y)/2), + ....: name='R') +@@ -1770,7 +1770,7 @@ def add_expr(self, chart1, chart2, coord_functions): + x == x *passed* + y == y *passed* + r == r *passed* +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + NB: a failed report can reflect a mere lack of simplification. + sage: rot = U.continuous_map(U, ((x - sqrt(3)*y)/2, (sqrt(3)*x + y)/2), + ....: name='R') +@@ -1784,7 +1784,7 @@ def add_expr(self, chart1, chart2, coord_functions): + + sage: rot.display(c_spher, c_spher) + R: U → U +- (r, ph) ↦ (r, arctan2(1/2*(sqrt(3)*cos(ph) + sin(ph))*r, -1/2*(sqrt(3)*sin(ph) - cos(ph))*r)) ++ (r, ph) ↦ (r, arctan2(1/2*sqrt(3)*cos(ph) + 1/2*sin(ph), -1/2*sqrt(3)*sin(ph) + 1/2*cos(ph))) + + Therefore, we use the method :meth:`add_expr` to set the + spherical-coordinate expression by hand:: +diff --git a/src/sage/manifolds/differentiable/automorphismfield_group.py b/src/sage/manifolds/differentiable/automorphismfield_group.py +index 45a2fad087a..11a548a0317 100644 +--- a/src/sage/manifolds/differentiable/automorphismfield_group.py ++++ b/src/sage/manifolds/differentiable/automorphismfield_group.py +@@ -535,8 +535,7 @@ class AutomorphismFieldParalGroup(FreeModuleLinearGroup): + Field of tangent-space automorphisms t^(-1) on the 2-dimensional + differentiable manifold M + sage: (t1^(-1)).display() +- t^(-1) = 1/(e^y + 1) ∂/∂x⊗dx - x*y/(x^2 + (x^2 + 1)*e^y + 1) ∂/∂x⊗dy +- + 1/(x^2 + 1) ∂/∂y⊗dy ++ t^(-1) = 1/(e^y + 1) ∂/∂x⊗dx - x*y/(x^2*(e^y + 1) + e^y + 1) ∂/∂x⊗dy + 1/(x^2 + 1) ∂/∂y⊗dy + + Since any automorphism field can be considered as a tensor field of + type-`(1,1)` on ``M``, there is a coercion map from ``G`` to the +diff --git a/src/sage/manifolds/differentiable/curve.py b/src/sage/manifolds/differentiable/curve.py +index 8a1cfc2e77e..9c1d518acc3 100644 +--- a/src/sage/manifolds/differentiable/curve.py ++++ b/src/sage/manifolds/differentiable/curve.py +@@ -466,7 +466,7 @@ def coord_expr(self, chart=None): + x == x *passed* + y == y *passed* + r == r *passed* +- ph == arctan2(r*sin(ph), r*cos(ph)) **failed** ++ ph == -2*pi*ceil(-1/2*(pi - ph)/pi) + ph **failed** + NB: a failed report can reflect a mere lack of simplification. + sage: R. = manifolds.RealLine() + sage: c = U.curve({c_spher: (1,t)}, (t, 0, 2*pi), name='c') +diff --git a/src/sage/manifolds/differentiable/metric.py b/src/sage/manifolds/differentiable/metric.py +index 01b48ef9724..43758ba7e73 100644 +--- a/src/sage/manifolds/differentiable/metric.py ++++ b/src/sage/manifolds/differentiable/metric.py +@@ -1556,9 +1556,9 @@ def sqrt_abs_det(self, frame=None): + [ 1/8*u^2 - 1/8*v^2 + 1/4*v + 1/2 1/4*u] + [ 1/4*u -1/8*u^2 + 1/8*v^2 + 1/4*v + 1/2] + sage: g.sqrt_abs_det(Y.frame()).expr() +- 1/2*sqrt(-x^2*y^2 - (x + 1)*y + x + 1) ++ 1/2*sqrt(abs(x^2*y^2 + (x + 1)*y - x - 1)) + sage: g.sqrt_abs_det(Y.frame()).expr(Y) +- 1/8*sqrt(-u^4 - v^4 + 2*(u^2 + 2)*v^2 - 4*u^2 + 16*v + 16) ++ 1/8*sqrt(abs(u^4 + v^4 - 2*(u^2 + 2)*v^2 + 4*u^2 - 16*v - 16)) + + A chart can be passed instead of a frame:: + +@@ -1578,9 +1578,9 @@ def sqrt_abs_det(self, frame=None): + sage: g.sqrt_abs_det().expr() + sqrt(-x**2*y**2 - x*y + x - y + 1) + sage: g.sqrt_abs_det(Y.frame()).expr() +- sqrt(-x**2*y**2 - x*y + x - y + 1)/2 ++ sqrt(Abs(x**2*y**2 + x*y - x + y - 1))/2 + sage: g.sqrt_abs_det(Y.frame()).expr(Y) +- sqrt(-u**4 + 2*u**2*v**2 - 4*u**2 - v**4 + 4*v**2 + 16*v + 16)/8 ++ sqrt(Abs(-u**4 + 2*u**2*v**2 - 4*u**2 - v**4 + 4*v**2 + 16*v + 16))/8 + """ + dom = self._domain + if frame is None: +diff --git a/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py b/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +index 57dc1c99862..e7c7aaebeea 100644 +--- a/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py ++++ b/src/sage/manifolds/differentiable/pseudo_riemannian_submanifold.py +@@ -819,8 +819,7 @@ def normal(self): + ....: atan2(-y,-x)+pi) + Check of the inverse coordinate transformation: + the == 2*arctan(sqrt(-cos(the) + 1)/sqrt(cos(the) + 1)) **failed** +- phi == pi + arctan2(sin(phi)*sin(the)/(cos(the) - 1), +- cos(phi)*sin(the)/(cos(the) - 1)) **failed** ++ phi == pi + arctan2(cos(the)*sin(phi) - sin(phi), cos(phi)*cos(the) - cos(phi)) **failed** + x == x *passed* + y == y *passed* + NB: a failed report can reflect a mere lack of simplification. +diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py +index b1eed3b8b2e..57b35bef6cc 100644 +--- a/src/sage/manifolds/utilities.py ++++ b/src/sage/manifolds/utilities.py +@@ -225,10 +225,10 @@ class SimplifyAbsTrig(ExpressionTreeWalker): + sage: a = abs(cos(x)) + abs(sin(x)) + + The method :meth:`~sage.symbolic.expression.Expression.simplify_full()` +- is ineffective on such an expression:: ++ works on such an expression:: + + sage: a.simplify_full() +- abs(cos(x)) + abs(sin(x)) ++ -cos(x) + sin(x) + + We construct a :class:`SimplifyAbsTrig` object ``s`` from the symbolic + expression ``a``:: +@@ -436,9 +436,9 @@ def simplify_abs_trig(expr): + + sage: s = abs(sin(x)) + abs(sin(y)) + abs(sin(3*z)) + sage: s.simplify_trig() +- abs(4*cos(-z)^2 - 1)*abs(sin(-z)) + abs(sin(x)) + abs(sin(y)) ++ -4*sin(-z)^3 + abs(sin(x)) + sin(y) + 3*sin(-z) + sage: s.simplify_full() +- abs(4*cos(-z)^2 - 1)*abs(sin(-z)) + abs(sin(x)) + abs(sin(y)) ++ -4*sin(-z)^3 + abs(sin(x)) + sin(y) + 3*sin(-z) + + despite the following assumptions hold:: + +@@ -571,10 +571,10 @@ def simplify_chain_real(expr): + sage: s = abs(sin(pi*x)) + sage: simplify_chain_real(s) # correct output since x in (0,1) + sin(pi*x) +- sage: s.simplify_real() # unsimplified output +- abs(sin(pi*x)) +- sage: s.simplify_full() # unsimplified output +- abs(sin(pi*x)) ++ sage: s.simplify_real() # simplified output with maxima>=5.48 ++ sin(pi*x) ++ sage: s.simplify_full() # simplified output with maxima>=5.48 ++ sin(pi*x) + + :: + +diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx +index 7ff5a3a95bc..6c057a23bbe 100644 +--- a/src/sage/matrix/matrix2.pyx ++++ b/src/sage/matrix/matrix2.pyx +@@ -16669,8 +16669,8 @@ cdef class Matrix(Matrix1): + sage: # needs sage.symbolic + sage: a = matrix([[1,2], [3,4]]) + sage: a.exp() +- [-1/22*((sqrt(33) - 11)*e^sqrt(33) - sqrt(33) - 11)*e^(-1/2*sqrt(33) + 5/2) 2/33*(sqrt(33)*e^sqrt(33) - sqrt(33))*e^(-1/2*sqrt(33) + 5/2)] +- [ 1/11*(sqrt(33)*e^sqrt(33) - sqrt(33))*e^(-1/2*sqrt(33) + 5/2) 1/22*((sqrt(33) + 11)*e^sqrt(33) - sqrt(33) + 11)*e^(-1/2*sqrt(33) + 5/2)] ++ [ 1/22*((sqrt(33) + 11)*e^2 - (sqrt(33) - 11)*e^(sqrt(33) + 2))*e^(-1/2*sqrt(33) + 1/2) -2/33*(sqrt(33)*e^2 - sqrt(33)*e^(sqrt(33) + 2))*e^(-1/2*sqrt(33) + 1/2)] ++ [ -1/11*(sqrt(33)*e^2 - sqrt(33)*e^(sqrt(33) + 2))*e^(-1/2*sqrt(33) + 1/2) -1/22*((sqrt(33) - 11)*e^2 - (sqrt(33) + 11)*e^(sqrt(33) + 2))*e^(-1/2*sqrt(33) + 1/2)] + + sage: type(a.exp()) # needs sage.symbolic + +diff --git a/src/sage/misc/functional.py b/src/sage/misc/functional.py +index 65a35b45a53..74ecc2198a6 100644 +--- a/src/sage/misc/functional.py ++++ b/src/sage/misc/functional.py +@@ -721,9 +721,7 @@ def integral(x, *args, **kwds): + real + sage: f = exp(-x) * sinh(sqrt(x)) + sage: t = integrate(f, x, 0, Infinity); t # long time +- 1/4*sqrt(pi)*(erf(1) - 1)*e^(1/4) +- - 1/4*(sqrt(pi)*(erf(1) - 1) - sqrt(pi) + 2*e^(-1) - 2)*e^(1/4) +- + 1/4*sqrt(pi)*e^(1/4) - 1/2*e^(1/4) + 1/2*e^(-3/4) ++ 1/2*sqrt(pi)*e^(1/4) + sage: t.canonicalize_radical() # long time + 1/2*sqrt(pi)*e^(1/4) + sage: sage.calculus.calculus.maxima('domain: complex') +@@ -932,7 +930,7 @@ def krull_dimension(x): + 0 + sage: ZZ.krull_dimension() + 1 +- sage: ZZ[sqrt(5)].krull_dimension() # needs sage.rings.number_field sage.symbolic ++ sage: ZZ[sqrt(5)].krull_dimension() # needs sage.rings.number_field sage.symbolic + 1 + sage: U. = PolynomialRing(ZZ, 3); U + Multivariate Polynomial Ring in x, y, z over Integer Ring +diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx +index 691acf2c947..07b191522c9 100644 +--- a/src/sage/symbolic/expression.pyx ++++ b/src/sage/symbolic/expression.pyx +@@ -13019,21 +13019,21 @@ cdef class Expression(Expression_abc): + Check that the sum in :issue:`10682` is done right:: + + sage: sum(binomial(n,k)*k^2, k, 2, n) +- 1/4*(n^2 + n)*2^n - n ++ 1/4*2^n*n^2 + 1/4*(2^n - 4)*n + + This sum used to give a wrong result (:issue:`9635`) but + now gives correct results with all relevant assumptions:: + + sage: (n,k,j)=var('n,k,j') + sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) +- -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) ++ -sum((-1)^(-j + k)*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) + sage: assume(j>-1) + sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) + 1 + sage: forget() + sage: assume(n>=j) + sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) +- -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) ++ -sum((-1)^(-j + k)*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) + sage: forget() + sage: assume(j==-1) + sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) +@@ -13041,7 +13041,7 @@ cdef class Expression(Expression_abc): + sage: forget() + sage: assume(j<-1) + sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) +- -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) ++ -sum((-1)^(-j + k)*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) + sage: forget() + + Check that :issue:`16176` is fixed:: +diff --git a/src/sage/symbolic/integration/external.py b/src/sage/symbolic/integration/external.py +index c99676c0b88..105e8e3bbbd 100644 +--- a/src/sage/symbolic/integration/external.py ++++ b/src/sage/symbolic/integration/external.py +@@ -31,12 +31,7 @@ def maxima_integrator(expression, v, a=None, b=None): + Check that :issue:`25817` is fixed:: + + sage: maxima_integrator(log(e^x*log(x)*sin(x))/x^2, x) +- 1/2*(x*(Ei(-log(x)) + conjugate(Ei(-log(x)))) +- - 2*x*integrate(sin(x)/(x*cos(x)^2 + x*sin(x)^2 +- + 2*x*cos(x) + x), x) + 2*x*integrate(sin(x)/(x*cos(x)^2 +- + x*sin(x)^2 - 2*x*cos(x) + x), x) + 2*x*log(x) + 2*log(2) +- - log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) - log(cos(x)^2 +- + sin(x)^2 - 2*cos(x) + 1) - 2*log(log(x)))/x ++ -1/2*(2*x*integrate(sin(x)/(x*cos(x)^2 + x*sin(x)^2 + 2*x*cos(x) + x), x) - 2*x*integrate(sin(x)/(x*cos(x)^2 + x*sin(x)^2 - 2*x*cos(x) + x), x) - 2*x*log(x) - 2*x*real_part(Ei(-log(x))) - 2*log(2) + log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) + 2*log(log(x)))/x + """ + from sage.calculus.calculus import maxima + if not isinstance(expression, Expression): +diff --git a/src/sage/symbolic/integration/integral.py b/src/sage/symbolic/integration/integral.py +index b3d1dd1c2bf..1002343e884 100644 +--- a/src/sage/symbolic/integration/integral.py ++++ b/src/sage/symbolic/integration/integral.py +@@ -614,10 +614,7 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False): + x y + Sqrt[--] FresnelS[Sqrt[--] x] + 2 Pi + sage: print(f.integral(x)) +- x*y^z + 1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) +- + (I - 1)*sqrt(2)*erf((1/2*I - 1/2)*sqrt(2)*x) +- - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) +- + (I + 1)*sqrt(2)*erf((-1)^(1/4)*x)) ++ x*y^z + 1/16*sqrt(pi)*((I + 1)*sqrt(2)*erf((1/2*I + 1/2)*sqrt(2)*x) - (I - 1)*sqrt(2)*erf(sqrt(-I)*x) - 2*sqrt(2)*imag_part(erf((-1)^(1/4)*x)) + 2*sqrt(2)*real_part(erf((-1)^(1/4)*x))) + + Alternatively, just use algorithm='mathematica_free' to integrate via Mathematica + over the internet (does NOT require a Mathematica license!):: +@@ -1011,8 +1008,8 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False): + sage: f = log(sin(x))*sin(x)^2 + sage: g = integrate(f, x) ; g + 1/4*I*x^2 ++ - 1/2*I*x*arctan2(-sin(x), -cos(x) + 1) + - 1/2*I*x*arctan2(sin(x), cos(x) + 1) +- + 1/2*I*x*arctan2(sin(x), -cos(x) + 1) + - 1/4*x*log(cos(x)^2 + sin(x)^2 + 2*cos(x) + 1) + - 1/4*x*log(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1) + + 1/4*(2*x - sin(2*x))*log(sin(x)) +@@ -1036,7 +1033,7 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False): + sage: assume(a > 0) + sage: assume(a < 1) + sage: integrate(x*log(1/(a*x+(1-x)^2)), x, 0, 1, algorithm='maxima') +- 1/4*a^2*log(a) + 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)*(a - 2)/(a^2 - 4*a)) - 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)/(a - 4)) - a*log(a) - sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)*(a - 2)/(a^2 - 4*a)) + sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)/(a - 4)) - 1/2*a + 3/2 ++ 1/4*a^2*log(a) - 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)/(a - 4)) + 1/2*sqrt(-a^2 + 4*a)*a*arctan(sqrt(-a^2 + 4*a)*(a - 2)/((a - 4)*a)) - a*log(a) + sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)/(a - 4)) - sqrt(-a^2 + 4*a)*arctan(sqrt(-a^2 + 4*a)*(a - 2)/((a - 4)*a)) - 1/2*a + 3/2 + + Check that :issue:`25905` is fixed:: + +diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py +index 8fada2b4e9b..02cfc43f282 100644 +--- a/src/sage/symbolic/relation.py ++++ b/src/sage/symbolic/relation.py +@@ -1338,20 +1338,6 @@ def _solve_expression(f, x, explicit_solutions, multiplicities, + sage: (x^2>1).solve(x) + [[x < -1], [x > 1]] + +- Catch error message from Maxima:: +- +- sage: solve(acot(x),x) +- Traceback (most recent call last): +- ... +- TypeError: ECL says: cot: argument 0 isn't in the domain of cot. +- +- :: +- +- sage: solve(acot(x),x,to_poly_solve=True) +- Traceback (most recent call last): +- ... +- TypeError: ECL says: cot: argument 0 isn't in the domain of cot. +- + :issue:`7491` fixed:: + + sage: y = var('y') +diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py +index b5531b112b4..15f74fe5779 100644 +--- a/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py ++++ b/src/sage/tests/books/computational-mathematics-with-sagemath/calculus_doctest.py +@@ -256,7 +256,7 @@ + Sage example in ./calculus.tex, line 1086:: + + sage: solve(x^(1/x)==(1/x)^x, x) +- [(1/x)^x == x^(1/x)] ++ [x^(1/x) == (1/x)^x] + + Sage example in ./calculus.tex, line 1124:: + diff --git a/srcpkgs/sagemath/patches/fix-doctest-maxima-5.49.patch b/srcpkgs/sagemath/patches/fix-doctest-maxima-5.49.patch new file mode 100644 index 00000000000000..393bb5a79b0bc5 --- /dev/null +++ b/srcpkgs/sagemath/patches/fix-doctest-maxima-5.49.patch @@ -0,0 +1,11 @@ +--- a/src/sage/calculus/calculus.py ++++ b/src/sage/calculus/calculus.py +@@ -1824,7 +1824,7 @@ def laplace(ex, t, s, algorithm='maxima'): + sage: f = exp (2*t + a) * sin(t) * t; f + t*e^(a + 2*t)*sin(t) + sage: L = laplace(f, t, s); L +- 2*(s - 2)*e^a/(s^2 - 4*s + 5)^2 ++ 2*(s - 2)*e^a/(s^4 - 8*s^3 + 26*s^2 - 40*s + 25) + sage: inverse_laplace(L, s, t) + t*e^(a + 2*t)*sin(t) + diff --git a/srcpkgs/sagemath/patches/get_patches b/srcpkgs/sagemath/patches/get_patches index d0093639f7d867..e7f3d188f71eb2 100755 --- a/srcpkgs/sagemath/patches/get_patches +++ b/srcpkgs/sagemath/patches/get_patches @@ -40,3 +40,4 @@ get_pr 41346 "Fix execution_count for newer ipython version" get_pr 41394 "Fix doctest failure with python 3.14" get_pr 41433 "Fix test failures with scipy 1.17" get_pr 41469 "Prevent leaking file descriptors" +get_pr 40679 "Update to maxima 5.49" diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template index 3f27587fc5c170..87f906d87e1a26 100644 --- a/srcpkgs/sagemath/template +++ b/srcpkgs/sagemath/template @@ -1,7 +1,7 @@ # Template file for 'sagemath' pkgname=sagemath version=10.8 -revision=1 +revision=2 _pypi_version=${version/.beta/b} _pypi_version=${_pypi_version/.rc/rc} build_style=python3-pep517 From b27f6b05f744dde294666b2abd4cd09ceb271aa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 13 Apr 2026 16:34:41 -0300 Subject: [PATCH 4/5] sagemath: fix doctest for ipython 9.12 --- .../sagemath/patches/fix-doctest-ipython-9.12.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 srcpkgs/sagemath/patches/fix-doctest-ipython-9.12.patch diff --git a/srcpkgs/sagemath/patches/fix-doctest-ipython-9.12.patch b/srcpkgs/sagemath/patches/fix-doctest-ipython-9.12.patch new file mode 100644 index 00000000000000..000e50345e7ed3 --- /dev/null +++ b/srcpkgs/sagemath/patches/fix-doctest-ipython-9.12.patch @@ -0,0 +1,12 @@ +diff --git a/src/sage/doctest/test.py b/src/sage/doctest/test.py +index 8e7ecac8bbe..7831de313cc 100644 +--- a/src/sage/doctest/test.py ++++ b/src/sage/doctest/test.py +@@ -469,6 +469,7 @@ Test the ``--debug`` option:: + s...: b = 5 + s...: a + b + 8 ++ ... + sage: + + Returning to doctests... From e01bc6272a75fe2739ca257ab67daf5c63c19ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 13 Apr 2026 21:02:40 -0300 Subject: [PATCH 5/5] sagemath: fix cypari2 warning --- .../patches/fix-cypari2-warning.patch | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 srcpkgs/sagemath/patches/fix-cypari2-warning.patch diff --git a/srcpkgs/sagemath/patches/fix-cypari2-warning.patch b/srcpkgs/sagemath/patches/fix-cypari2-warning.patch new file mode 100644 index 00000000000000..5d4b06dab691e3 --- /dev/null +++ b/srcpkgs/sagemath/patches/fix-cypari2-warning.patch @@ -0,0 +1,30 @@ +diff --git a/src/sage/rings/factorint_pari.pyx b/src/sage/rings/factorint_pari.pyx +index 1774cbf0886..be0a500c2b6 100644 +--- a/src/sage/rings/factorint_pari.pyx ++++ b/src/sage/rings/factorint_pari.pyx +@@ -53,8 +53,6 @@ def factor_using_pari(n, int_=False, debug_level=0, proof=None): + sage: from sage.doctest.util import ensure_interruptible_after + sage: with ensure_interruptible_after(0.5): factor(2^1000 - 1, verbose=5) + ... +- doctest:warning... +- RuntimeWarning: cypari2 leaked ... bytes on the PARI stack + sage: pari.get_debug_level() + 0 + """ +diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx +index 358aac0339c..dc4dcc4866e 100644 +--- a/src/sage/rings/integer.pyx ++++ b/src/sage/rings/integer.pyx +@@ -7305,10 +7305,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): + check for reliable interrupting, see :issue:`18919`:: + + sage: from cysignals import AlarmInterrupt ++ sage: from warnings import filterwarnings ++ sage: filterwarnings("ignore", r"cypari2 leaked \d+ bytes on the PARI stack") + sage: for i in [1..10]: # long time (5s) # needs sage.libs.pari + ....: with ensure_interruptible_after(i/11): + ....: (2^100).binomial(2^22, algorithm='pari') +- doctest:...: RuntimeWarning: cypari2 leaked ... bytes on the PARI stack... + """ + cdef Integer x + cdef Integer mm