From 5c0c380814edf2d318b4156a9a0d805ad52606b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 20 Aug 2023 21:39:02 -0300 Subject: [PATCH] sagemath: update to 10.1. --- .../sagemath/patches/35584-networkx_3.1.patch | 92 -- .../sagemath/patches/35612-linbox_1.7.0.patch | 64 -- .../patches/35619-maxima_5.46.0.patch | 586 ------------ .../sagemath/patches/35635-sympy_1.12.patch | 54 -- .../patches/35707-maxima_5.47.0.patch | 879 ------------------ .../patches/35825-singular_4.3.2p2.patch | 24 - .../sagemath/patches/35826-numpy_1.25.0.patch | 83 -- .../patches/35831-setuptools_68.0.0.patch | 13 - .../patches/35934-singular_4.3.2p7.patch | 26 + .../sagemath/patches/36006-gmp_6.3.0.patch | 38 + .../patches/36018-singular_4.3.2p7.patch | 122 +++ srcpkgs/sagemath/patches/get_patches | 20 +- srcpkgs/sagemath/template | 13 +- 13 files changed, 196 insertions(+), 1818 deletions(-) delete mode 100644 srcpkgs/sagemath/patches/35584-networkx_3.1.patch delete mode 100644 srcpkgs/sagemath/patches/35612-linbox_1.7.0.patch delete mode 100644 srcpkgs/sagemath/patches/35619-maxima_5.46.0.patch delete mode 100644 srcpkgs/sagemath/patches/35635-sympy_1.12.patch delete mode 100644 srcpkgs/sagemath/patches/35707-maxima_5.47.0.patch delete mode 100644 srcpkgs/sagemath/patches/35825-singular_4.3.2p2.patch delete mode 100644 srcpkgs/sagemath/patches/35826-numpy_1.25.0.patch delete mode 100644 srcpkgs/sagemath/patches/35831-setuptools_68.0.0.patch create mode 100644 srcpkgs/sagemath/patches/35934-singular_4.3.2p7.patch create mode 100644 srcpkgs/sagemath/patches/36006-gmp_6.3.0.patch create mode 100644 srcpkgs/sagemath/patches/36018-singular_4.3.2p7.patch diff --git a/srcpkgs/sagemath/patches/35584-networkx_3.1.patch b/srcpkgs/sagemath/patches/35584-networkx_3.1.patch deleted file mode 100644 index 9331258986d3d..0000000000000 --- a/srcpkgs/sagemath/patches/35584-networkx_3.1.patch +++ /dev/null @@ -1,92 +0,0 @@ -diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py -index c2e42bcbd38..0d13f071dc4 100644 ---- a/src/sage/graphs/graph.py -+++ b/src/sage/graphs/graph.py -@@ -6786,13 +6786,26 @@ def cliques_number_of(self, vertices=None, cliques=None): - {(0, 0): 2, (0, 1): 3, (0, 2): 2, (1, 0): 2, (1, 1): 3, (1, 2): 2} - sage: F.cliques_number_of(vertices=[(0, 1), (1, 2)]) - {(0, 1): 3, (1, 2): 2} -+ sage: F.cliques_number_of(vertices=(0, 1)) -+ 3 - sage: G = Graph({0:[1,2,3], 1:[2], 3:[0,1]}) - sage: G.show(figsize=[2,2]) - sage: G.cliques_number_of() - {0: 2, 1: 2, 2: 1, 3: 1} - """ -- import networkx -- return networkx.number_of_cliques(self.networkx_graph(), vertices, cliques) -+ if cliques is None: -+ cliques = self.cliques_maximal() -+ -+ if vertices in self: # single vertex -+ return sum(1 for c in cliques if vertices in c) -+ -+ from collections import Counter -+ count = Counter() -+ -+ for c in cliques: -+ count.update(c) -+ -+ return {v : count[v] for v in vertices or self} - - @doc_index("Clique-related methods") - def cliques_get_max_clique_graph(self): -@@ -7493,17 +7506,32 @@ def cliques_containing_vertex(self, vertices=None, cliques=None): - - sage: C = Graph('DJ{') - sage: C.cliques_containing_vertex() -- {0: [[4, 0]], 1: [[4, 1, 2, 3]], 2: [[4, 1, 2, 3]], 3: [[4, 1, 2, 3]], 4: [[4, 0], [4, 1, 2, 3]]} -+ {0: [[0, 4]], -+ 1: [[1, 2, 3, 4]], -+ 2: [[1, 2, 3, 4]], -+ 3: [[1, 2, 3, 4]], -+ 4: [[0, 4], [1, 2, 3, 4]]} -+ sage: C.cliques_containing_vertex(4) -+ [[0, 4], [1, 2, 3, 4]] -+ sage: C.cliques_containing_vertex([0, 1]) -+ {0: [[0, 4]], 1: [[1, 2, 3, 4]]} - sage: E = C.cliques_maximal() - sage: E - [[0, 4], [1, 2, 3, 4]] - sage: C.cliques_containing_vertex(cliques=E) -- {0: [[0, 4]], 1: [[1, 2, 3, 4]], 2: [[1, 2, 3, 4]], 3: [[1, 2, 3, 4]], 4: [[0, 4], [1, 2, 3, 4]]} -+ {0: [[0, 4]], -+ 1: [[1, 2, 3, 4]], -+ 2: [[1, 2, 3, 4]], -+ 3: [[1, 2, 3, 4]], -+ 4: [[0, 4], [1, 2, 3, 4]]} - - sage: G = Graph({0:[1,2,3], 1:[2], 3:[0,1]}) - sage: G.show(figsize=[2,2]) - sage: G.cliques_containing_vertex() -- {0: [[0, 1, 2], [0, 1, 3]], 1: [[0, 1, 2], [0, 1, 3]], 2: [[0, 1, 2]], 3: [[0, 1, 3]]} -+ {0: [[0, 1, 2], [0, 1, 3]], -+ 1: [[0, 1, 2], [0, 1, 3]], -+ 2: [[0, 1, 2]], -+ 3: [[0, 1, 3]]} - - Since each clique of a 2 dimensional grid corresponds to an edge, the - number of cliques in which a vertex is involved equals its degree:: -@@ -7518,8 +7546,20 @@ def cliques_containing_vertex(self, vertices=None, cliques=None): - sage: sorted(sorted(x for x in L) for L in d[(0, 1)]) - [[(0, 0), (0, 1)], [(0, 1), (0, 2)], [(0, 1), (1, 1)]] - """ -- import networkx -- return networkx.cliques_containing_node(self.networkx_graph(), vertices, cliques) -+ if cliques is None: -+ cliques = self.cliques_maximal() -+ -+ if vertices in self: # single vertex -+ return [c for c in cliques if vertices in c] -+ -+ from collections import defaultdict -+ d = defaultdict(list) -+ -+ for c in cliques: -+ for v in c: -+ d[v].append(c) -+ -+ return {v : d[v] for v in vertices or self} - - @doc_index("Clique-related methods") - def clique_complex(self): diff --git a/srcpkgs/sagemath/patches/35612-linbox_1.7.0.patch b/srcpkgs/sagemath/patches/35612-linbox_1.7.0.patch deleted file mode 100644 index 58dddf34a69d8..0000000000000 --- a/srcpkgs/sagemath/patches/35612-linbox_1.7.0.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff --git a/src/sage/libs/linbox/conversion.pxd b/src/sage/libs/linbox/conversion.pxd -index 7794c9edc39..1753277b1f1 100644 ---- a/src/sage/libs/linbox/conversion.pxd -+++ b/src/sage/libs/linbox/conversion.pxd -@@ -177,9 +177,8 @@ cdef inline Vector_integer_dense new_sage_vector_integer_dense(P, DenseVector_in - - v -- linbox vector - """ - cdef Vector_integer_dense res = P() -- cdef cppvector[Integer] * vec = &v.refRep() - cdef size_t i - for i in range( res._degree): -- mpz_set(res._entries[i], vec[0][i].get_mpz_const()) -+ mpz_set(res._entries[i], v.getEntry(i).get_mpz_const()) - - return res -diff --git a/src/sage/libs/linbox/linbox.pxd b/src/sage/libs/linbox/linbox.pxd -index 9112d151f8b..bfeda4b6042 100644 ---- a/src/sage/libs/linbox/linbox.pxd -+++ b/src/sage/libs/linbox/linbox.pxd -@@ -32,7 +32,6 @@ cdef extern from "linbox/matrix/dense-matrix.h": - ctypedef Modular_double Field - ctypedef double Element - DenseMatrix_Modular_double(Field F, size_t m, size_t n) -- DenseMatrix_Modular_double(Field F, Element*, size_t m, size_t n) - void setEntry(size_t i, size_t j, Element& a) - Element &getEntry(size_t i, size_t j) - -@@ -42,7 +41,6 @@ cdef extern from "linbox/matrix/dense-matrix.h": - ctypedef Modular_float Field - ctypedef float Element - DenseMatrix_Modular_float(Field F, size_t m, size_t n) -- DenseMatrix_Modular_float(Field F, Element*, size_t m, size_t n) - void setEntry(size_t i, size_t j, Element& a) - Element &getEntry(size_t i, size_t j) - -@@ -101,7 +99,6 @@ cdef extern from "linbox/vector/vector.h": - DenseVector_integer (Field &F) - DenseVector_integer (Field &F, long& m) - DenseVector_integer (Field &F, cppvector[Integer]&) -- cppvector[Element]& refRep() - size_t size() - void resize(size_t) - void resize(size_t n, const Element&) -diff --git a/src/sage/matrix/matrix_modn_dense_template.pxi b/src/sage/matrix/matrix_modn_dense_template.pxi -index abf29badce6..68b869ce314 100644 ---- a/src/sage/matrix/matrix_modn_dense_template.pxi -+++ b/src/sage/matrix/matrix_modn_dense_template.pxi -@@ -221,9 +221,14 @@ cdef inline linbox_echelonize_efd(celement modulus, celement* entries, Py_ssize_ - return 0,[] - - cdef ModField *F = new ModField(modulus) -- cdef DenseMatrix *A = new DenseMatrix(F[0], entries,nrows, ncols) -- cdef Py_ssize_t r = reducedRowEchelonize(A[0]) -+ cdef DenseMatrix *A = new DenseMatrix(F[0], nrows, ncols) -+ - cdef Py_ssize_t i,j -+ for i in range(nrows): -+ for j in range(ncols): -+ A.setEntry(i, j, entries[i*ncols+j]) -+ -+ cdef Py_ssize_t r = reducedRowEchelonize(A[0]) - for i in range(nrows): - for j in range(ncols): - entries[i*ncols+j] = A.getEntry(i,j) diff --git a/srcpkgs/sagemath/patches/35619-maxima_5.46.0.patch b/srcpkgs/sagemath/patches/35619-maxima_5.46.0.patch deleted file mode 100644 index 970de6e5beb6c..0000000000000 --- a/srcpkgs/sagemath/patches/35619-maxima_5.46.0.patch +++ /dev/null @@ -1,586 +0,0 @@ -diff --git a/build/pkgs/ecl/dependencies b/build/pkgs/ecl/dependencies -index cda6316bf5a..51a953403e9 100644 ---- a/build/pkgs/ecl/dependencies -+++ b/build/pkgs/ecl/dependencies -@@ -1,4 +1,4 @@ --$(MP_LIBRARY) readline gc libffi -+$(MP_LIBRARY) readline gc libffi info - - ---------- - All lines of this file are ignored except the first. -diff --git a/build/pkgs/ecl/spkg-configure.m4 b/build/pkgs/ecl/spkg-configure.m4 -index ae1e0ac5e1a..7dbcfa6377b 100644 ---- a/build/pkgs/ecl/spkg-configure.m4 -+++ b/build/pkgs/ecl/spkg-configure.m4 -@@ -35,10 +35,7 @@ SAGE_SPKG_CONFIGURE([ecl], [ - AC_SUBST(SAGE_ECL_CONFIG, [$ECL_CONFIG]) - fi - -- # Maxima cannot yet be provided by the system, so we always use -+ # Kenzo cannot yet be provided by the system, so we always use - # the SAGE_LOCAL path for now. -- AC_SUBST(SAGE_MAXIMA_FAS, ['${prefix}'/lib/ecl/maxima.fas]) -- -- # Likewise for the optional Kenzo SPKG - AC_SUBST(SAGE_KENZO_FAS, ['${prefix}'/lib/ecl/kenzo.fas]) - ]) -diff --git a/build/pkgs/ecl/spkg-install.in b/build/pkgs/ecl/spkg-install.in -index ee1667aec16..72083337942 100644 ---- a/build/pkgs/ecl/spkg-install.in -+++ b/build/pkgs/ecl/spkg-install.in -@@ -31,18 +31,6 @@ cp "$SAGE_ROOT"/config/config.* src - - if [ x"$SAGE_SPKG_INSTALL_DOCS" != xyes ] ; then - ECL_CONFIGURE="$ECL_CONFIGURE --enable-manual=no" --else -- # ECL 2020 needs modern makeinfo -- command -v texi2any >/dev/null 2>&1 -- if [ $? -ne 0 ]; then # texi2any not found -> makeinfo too old, if present -- ECL_CONFIGURE="$ECL_CONFIGURE --enable-manual=no" -- else -- if makeinfo -c foo 2>&1 | grep -q invalid; then -- # makeinfo found but does not support all options that ecl -- # likes to use -- ECL_CONFIGURE="$ECL_CONFIGURE --enable-manual=no" -- fi -- fi - fi - - sdh_configure $SAGE_CONFIGURE_GMP \ -diff --git a/build/pkgs/giac/spkg-configure.m4 b/build/pkgs/giac/spkg-configure.m4 -index 5859e35f12e..53e3a8301cd 100644 ---- a/build/pkgs/giac/spkg-configure.m4 -+++ b/build/pkgs/giac/spkg-configure.m4 -@@ -5,7 +5,7 @@ SAGE_SPKG_CONFIGURE([giac], [ - m4_pushdef([GIAC_MAX_VERSION], [1.9.999]) - AC_CACHE_CHECK([for giac >= ]GIAC_MIN_VERSION[, <= ]GIAC_MAX_VERSION, [ac_cv_path_GIAC], [ - AC_PATH_PROGS_FEATURE_CHECK([GIAC], [giac], [ -- giac_version=$($ac_path_GIAC --version 2> /dev/null | tail -1) -+ giac_version=$($ac_path_GIAC --version 2> /dev/null | tail -n 1) - AS_IF([test -n "$giac_version"], [ - AX_COMPARE_VERSION([$giac_version], [ge], GIAC_MIN_VERSION, [ - AX_COMPARE_VERSION([$giac_version], [le], GIAC_MAX_VERSION, [ -diff --git a/build/pkgs/info/distros/fedora.txt b/build/pkgs/info/distros/fedora.txt -index 283aa462f74..c0d8f74e0ad 100644 ---- a/build/pkgs/info/distros/fedora.txt -+++ b/build/pkgs/info/distros/fedora.txt -@@ -1 +1 @@ --texinfo -+texinfo info -diff --git a/build/pkgs/info/spkg-configure.m4 b/build/pkgs/info/spkg-configure.m4 -index 0980a4b8ef8..85fe1ea4731 100644 ---- a/build/pkgs/info/spkg-configure.m4 -+++ b/build/pkgs/info/spkg-configure.m4 -@@ -1,4 +1,14 @@ - SAGE_SPKG_CONFIGURE([info], [ - AC_PATH_PROG(INFO, info) -- AS_IF([test -z "${INFO}"], [sage_spkg_install_info=yes]) -+ AS_IF([test -z "${INFO}"], [sage_spkg_install_info=yes -+ ], [ -+ dnl very old makeinfo are not texi2any, newer are symlinks to texi2any -+ AC_PATH_PROG(TEXI2ANY, texi2any) -+ AS_IF([test -z "${TEXI2ANY}"], [sage_spkg_install_info=yes -+ ], [ -+ AS_IF([makeinfo -c foo 2>&1 | grep -q invalid], [ -+ dnl makeinfo found, but too old, and does not support all options that ecl likes to use -+ sage_spkg_install_info=yes]) -+ ]) -+ ]) - ]) -diff --git a/build/pkgs/info/spkg-install.in b/build/pkgs/info/spkg-install.in -index 8086e4b2ec8..3ea8c053669 100644 ---- a/build/pkgs/info/spkg-install.in -+++ b/build/pkgs/info/spkg-install.in -@@ -1,2 +1,2 @@ --cd src/info -+cd src - sdh_make_install -diff --git a/build/pkgs/info/type b/build/pkgs/info/type -index 134d9bc32d5..a6a7b9cd726 100644 ---- a/build/pkgs/info/type -+++ b/build/pkgs/info/type -@@ -1 +1 @@ --optional -+standard -diff --git a/build/pkgs/maxima/checksums.ini b/build/pkgs/maxima/checksums.ini -index a804c7b831f..0f594389fe6 100644 ---- a/build/pkgs/maxima/checksums.ini -+++ b/build/pkgs/maxima/checksums.ini -@@ -1,5 +1,5 @@ - tarball=maxima-VERSION.tar.gz --sha1=ed15d5285794413ba94412079eca3d0fa55a47bf --md5=9b9ae1dace55b1386739dabaa9122e60 --cksum=1765409766 -+sha1=1010594e6d6082bbd8efaac1b7756ec1721a4ed5 -+md5=3c01f1daa6936e11d8713fef7751d3fe -+cksum=2420393096 - upstream_url=https://sourceforge.net/projects/maxima/files/Maxima-source/VERSION-source/maxima-VERSION.tar.gz/download -diff --git a/build/pkgs/maxima/dependencies b/build/pkgs/maxima/dependencies -index fffb89e2050..55c7e0d8d14 100644 ---- a/build/pkgs/maxima/dependencies -+++ b/build/pkgs/maxima/dependencies -@@ -1,4 +1,4 @@ --ecl -+ecl info - - ---------- - All lines of this file are ignored except the first. -diff --git a/build/pkgs/maxima/distros/arch.txt b/build/pkgs/maxima/distros/arch.txt -index 6400290f44d..6ac052fa62b 100644 ---- a/build/pkgs/maxima/distros/arch.txt -+++ b/build/pkgs/maxima/distros/arch.txt -@@ -1 +1 @@ --maxima-ecl -+maxima-fas -diff --git a/build/pkgs/maxima/distros/cygwin.txt b/build/pkgs/maxima/distros/cygwin.txt -new file mode 100644 -index 00000000000..f5fe3fdc6cb ---- /dev/null -+++ b/build/pkgs/maxima/distros/cygwin.txt -@@ -0,0 +1 @@ -+maxima -diff --git a/build/pkgs/maxima/distros/freebsd.txt b/build/pkgs/maxima/distros/freebsd.txt -new file mode 100644 -index 00000000000..766a71b5074 ---- /dev/null -+++ b/build/pkgs/maxima/distros/freebsd.txt -@@ -0,0 +1 @@ -+math/maxima -diff --git a/build/pkgs/maxima/distros/gentoo.txt b/build/pkgs/maxima/distros/gentoo.txt -new file mode 100644 -index 00000000000..85fb33f1610 ---- /dev/null -+++ b/build/pkgs/maxima/distros/gentoo.txt -@@ -0,0 +1,2 @@ -+sci-mathematics/maxima[ecls] -+ -diff --git a/build/pkgs/maxima/package-version.txt b/build/pkgs/maxima/package-version.txt -index 83476624dc0..5681375f3be 100644 ---- a/build/pkgs/maxima/package-version.txt -+++ b/build/pkgs/maxima/package-version.txt -@@ -1 +1 @@ --5.45.0.p0 -+5.46.0 -diff --git a/build/pkgs/maxima/patches/matrixexp.patch b/build/pkgs/maxima/patches/matrixexp.patch -deleted file mode 100644 -index 5c8527c33bf..00000000000 ---- a/build/pkgs/maxima/patches/matrixexp.patch -+++ /dev/null -@@ -1,15 +0,0 @@ --diff --git a/share/linearalgebra/matrixexp.lisp b/share/linearalgebra/matrixexp.lisp --index 218bf35..f2fd468 100644 ----- a/share/linearalgebra/matrixexp.lisp --+++ b/share/linearalgebra/matrixexp.lisp --@@ -138,8 +138,8 @@ -- (print `(ratvars = ,$ratvars gcd = '$gcd algebraic = ,$algebraic)) -- (print `(ratfac = ,$ratfac)) -- (merror "Unable to find the spectrum"))) --- --- (setq res ($fullratsimp (ncpower (sub (mult z ($ident n)) mat) -1) z)) --+ --+ (setq res ($fullratsimp ($invert_by_lu (sub (mult z ($ident n)) mat) '$crering) z)) -- (setq m (length sp)) -- (dotimes (i m) -- (setq zi (nth i sp)) -diff --git a/build/pkgs/maxima/patches/maxima.system.patch b/build/pkgs/maxima/patches/maxima.system.patch -deleted file mode 100644 -index 74db62e7f9f..00000000000 ---- a/build/pkgs/maxima/patches/maxima.system.patch -+++ /dev/null -@@ -1,25 +0,0 @@ --diff --git a/src/maxima.system b/src/maxima.system --index 76f2452..cf25f51 100644 ----- a/src/maxima.system --+++ b/src/maxima.system --@@ -1,5 +1,8 @@ -- ;;; -*- Lisp -*- -- --+(require :cmp) --+(setf c::*compile-in-constants* t) --+ -- (in-package :cl-user) -- -- (pushnew :cl *features*) --@@ -75,6 +78,11 @@ -- ;; Convert dir/foo.fas to dir/foo.o -- (make-pathname :type "o" :defaults p)) -- files))) --+ (c::build-fasl "binary-ecl/maxima" :lisp-files obj --+ :ld-flags --+ (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*" --+ (find-package "MAXIMA"))))) --+ (if (and x (not (string= x ""))) (list x)))) -- (c::build-program "binary-ecl/maxima" :lisp-files obj -- :ld-flags -- (let ((x (symbol-value (find-symbol "*AUTOCONF-LD-FLAGS*" -diff --git a/build/pkgs/maxima/spkg-configure.m4 b/build/pkgs/maxima/spkg-configure.m4 -new file mode 100644 -index 00000000000..86de8c1dfc1 ---- /dev/null -+++ b/build/pkgs/maxima/spkg-configure.m4 -@@ -0,0 +1,46 @@ -+SAGE_SPKG_CONFIGURE([maxima], [ -+ m4_pushdef([SAGE_MAXIMA_MINVER],["5.45.0"])dnl this version and higher allowed -+ SAGE_SPKG_DEPCHECK([ecl], [ -+ dnl First check for the "maxima" executable in the user's PATH, because -+ dnl we still use pexpect to communicate with it in a few places. -+ AC_CACHE_CHECK([for Maxima >= $SAGE_MAXIMA_MINVER], [ac_cv_path_MAXIMA], [ -+ AC_PATH_PROGS_FEATURE_CHECK([MAXIMA], [maxima], [ -+ maxima_version=`$ac_path_MAXIMA --version 2>&1 | tail -n 1\ -+ | $SED -n -e 's/Maxima *\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)/\1/p'` -+ AS_IF([test -n "$maxima_version"], [ -+ AX_COMPARE_VERSION([$maxima_version], [ge], [SAGE_MAXIMA_MINVER], [ -+ ac_cv_path_MAXIMA="$ac_path_MAXIMA" -+ ac_path_MAXIMA_found=: -+ ]) -+ ]) -+ ]) -+ ]) -+ SAGE_MAXIMA="$ac_cv_path_MAXIMA" -+ AS_IF([test -z "${SAGE_MAXIMA}"], [ -+ sage_spkg_install_maxima=yes -+ ],[ -+ dnl If we have the executable, check also for the ECL library. -+ AC_MSG_CHECKING([if ECL can "require" the maxima module]) -+ AS_IF([ecl --eval "(require 'maxima)" --eval "(quit)" \ -+ >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD], [ -+ AC_MSG_RESULT(yes) -+ ], [ -+ AC_MSG_RESULT(no) -+ sage_spkg_install_maxima=yes -+ ]) -+ ]) -+ ]) -+ m4_popdef([SAGE_MAXIMA_MINVER]) -+],[],[],[ -+ # post-check -+ AS_IF([test x$sage_spkg_install_maxima = xyes], [ -+ dnl Leaving this variable empty will tell sagelib to load -+ dnl the maxima library (within ECL) by name instead of by -+ dnl absolute path. -+ SAGE_MAXIMA='${prefix}'/bin/maxima -+ SAGE_MAXIMA_FAS='${prefix}'/lib/ecl/maxima.fas -+ ]) -+ -+ AC_SUBST(SAGE_MAXIMA, "${SAGE_MAXIMA}") -+ AC_SUBST(SAGE_MAXIMA_FAS, "${SAGE_MAXIMA_FAS}") -+]) -diff --git a/build/pkgs/maxima/spkg-install.in b/build/pkgs/maxima/spkg-install.in -index 3ae6382f9ba..cdb6fbf2069 100644 ---- a/build/pkgs/maxima/spkg-install.in -+++ b/build/pkgs/maxima/spkg-install.in -@@ -28,28 +28,6 @@ echo - echo "Now configuring Maxima..." - sdh_configure --enable-ecl git_found=false - --# Note the following is regression in maxima build system --# see https://sourceforge.net/p/maxima/bugs/3278/ --# and https://sourceforge.net/p/maxima/bugs/2878/ --# For the previous time it was fixed. --#--------------------------------------------------------------- --# Touching html and info file to avoid to regenerate them. --# This must be done after configuration since the timestamp need --# to be later than include-maxima.texi which is generated at --# configuration time --for i in doc/info/*.html ; do -- touch "${i}" --done --touch doc/info/maxima.info* --# Maxima 5.44.0 build_html.sh is not compatible with makeinfo 4.8 --# (which is /usr/bin/makeinfo on macOS). #30063 --# Do not build the HTML docs unless the user asks for it, --# in which case it is their problem to install a better --# makeinfo version. --if [[ "$SAGE_SPKG_INSTALL_DOCS" != yes ]] ; then --touch doc/info/maxima_toc.html interfaces/xmaxima/doc/xmaxima.html --fi -- - #--------------------------------------------------------------- - - sdh_make -diff --git a/build/pkgs/tox/spkg-configure.m4 b/build/pkgs/tox/spkg-configure.m4 -index 7d8ade4c14b..5a260439cdd 100644 ---- a/build/pkgs/tox/spkg-configure.m4 -+++ b/build/pkgs/tox/spkg-configure.m4 -@@ -5,7 +5,7 @@ SAGE_SPKG_CONFIGURE([tox], [ - m4_pushdef([TOX4_MIN_VERSION], [4.0.15]) - AC_CACHE_CHECK([for tox 3 >= ]TOX3_MIN_VERSION[ or tox 4 >= ]TOX4_MIN_VERSION, [ac_cv_path_TOX], [ - AC_PATH_PROGS_FEATURE_CHECK([TOX], [tox], [ -- tox_version=$($ac_path_TOX --version 2> /dev/null | tail -1) -+ tox_version=$($ac_path_TOX --version 2> /dev/null | tail -n 1) - AS_IF([test -n "$tox_version"], [ - AX_COMPARE_VERSION([$tox_version], [lt], [4], [ - AX_COMPARE_VERSION([$tox_version], [ge], TOX3_MIN_VERSION, [ -diff --git a/pkgs/sage-conf/_sage_conf/_conf.py.in b/pkgs/sage-conf/_sage_conf/_conf.py.in -index d66bdb3d264..f2e197b45ed 100644 ---- a/pkgs/sage-conf/_sage_conf/_conf.py.in -+++ b/pkgs/sage-conf/_sage_conf/_conf.py.in -@@ -9,9 +9,11 @@ VERSION = "@PACKAGE_VERSION@" - SAGE_LOCAL = "@prefix@" - SAGE_ROOT = "@SAGE_ROOT@" - --MAXIMA = "@prefix@/bin/maxima" -+# The path to the standalone maxima executable. -+MAXIMA = "@SAGE_MAXIMA@".replace('${prefix}', SAGE_LOCAL) - --# Delete this line if your ECL can load maxima without further prodding. -+# Set this to the empty string if your ECL can load maxima without -+# further prodding. - MAXIMA_FAS = "@SAGE_MAXIMA_FAS@".replace('${prefix}', SAGE_LOCAL) - - # Delete this line if your ECL can load Kenzo without further prodding. -diff --git a/src/bin/sage-env b/src/bin/sage-env -index a7da60df28f..13b54fa7e92 100644 ---- a/src/bin/sage-env -+++ b/src/bin/sage-env -@@ -440,9 +440,6 @@ if [ -d "$DOT_SAGE" ] ; then - fi - fi - --if [ -n "$SAGE_LOCAL" ]; then -- export MAXIMA_PREFIX="$SAGE_LOCAL" --fi - export MAXIMA_USERDIR="$DOT_SAGE/maxima" - - if [ -n "$SAGE_LOCAL" ]; then -diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py -index dae380180ac..ee8f632e94c 100644 ---- a/src/sage/calculus/calculus.py -+++ b/src/sage/calculus/calculus.py -@@ -136,10 +136,11 @@ - [ 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))] - --And complex exponentiation works now:: -+Complex exponentiation works, but may require a patched version of -+maxima (:trac:`32898`) for now:: - - sage: M = i*matrix([[pi]]) -- sage: e^M -+ sage: e^M # not tested, requires patched maxima - [-1] - sage: M = i*matrix([[pi,0],[0,2*pi]]) - sage: e^M -@@ -1186,8 +1187,18 @@ def limit(ex, dir=None, taylor=False, algorithm='maxima', **argv): - e - sage: f.limit(x=5) - 7776/3125 -- sage: f.limit(x=1.2) -+ -+ Domain to real, a regression in 5.46.0, see https://sf.net/p/maxima/bugs/4138 :: -+ -+ sage: maxima_calculus.eval("domain:real") -+ ... -+ sage: f.limit(x=1.2).n() - 2.06961575467... -+ sage: maxima_calculus.eval("domain:complex"); -+ ... -+ -+ Otherwise, it works :: -+ - sage: f.limit(x=I, taylor=True) - (-I + 1)^I - sage: f(x=1.2) -@@ -1215,7 +1226,7 @@ def limit(ex, dir=None, taylor=False, algorithm='maxima', **argv): - With this example, Maxima is looking for a LOT of information:: - - sage: assume(a>0) -- sage: limit(x^a,x=0) -+ sage: limit(x^a,x=0) # random - maxima 5.46.0 does not need extra assumption - Traceback (most recent call last): - ... - ValueError: Computation failed since Maxima requested additional -@@ -1224,7 +1235,7 @@ def limit(ex, dir=None, taylor=False, algorithm='maxima', **argv): - more details) - Is a an integer? - sage: assume(a,'integer') -- sage: limit(x^a, x=0) -+ sage: limit(x^a, x=0) # random - maxima 5.46.0 does not need extra assumption - Traceback (most recent call last): - ... - ValueError: Computation failed since Maxima requested additional -@@ -2251,10 +2262,10 @@ def symbolic_expression_from_maxima_string(x, equals_sub=False, maxima=maxima): - True - sage: sefms("x # 3") == SR(x != 3) - True -- sage: solve([x != 5], x) -- [[x - 5 != 0]] -+ sage: solve([x != 5], x) in [[[x - 5 != 0]], [[x < 5], [5 < x]]] -+ True - sage: solve([2*x==3, x != 5], x) -- [[x == (3/2), (-7/2) != 0]] -+ [[x == (3/2)... - - Make sure that we don't accidentally pick up variables in the maxima namespace (:trac:`8734`):: - -diff --git a/src/sage/functions/exp_integral.py b/src/sage/functions/exp_integral.py -index e6c888c64b6..f314e525145 100644 ---- a/src/sage/functions/exp_integral.py -+++ b/src/sage/functions/exp_integral.py -@@ -601,8 +601,8 @@ class Function_log_integral_offset(BuiltinFunction): - 1/log(x) - sage: f.integrate(x) - -x*log_integral(2) + x*log_integral(x) - Ei(2*log(x)) -- sage: Li(x).integrate(x,2.0,4.5) -- -2.5*log_integral(2) + 5.799321147411334 -+ sage: Li(x).integrate(x,2.0,4.5).n(digits=10) -+ 3.186411697 - sage: N(f.integrate(x,2.0,3.0)) # abs tol 1e-15 - 0.601621785860587 - -diff --git a/src/sage/interfaces/expect.py b/src/sage/interfaces/expect.py -index 68ae715e4c3..84adf0341b5 100644 ---- a/src/sage/interfaces/expect.py -+++ b/src/sage/interfaces/expect.py -@@ -620,7 +620,7 @@ def quit(self, verbose=False): - - sage: a = maxima('y') - sage: maxima.quit(verbose=True) -- Exiting Maxima with PID ... running .../bin/maxima... -+ Exiting Maxima with PID ... running ...maxima... - sage: a._check_valid() - Traceback (most recent call last): - ... -diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py -index 27b1e98a6ac..4829560f98b 100644 ---- a/src/sage/interfaces/maxima.py -+++ b/src/sage/interfaces/maxima.py -@@ -622,11 +622,6 @@ def _start(self): - sage: m.is_running() - True - -- Test that we can use more than 256MB RAM (see :trac:`6772`):: -- -- sage: a = maxima(10)^(10^5) -- sage: b = a^600 # long time -- about 10-15 seconds -- - """ - Expect._start(self) - self._sendline(r":lisp (defun tex-derivative (x l r) (tex (if $derivabbrev (tex-dabbrev x) (tex-d x '\\partial)) l r lop rop ))") -@@ -634,9 +629,6 @@ def _start(self): - # Don't use ! for factorials (#11539) - self._sendline(":lisp (remprop 'mfactorial 'grind)") - -- # Remove limit on the max heapsize (since otherwise it defaults -- # to 256MB with ECL). -- self._sendline(":lisp (ext:set-limit 'ext:heap-size 0)") - self._eval_line('0;') - - # set random seed -diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py -index c263ac65f02..bba8504aa92 100644 ---- a/src/sage/interfaces/maxima_lib.py -+++ b/src/sage/interfaces/maxima_lib.py -@@ -934,8 +934,15 @@ def sr_limit(self, expr, v, a, dir=None): - e - sage: limit(f,x = 5) - 7776/3125 -- sage: limit(f,x = 1.2) -+ -+ Domain to real, a regression in 5.46.0, see https://sf.net/p/maxima/bugs/4138 :: -+ -+ sage: maxima_calculus.eval("domain:real") -+ ... -+ sage: limit(f,x = 1.2).n() - 2.06961575467... -+ sage: maxima_calculus.eval("domain:complex"); -+ ... - sage: var('a') - a - sage: limit(x^a,x=0) -@@ -947,7 +954,7 @@ def sr_limit(self, expr, v, a, dir=None): - for more details) - Is a positive, negative or zero? - sage: assume(a>0) -- sage: limit(x^a,x=0) -+ sage: limit(x^a,x=0) # random - not needed for maxima 5.46.0 - Traceback (most recent call last): - ... - ValueError: Computation failed ... -diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx -index e2e6449dfa9..15914b0be3e 100644 ---- a/src/sage/matrix/matrix2.pyx -+++ b/src/sage/matrix/matrix2.pyx -@@ -15425,9 +15425,10 @@ cdef class Matrix(Matrix1): - - TESTS: - -- Check that sparse matrices are handled correctly (:trac:`28935`):: -+ Sparse matrices are handled correctly (:trac:`28935`), but may -+ require a patched version of maxima (:trac:`32898`) for now:: - -- sage: matrix.diagonal([0], sparse=True).exp() -+ sage: matrix.diagonal([0], sparse=True).exp() # not tested, requires patched maxima - [1] - sage: matrix.zero(CBF, 2, sparse=True).exp() - [1.000000000000000 0] -diff --git a/src/sage/matrix/matrix_symbolic_dense.pyx b/src/sage/matrix/matrix_symbolic_dense.pyx -index 19ca5c85cb2..58a25e002f6 100644 ---- a/src/sage/matrix/matrix_symbolic_dense.pyx -+++ b/src/sage/matrix/matrix_symbolic_dense.pyx -@@ -402,7 +402,8 @@ cdef class Matrix_symbolic_dense(Matrix_generic_dense): - [1/2*(e^(2*x) + 1)*e^(-x) 1/2*(e^(2*x) - 1)*e^(-x)] - [1/2*(e^(2*x) - 1)*e^(-x) 1/2*(e^(2*x) + 1)*e^(-x)] - -- Exp works on 0x0 and 1x1 matrices:: -+ Exponentiation works on 0x0 and 1x1 matrices, but the 1x1 example -+ requires a patched version of maxima (:trac:`32898`) for now:: - - sage: m = matrix(SR,0,[]); m - [] -@@ -410,7 +411,7 @@ cdef class Matrix_symbolic_dense(Matrix_generic_dense): - [] - sage: m = matrix(SR,1,[2]); m - [2] -- sage: m.exp() -+ sage: m.exp() # not tested, requires patched maxima - [e^2] - - Commuting matrices `m, n` have the property that -@@ -451,7 +452,6 @@ cdef class Matrix_symbolic_dense(Matrix_generic_dense): - [ 0 1/2*(e^(2*x) + 1)*e^(-x) 1/2*(e^(2*x) - 1)*e^(-x) 0] - [ 0 1/2*(e^(2*x) - 1)*e^(-x) 1/2*(e^(2*x) + 1)*e^(-x) 0] - [1/2*(e^(2*x) - 1)*e^(-x) 0 0 1/2*(e^(2*x) + 1)*e^(-x)] -- - """ - if not self.is_square(): - raise ValueError("exp only defined on square matrices") -diff --git a/src/sage/symbolic/integration/integral.py b/src/sage/symbolic/integration/integral.py -index c82e9ed73c3..e84ad357ee2 100644 ---- a/src/sage/symbolic/integration/integral.py -+++ b/src/sage/symbolic/integration/integral.py -@@ -741,14 +741,14 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None, hold=False): - - sage: _ = var('x,y') - sage: f = log(x^2+y^2) -- sage: res = integral(f,x,0.0001414, 1.); res -+ sage: res = integral(f,x,1414/10^7, 1); res - Traceback (most recent call last): - ... -- ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(50015104*y^2-50015103>0)', see `assume?` for more details) -- Is 50015104*y^2-50015103 positive, negative or zero? -+ ValueError: Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help ... -+ Is ... positive, negative or zero? - sage: assume(y>1) -- sage: res = integral(f,x,0.0001414, 1.); res -- 2*y*arctan(1.0/y) - 2*y*arctan(0.0001414/y) + 1.0*log(1.0*y^2 + 1.0) - 0.0001414*log(1.0*y^2 + 1.9993959999999997e-08) - 1.9997172 -+ sage: res = integral(f,x,1414/10^7, 1); res -+ -2*y*arctan(707/5000000/y) + 2*y*arctan(1/y) + log(y^2 + 1) - 707/5000000*log(y^2 + 499849/25000000000000) - 4999293/2500000 - sage: nres = numerical_integral(f.subs(y=2), 0.0001414, 1.); nres - (1.4638323264144..., 1.6251803529759...e-14) - sage: res.subs(y=2).n() -diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py -index 94813315181..a72ab547c76 100644 ---- a/src/sage/symbolic/relation.py -+++ b/src/sage/symbolic/relation.py -@@ -1787,8 +1787,8 @@ def solve_ineq_fourier(ineq, vars=None): - sage: y = var('y') - sage: solve_ineq_fourier([x+y<9,x-y>4],[x,y]) - [[y + 4 < x, x < -y + 9, y < (5/2)]] -- sage: solve_ineq_fourier([x+y<9,x-y>4],[y,x]) -- [[y < min(x - 4, -x + 9)]] -+ sage: solve_ineq_fourier([x+y<9,x-y>4],[y,x])[0][0](x=42) -+ y < -33 - - sage: solve_ineq_fourier([x^2>=0]) - [[x < +Infinity]] diff --git a/srcpkgs/sagemath/patches/35635-sympy_1.12.patch b/srcpkgs/sagemath/patches/35635-sympy_1.12.patch deleted file mode 100644 index 9cfc69c2adb6f..0000000000000 --- a/srcpkgs/sagemath/patches/35635-sympy_1.12.patch +++ /dev/null @@ -1,54 +0,0 @@ -diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py -index dae380180ac..ca3c59e63d2 100644 ---- a/src/sage/calculus/calculus.py -+++ b/src/sage/calculus/calculus.py -@@ -1690,8 +1690,11 @@ def laplace(ex, t, s, algorithm='maxima'): - - Testing SymPy:: - -- sage: laplace(t^n, t, s, algorithm='sympy') -- (gamma(n + 1)/(s*s^n), 0, re(n) > -1) -+ sage: F, a, cond = laplace(t^n, t, s, algorithm='sympy') -+ sage: a, cond -+ (0, re(n) > -1) -+ sage: F.simplify() -+ s^(-n - 1)*gamma(n + 1) - - Testing Maxima:: - -@@ -1700,17 +1703,19 @@ def laplace(ex, t, s, algorithm='maxima'): - - Check that :trac:`24212` is fixed:: - -- sage: laplace(cos(t^2), t, s, algorithm='sympy') -- (-1/2*sqrt(pi)*(sqrt(2)*cos(1/4*s^2)*fresnel_sin(1/2*sqrt(2)*s/sqrt(pi)) - -- sqrt(2)*fresnel_cos(1/2*sqrt(2)*s/sqrt(pi))*sin(1/4*s^2) - cos(1/4*pi + 1/4*s^2)), -- 0, True) -+ sage: F, a, cond = laplace(cos(t^2), t, s, algorithm='sympy') -+ sage: a, cond -+ (0, True) -+ sage: F._sympy_().simplify() -+ sqrt(pi)*(sqrt(2)*sin(s**2/4)*fresnelc(sqrt(2)*s/(2*sqrt(pi))) - -+ sqrt(2)*cos(s**2/4)*fresnels(sqrt(2)*s/(2*sqrt(pi))) + cos(s**2/4 + pi/4))/2 - - Testing result from SymPy that Sage doesn't know how to handle:: - - sage: laplace(cos(-1/t), t, s, algorithm='sympy') - Traceback (most recent call last): - ... -- AttributeError: Unable to convert SymPy result (=meijerg(((), ()), ((-1/2, 0, 1/2), (0,)), s**2/16)/4) into Sage -+ AttributeError: Unable to convert SymPy result (=meijerg(((), ()), ((-1/2, 0, 1/2), (0,)), ...)/4) into Sage - """ - if not isinstance(ex, (Expression, Function)): - ex = SR(ex) -@@ -1817,8 +1822,8 @@ def inverse_laplace(ex, s, t, algorithm='maxima'): - - Transform an expression involving a time-shift, via SymPy:: - -- sage: inverse_laplace(1/s^2*exp(-s), s, t, algorithm='sympy') -- -(log(e^(-t)) + 1)*heaviside(t - 1) -+ sage: inverse_laplace(1/s^2*exp(-s), s, t, algorithm='sympy').simplify() -+ (t - 1)*heaviside(t - 1) - - The same instance with Giac:: - diff --git a/srcpkgs/sagemath/patches/35707-maxima_5.47.0.patch b/srcpkgs/sagemath/patches/35707-maxima_5.47.0.patch deleted file mode 100644 index de10df8cb73c9..0000000000000 --- a/srcpkgs/sagemath/patches/35707-maxima_5.47.0.patch +++ /dev/null @@ -1,879 +0,0 @@ -diff --git a/src/doc/de/tutorial/interfaces.rst b/src/doc/de/tutorial/interfaces.rst -index edb4f383363..d83225b5315 100644 ---- a/src/doc/de/tutorial/interfaces.rst -+++ b/src/doc/de/tutorial/interfaces.rst -@@ -272,8 +272,8 @@ deren :math:`i,j` Eintrag gerade :math:`i/j` ist, für :math:`i,j=1,\ldots,4`. - matrix([1,1/2,1/3,1/4],[0,0,0,0],[0,0,0,0],[0,0,0,0]) - sage: A.eigenvalues() - [[0,4],[3,1]] -- sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ sage: A.eigenvectors().sage() -+ [[[0, 4], [3, 1]], [[[1, 0, 0, -4], [0, 1, 0, -2], [0, 0, 1, -4/3]], [[1, 2, 3, 4]]]] - - Hier ein anderes Beispiel: - -@@ -332,12 +332,9 @@ Und der letzte ist die berühmte Kleinsche Flasche: - - :: - -- sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -- 5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0 -- sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -- -5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0) -- sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") -- 5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y)) -+ sage: _ = maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -+ sage: _ = maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -+ sage: _ = maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") - sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested - ....: "[y, -%pi, %pi]", "['grid, 40, 40]", - ....: '[plot_format, openmath]') -diff --git a/src/doc/de/tutorial/tour_algebra.rst b/src/doc/de/tutorial/tour_algebra.rst -index baba2553a25..59eed8f1888 100644 ---- a/src/doc/de/tutorial/tour_algebra.rst -+++ b/src/doc/de/tutorial/tour_algebra.rst -@@ -209,9 +209,12 @@ Lösung: Berechnen Sie die Laplace-Transformierte der ersten Gleichung - - :: - -- sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - Das ist schwierig zu lesen, es besagt jedoch, dass - -@@ -226,8 +229,8 @@ Laplace-Transformierte der zweiten Gleichung: - :: - - sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: lde2 = de2.laplace("t","s"); lde2.sage() -+ s^2*laplace(y(t), t, s) - s*y(0) - 2*laplace(x(t), t, s) + 2*laplace(y(t), t, s) - D[0](y)(0) - - Dies besagt - -diff --git a/src/doc/en/constructions/linear_algebra.rst b/src/doc/en/constructions/linear_algebra.rst -index 8894de9a5fd..4e76c65ad0a 100644 ---- a/src/doc/en/constructions/linear_algebra.rst -+++ b/src/doc/en/constructions/linear_algebra.rst -@@ -277,8 +277,8 @@ Another approach is to use the interface with Maxima: - - sage: A = maxima("matrix ([1, -4], [1, -1])") - sage: eig = A.eigenvectors() -- sage: eig -- [[[-sqrt(3)*%i,sqrt(3)*%i],[1,1]], [[[1,(sqrt(3)*%i+1)/4]],[[1,-(sqrt(3)*%i-1)/4]]]] -+ sage: eig.sage() -+ [[[-I*sqrt(3), I*sqrt(3)], [1, 1]], [[[1, 1/4*I*sqrt(3) + 1/4]], [[1, -1/4*I*sqrt(3) + 1/4]]]] - - This tells us that :math:`\vec{v}_1 = [1,(\sqrt{3}i + 1)/4]` is - an eigenvector of :math:`\lambda_1 = - \sqrt{3}i` (which occurs -diff --git a/src/doc/en/tutorial/interfaces.rst b/src/doc/en/tutorial/interfaces.rst -index b0e55345669..19c28f636d4 100644 ---- a/src/doc/en/tutorial/interfaces.rst -+++ b/src/doc/en/tutorial/interfaces.rst -@@ -267,8 +267,8 @@ whose :math:`i,j` entry is :math:`i/j`, for - matrix([1,1/2,1/3,1/4],[0,0,0,0],[0,0,0,0],[0,0,0,0]) - sage: A.eigenvalues() - [[0,4],[3,1]] -- sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ sage: A.eigenvectors().sage() -+ [[[0, 4], [3, 1]], [[[1, 0, 0, -4], [0, 1, 0, -2], [0, 0, 1, -4/3]], [[1, 2, 3, 4]]]] - - Here's another example: - -@@ -320,8 +320,8 @@ The next plot is the famous Klein bottle (do not type the ``....:``):: - - sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") - 5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0 -- sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -- -5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0) -+ sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)").sage() -+ -5*(cos(1/2*x)*cos(y) + sin(1/2*x)*sin(2*y) + 3.0)*sin(x) - sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") - 5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y)) - sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested -diff --git a/src/doc/en/tutorial/tour_algebra.rst b/src/doc/en/tutorial/tour_algebra.rst -index 2e872cc9059..225606a729f 100644 ---- a/src/doc/en/tutorial/tour_algebra.rst -+++ b/src/doc/en/tutorial/tour_algebra.rst -@@ -216,9 +216,12 @@ the notation :math:`x=x_{1}`, :math:`y=x_{2}`): - - :: - -- sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - This is hard to read, but it says that - -@@ -232,8 +235,8 @@ Laplace transform of the second equation: - :: - - sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: lde2 = de2.laplace("t","s"); lde2.sage() -+ s^2*laplace(y(t), t, s) - s*y(0) - 2*laplace(x(t), t, s) + 2*laplace(y(t), t, s) - D[0](y)(0) - - This says - -diff --git a/src/doc/es/tutorial/tour_algebra.rst b/src/doc/es/tutorial/tour_algebra.rst -index dc1a7a96719..42c818fe8d7 100644 ---- a/src/doc/es/tutorial/tour_algebra.rst -+++ b/src/doc/es/tutorial/tour_algebra.rst -@@ -197,8 +197,8 @@ la notación :math:`x=x_{1}`, :math:`y=x_{2}`): - :: - - sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: lde1 = de1.laplace("t","s"); lde1.sage() -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - El resultado puede ser difícil de leer, pero significa que - -@@ -211,9 +211,12 @@ Toma la transformada de Laplace de la segunda ecuación: - - :: - -- sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - Esto dice - -diff --git a/src/doc/fr/tutorial/interfaces.rst b/src/doc/fr/tutorial/interfaces.rst -index 1cd662f3083..2cb14e772eb 100644 ---- a/src/doc/fr/tutorial/interfaces.rst -+++ b/src/doc/fr/tutorial/interfaces.rst -@@ -273,8 +273,8 @@ pour :math:`i,j=1,\ldots,4`. - matrix([1,1/2,1/3,1/4],[0,0,0,0],[0,0,0,0],[0,0,0,0]) - sage: A.eigenvalues() - [[0,4],[3,1]] -- sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ sage: A.eigenvectors().sage() -+ [[[0, 4], [3, 1]], [[[1, 0, 0, -4], [0, 1, 0, -2], [0, 0, 1, -4/3]], [[1, 2, 3, 4]]]] - - Un deuxième exemple : - -@@ -334,12 +334,9 @@ Et la fameuse bouteille de Klein (n'entrez pas les ``....:``): - - :: - -- sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -- 5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0 -- sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -- -5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0) -- sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") -- 5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y)) -+ sage: _ = maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -+ sage: _ = maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -+ sage: _ = maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") - sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested - ....: "[y, -%pi, %pi]", "['grid, 40, 40]", - ....: '[plot_format, openmath]') -diff --git a/src/doc/fr/tutorial/tour_algebra.rst b/src/doc/fr/tutorial/tour_algebra.rst -index 658894b2e8b..267bd1dd4f9 100644 ---- a/src/doc/fr/tutorial/tour_algebra.rst -+++ b/src/doc/fr/tutorial/tour_algebra.rst -@@ -182,8 +182,8 @@ Solution : Considérons la transformée de Laplace de la première équation - :: - - sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: lde1 = de1.laplace("t","s"); lde1.sage() -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - La réponse n'est pas très lisible, mais elle signifie que - -@@ -196,9 +196,12 @@ la seconde équation : - - :: - -- sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - Ceci signifie - -diff --git a/src/doc/it/tutorial/tour_algebra.rst b/src/doc/it/tutorial/tour_algebra.rst -index 5a5311e9b1c..cde427d3090 100644 ---- a/src/doc/it/tutorial/tour_algebra.rst -+++ b/src/doc/it/tutorial/tour_algebra.rst -@@ -183,8 +183,8 @@ la notazione :math:`x=x_{1}`, :math:`y=x_{2}`: - :: - - sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: lde1 = de1.laplace("t","s"); lde1.sage() -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - Questo è di difficile lettura, ma dice che - -@@ -197,9 +197,12 @@ trasformata di Laplace della seconda equazione: - - :: - -- sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - che significa - -diff --git a/src/doc/ja/tutorial/interfaces.rst b/src/doc/ja/tutorial/interfaces.rst -index 9c16b2eba08..892fc6f852f 100644 ---- a/src/doc/ja/tutorial/interfaces.rst -+++ b/src/doc/ja/tutorial/interfaces.rst -@@ -239,8 +239,8 @@ Sage/Maximaインターフェイスの使い方を例示するため,ここで - matrix([1,1/2,1/3,1/4],[0,0,0,0],[0,0,0,0],[0,0,0,0]) - sage: A.eigenvalues() - [[0,4],[3,1]] -- sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ sage: A.eigenvectors().sage() -+ [[[0, 4], [3, 1]], [[[1, 0, 0, -4], [0, 1, 0, -2], [0, 0, 1, -4/3]], [[1, 2, 3, 4]]]] - - - 使用例をもう一つ示す: -@@ -299,11 +299,8 @@ Sage/Maximaインターフェイスの使い方を例示するため,ここで - - :: - -- sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -- 5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0 -- sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -- -5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0) -- sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") -- 5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y)) -+ sage: _ = maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -+ sage: _ = maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -+ sage: _ = maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") - sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested - ....: "[y, -%pi, %pi]", "['grid, 40, 40]", '[plot_format, openmath]') -diff --git a/src/doc/ja/tutorial/tour_algebra.rst b/src/doc/ja/tutorial/tour_algebra.rst -index 784fd0d5c40..746cbb4475c 100644 ---- a/src/doc/ja/tutorial/tour_algebra.rst -+++ b/src/doc/ja/tutorial/tour_algebra.rst -@@ -213,8 +213,8 @@ Sageを使って常微分方程式を研究することもできる. :math:`x' - :: - - sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: lde1 = de1.laplace("t","s"); lde1.sage() -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - この出力は読みにくいけれども,意味しているのは - -@@ -226,9 +226,12 @@ Sageを使って常微分方程式を研究することもできる. :math:`x' - - :: - -- sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - 意味するところは - -diff --git a/src/doc/pt/tutorial/interfaces.rst b/src/doc/pt/tutorial/interfaces.rst -index 386ef6456e5..5badb31ab35 100644 ---- a/src/doc/pt/tutorial/interfaces.rst -+++ b/src/doc/pt/tutorial/interfaces.rst -@@ -269,8 +269,8 @@ entrada :math:`i,j` é :math:`i/j`, para :math:`i,j=1,\ldots,4`. - matrix([1,1/2,1/3,1/4],[0,0,0,0],[0,0,0,0],[0,0,0,0]) - sage: A.eigenvalues() - [[0,4],[3,1]] -- sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ sage: A.eigenvectors().sage() -+ [[[0, 4], [3, 1]], [[[1, 0, 0, -4], [0, 1, 0, -2], [0, 0, 1, -4/3]], [[1, 2, 3, 4]]]] - - Aqui vai outro exemplo: - -@@ -330,13 +330,10 @@ E agora a famosa garrafa de Klein: - - :: - -- sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)" -+ sage: _ = maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)" - ....: "- 10.0") -- 5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0 -- sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -- -5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0) -- sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") -- 5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y)) -+ sage: _ = maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -+ sage: _ = maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") - sage: maxima.plot3d("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested - ....: "[y, -%pi, %pi]", "['grid, 40, 40]", - ....: '[plot_format, openmath]') -diff --git a/src/doc/pt/tutorial/tour_algebra.rst b/src/doc/pt/tutorial/tour_algebra.rst -index baeb37b1c71..170e0d8a367 100644 ---- a/src/doc/pt/tutorial/tour_algebra.rst -+++ b/src/doc/pt/tutorial/tour_algebra.rst -@@ -205,8 +205,8 @@ equação (usando a notação :math:`x=x_{1}`, :math:`y=x_{2}`): - :: - - sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: lde1 = de1.laplace("t","s"); lde1.sage() -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - O resultado é um pouco difícil de ler, mas diz que - -@@ -219,9 +219,12 @@ calcule a transformada de Laplace da segunda equação: - - :: - -- sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - O resultado significa que - -diff --git a/src/doc/ru/tutorial/interfaces.rst b/src/doc/ru/tutorial/interfaces.rst -index ea84527f478..061818ca4a5 100644 ---- a/src/doc/ru/tutorial/interfaces.rst -+++ b/src/doc/ru/tutorial/interfaces.rst -@@ -264,8 +264,8 @@ gnuplot, имеет методы решения и манипуляции мат - matrix([1,1/2,1/3,1/4],[0,0,0,0],[0,0,0,0],[0,0,0,0]) - sage: A.eigenvalues() - [[0,4],[3,1]] -- sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ sage: A.eigenvectors().sage() -+ [[[0, 4], [3, 1]], [[[1, 0, 0, -4], [0, 1, 0, -2], [0, 0, 1, -4/3]], [[1, 2, 3, 4]]]] - - Вот другой пример: - -@@ -323,12 +323,9 @@ gnuplot, имеет методы решения и манипуляции мат - - :: - -- sage: maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -- 5*cos(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0)-10.0 -- sage: maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -- -5*sin(x)*(sin(x/2)*sin(2*y)+cos(x/2)*cos(y)+3.0) -- sage: maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") -- 5*(cos(x/2)*sin(2*y)-sin(x/2)*cos(y)) -+ sage: _ = maxima("expr_1: 5*cos(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0) - 10.0") -+ sage: _ = maxima("expr_2: -5*sin(x)*(cos(x/2)*cos(y) + sin(x/2)*sin(2*y)+ 3.0)") -+ sage: _ = maxima("expr_3: 5*(-sin(x/2)*cos(y) + cos(x/2)*sin(2*y))") - sage: maxima.plot3d ("[expr_1, expr_2, expr_3]", "[x, -%pi, %pi]", # not tested - ....: "[y, -%pi, %pi]", "['grid, 40, 40]", - ....: '[plot_format, openmath]') -diff --git a/src/doc/ru/tutorial/tour_algebra.rst b/src/doc/ru/tutorial/tour_algebra.rst -index 9f08c41d118..bc0d4926f83 100644 ---- a/src/doc/ru/tutorial/tour_algebra.rst -+++ b/src/doc/ru/tutorial/tour_algebra.rst -@@ -199,8 +199,8 @@ Sage может использоваться для решения диффер - :: - - sage: de1 = maxima("2*diff(x(t),t, 2) + 6*x(t) - 2*y(t)") -- sage: lde1 = de1.laplace("t","s"); lde1 -- 2*((-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s) -2*'laplace(y(t),t,s)+6*'laplace(x(t),t,s) -+ sage: lde1 = de1.laplace("t","s"); lde1.sage() -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - Данный результат тяжело читаем, однако должен быть понят как - -@@ -210,9 +210,12 @@ Sage может использоваться для решения диффер - - :: - -- sage: de2 = maxima("diff(y(t),t, 2) + 2*y(t) - 2*x(t)") -- sage: lde2 = de2.laplace("t","s"); lde2 -- (-%at('diff(y(t),t,1),t = 0))+s^2*'laplace(y(t),t,s) +2*'laplace(y(t),t,s)-2*'laplace(x(t),t,s) -y(0)*s -+ sage: t,s = SR.var('t,s') -+ sage: x = function('x') -+ sage: y = function('y') -+ sage: f = 2*x(t).diff(t,2) + 6*x(t) - 2*y(t) -+ sage: f.laplace(t,s) -+ 2*s^2*laplace(x(t), t, s) - 2*s*x(0) + 6*laplace(x(t), t, s) - 2*laplace(y(t), t, s) - 2*D[0](x)(0) - - Результат: - -diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py -index c707530b9f1..f7ce8b95727 100644 ---- a/src/sage/calculus/calculus.py -+++ b/src/sage/calculus/calculus.py -@@ -783,7 +783,7 @@ def nintegral(ex, x, a, b, - Now numerically integrating, we see why the answer is wrong:: - - sage: f.nintegrate(x,0,1) -- (-480.0000000000001, 5.32907051820075...e-12, 21, 0) -+ (-480.000000000000..., 5.32907051820075...e-12, 21, 0) - - It is just because every floating point evaluation of return -480.0 - in floating point. -@@ -1336,7 +1336,7 @@ def limit(ex, dir=None, taylor=False, algorithm='maxima', **argv): - sage: limit(floor(x), x=0, dir='+') - 0 - sage: limit(floor(x), x=0) -- und -+ ...nd - - Maxima gives the right answer here, too, showing - that :trac:`4142` is fixed:: -diff --git a/src/sage/calculus/desolvers.py b/src/sage/calculus/desolvers.py -index e0c31925f44..6e91f7e2bb4 100644 ---- a/src/sage/calculus/desolvers.py -+++ b/src/sage/calculus/desolvers.py -@@ -295,7 +295,7 @@ def desolve(de, dvar, ics=None, ivar=None, show_method=False, contrib_ode=False, - Clairaut equation: general and singular solutions:: - - sage: desolve(diff(y,x)^2+x*diff(y,x)-y==0,y,contrib_ode=True,show_method=True) -- [[y(x) == _C^2 + _C*x, y(x) == -1/4*x^2], 'clairault'] -+ [[y(x) == _C^2 + _C*x, y(x) == -1/4*x^2], 'clairau...'] - - For equations involving more variables we specify an independent variable:: - -@@ -1325,7 +1325,7 @@ def desolve_rk4(de, dvar, ics=None, ivar=None, end_points=None, step=0.1, output - - sage: x,y = var('x,y') - sage: desolve_rk4(x*y*(2-y),y,ics=[0,1],end_points=1,step=0.5) -- [[0, 1], [0.5, 1.12419127424558], [1.0, 1.461590162288825]] -+ [[0, 1], [0.5, 1.12419127424558], [1.0, 1.46159016228882...]] - - Variant 1 for input - we can pass ODE in the form used by - desolve function In this example we integrate backwards, since -@@ -1333,7 +1333,7 @@ def desolve_rk4(de, dvar, ics=None, ivar=None, end_points=None, step=0.1, output - - sage: y = function('y')(x) - sage: desolve_rk4(diff(y,x)+y*(y-1) == x-2,y,ics=[1,1],step=0.5, end_points=0) -- [[0.0, 8.904257108962112], [0.5, 1.909327945361535], [1, 1]] -+ [[0.0, 8.904257108962112], [0.5, 1.90932794536153...], [1, 1]] - - Here we show how to plot simple pictures. For more advanced - applications use list_plot instead. To see the resulting picture -diff --git a/src/sage/functions/bessel.py b/src/sage/functions/bessel.py -index 95405c3d72f..48607c49f56 100644 ---- a/src/sage/functions/bessel.py -+++ b/src/sage/functions/bessel.py -@@ -293,9 +293,6 @@ class Function_Bessel_J(BuiltinFunction): - sage: f = bessel_J(2, x) - sage: f.integrate(x) - 1/24*x^3*hypergeometric((3/2,), (5/2, 3), -1/4*x^2) -- sage: m = maxima(bessel_J(2, x)) -- sage: m.integrate(x) -- (hypergeometric([3/2],[5/2,3],-_SAGE_VAR_x^2/4)*_SAGE_VAR_x^3)/24 - - Visualization (set plot_points to a higher value to get more detail):: - -@@ -1118,11 +1115,11 @@ def Bessel(*args, **kwds): - Conversion to other systems:: - - sage: x,y = var('x,y') -- sage: f = maxima(Bessel(typ='K')(x,y)) -- sage: f.derivative('_SAGE_VAR_x') -- (%pi*csc(%pi*_SAGE_VAR_x) *('diff(bessel_i(-_SAGE_VAR_x,_SAGE_VAR_y),_SAGE_VAR_x,1) -'diff(bessel_i(_SAGE_VAR_x,_SAGE_VAR_y),_SAGE_VAR_x,1))) /2 -%pi*bessel_k(_SAGE_VAR_x,_SAGE_VAR_y)*cot(%pi*_SAGE_VAR_x) -- sage: f.derivative('_SAGE_VAR_y') -- -(bessel_k(_SAGE_VAR_x+1,_SAGE_VAR_y)+bessel_k(_SAGE_VAR_x-1, _SAGE_VAR_y))/2 -+ sage: f = Bessel(typ='K')(x,y) -+ sage: expected = f.derivative(y) -+ sage: actual = maxima(f).derivative('_SAGE_VAR_y').sage() -+ sage: bool(actual == expected) -+ True - - Compute the particular solution to Bessel's Differential Equation that - satisfies `y(1) = 1` and `y'(1) = 1`, then verify the initial conditions -diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py -index 752b8422fc6..fc2fb5875ce 100644 ---- a/src/sage/functions/hypergeometric.py -+++ b/src/sage/functions/hypergeometric.py -@@ -19,8 +19,11 @@ - sage: sum(((2*I)^x/(x^3 + 1)*(1/4)^x), x, 0, oo) - hypergeometric((1, 1, -1/2*I*sqrt(3) - 1/2, 1/2*I*sqrt(3) - 1/2),... - (2, -1/2*I*sqrt(3) + 1/2, 1/2*I*sqrt(3) + 1/2), 1/2*I) -- sage: sum((-1)^x/((2*x + 1)*factorial(2*x + 1)), x, 0, oo) -+ sage: res = sum((-1)^x/((2*x + 1)*factorial(2*x + 1)), x, 0, oo) -+ sage: res # not tested - depends on maxima version - hypergeometric((1/2,), (3/2, 3/2), -1/4) -+ sage: res in [hypergeometric((1/2,), (3/2, 3/2), -1/4), sin_integral(1)] -+ True - - Simplification (note that ``simplify_full`` does not yet call - ``simplify_hypergeometric``):: -diff --git a/src/sage/functions/orthogonal_polys.py b/src/sage/functions/orthogonal_polys.py -index 7398c763971..6127f5d9490 100644 ---- a/src/sage/functions/orthogonal_polys.py -+++ b/src/sage/functions/orthogonal_polys.py -@@ -974,7 +974,7 @@ def __init__(self): - sage: chebyshev_U(x, x)._sympy_() - chebyshevu(x, x) - sage: maxima(chebyshev_U(2,x, hold=True)) -- 3*((-(8*(1-_SAGE_VAR_x))/3)+(4*(1-_SAGE_VAR_x)^2)/3+1) -+ 3*(...-...(8*(1-_SAGE_VAR_x))/3)+(4*(1-_SAGE_VAR_x)^2)/3+1) - sage: maxima(chebyshev_U(n,x, hold=True)) - chebyshev_u(_SAGE_VAR_n,_SAGE_VAR_x) - """ -diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py -index 3e2570e889e..5a0f06a27f8 100644 ---- a/src/sage/functions/other.py -+++ b/src/sage/functions/other.py -@@ -498,10 +498,10 @@ def __init__(self): - - sage: var('x') - x -- sage: a = floor(5.4 + x); a -- floor(x + 5.40000000000000) -+ sage: a = floor(5.25 + x); a -+ floor(x + 5.25000000000000) - sage: a.simplify() -- floor(x + 0.4000000000000004) + 5 -+ floor(x + 0.25) + 5 - sage: a(x=2) - 7 - -diff --git a/src/sage/functions/special.py b/src/sage/functions/special.py -index faa6a73cc7e..d72e780836a 100644 ---- a/src/sage/functions/special.py -+++ b/src/sage/functions/special.py -@@ -455,9 +455,8 @@ class EllipticE(BuiltinFunction): - sage: z = var("z") - sage: elliptic_e(z, 1) - elliptic_e(z, 1) -- sage: # this is still wrong: must be abs(sin(z)) + 2*round(z/pi) -- sage: elliptic_e(z, 1).simplify() -- 2*round(z/pi) + sin(z) -+ sage: elliptic_e(z, 1).simplify() # not tested - gives wrong answer with maxima < 5.47 -+ 2*round(z/pi) - sin(pi*round(z/pi) - z) - sage: elliptic_e(z, 0) - z - sage: elliptic_e(0.5, 0.1) # abs tol 2e-15 -diff --git a/src/sage/interfaces/interface.py b/src/sage/interfaces/interface.py -index 6baa4eb597c..f8237d3ad94 100644 ---- a/src/sage/interfaces/interface.py -+++ b/src/sage/interfaces/interface.py -@@ -1579,20 +1579,20 @@ def _mul_(self, right): - :: - - sage: f = maxima.function('x','sin(x)') -- sage: g = maxima('-cos(x)') # not a function! -+ sage: g = maxima('cos(x)') # not a function! - sage: f*g -- -cos(x)*sin(x) -+ cos(x)*sin(x) - sage: _(2) -- -cos(2)*sin(2) -+ cos(2)*sin(2) - - :: - - sage: f = maxima.function('x','sin(x)') -- sage: g = maxima('-cos(x)') -+ sage: g = maxima('cos(x)') - sage: g*f -- -cos(x)*sin(x) -+ cos(x)*sin(x) - sage: _(2) -- -cos(2)*sin(2) -+ cos(2)*sin(2) - sage: 2*f - 2*sin(x) - """ -@@ -1612,20 +1612,20 @@ def _div_(self, right): - :: - - sage: f = maxima.function('x','sin(x)') -- sage: g = maxima('-cos(x)') -+ sage: g = maxima('cos(x)') - sage: f/g -- -sin(x)/cos(x) -+ sin(x)/cos(x) - sage: _(2) -- -sin(2)/cos(2) -+ sin(2)/cos(2) - - :: - - sage: f = maxima.function('x','sin(x)') -- sage: g = maxima('-cos(x)') -+ sage: g = maxima('cos(x)') - sage: g/f -- -cos(x)/sin(x) -+ cos(x)/sin(x) - sage: _(2) -- -cos(2)/sin(2) -+ cos(2)/sin(2) - sage: 2/f - 2/sin(x) - """ -diff --git a/src/sage/interfaces/maxima.py b/src/sage/interfaces/maxima.py -index 4829560f98b..959e75459a2 100644 ---- a/src/sage/interfaces/maxima.py -+++ b/src/sage/interfaces/maxima.py -@@ -49,9 +49,14 @@ - - :: - -+ sage: x,y = SR.var('x,y') - sage: F = maxima.factor('x^5 - y^5') -- sage: F -- -(y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4) -+ sage: F # not tested - depends on maxima version -+ -((y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4)) -+ sage: actual = F.sage() -+ sage: expected = -(y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4) -+ sage: bool(actual == expected) -+ True - sage: type(F) - - -@@ -71,18 +76,19 @@ - - :: - -+ sage: F = maxima('x * y') - sage: repr(F) -- '-(y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4)' -+ 'x*y' - sage: F.str() -- '-(y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4)' -+ 'x*y' - - The ``maxima.eval`` command evaluates an expression in - maxima and returns the result as a *string* not a maxima object. - - :: - -- sage: print(maxima.eval('factor(x^5 - y^5)')) -- -(y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4) -+ sage: print(maxima.eval('factor(x^5 - 1)')) -+ (x-1)*(x^4+x^3+x^2+x+1) - - We can create the polynomial `f` as a Maxima polynomial, - then call the factor method on it. Notice that the notation -@@ -91,11 +97,11 @@ - - :: - -- sage: f = maxima('x^5 - y^5') -+ sage: f = maxima('x^5 + y^5') - sage: f^2 -- (x^5-y^5)^2 -+ (y^5+x^5)^2 - sage: f.factor() -- -(y-x)*(y^4+x*y^3+x^2*y^2+x^3*y+x^4) -+ (y+x)*(y^4-x*y^3+x^2*y^2-x^3*y+x^4) - - Control-C interruption works well with the maxima interface, - because of the excellent implementation of maxima. For example, try -@@ -161,20 +167,20 @@ - - sage: eqn = maxima(['a+b*c=1', 'b-a*c=0', 'a+b=5']) - sage: s = eqn.solve('[a,b,c]'); s -- [[a = -(sqrt(79)*%i-11)/4,b = (sqrt(79)*%i+9)/4, c = (sqrt(79)*%i+1)/10], [a = (sqrt(79)*%i+11)/4,b = -(sqrt(79)*%i-9)/4, c = -(sqrt(79)*%i-1)/10]] -+ [[a = -...(sqrt(79)*%i-11)/4...,b = (sqrt(79)*%i+9)/4, c = (sqrt(79)*%i+1)/10], [a = (sqrt(79)*%i+11)/4,b = -...(sqrt(79)*%i-9)/4..., c = -...(sqrt(79)*%i-1)/10...]] - - Here is an example of solving an algebraic equation:: - - sage: maxima('x^2+y^2=1').solve('y') - [y = -sqrt(1-x^2),y = sqrt(1-x^2)] - sage: maxima('x^2 + y^2 = (x^2 - y^2)/sqrt(x^2 + y^2)').solve('y') -- [y = -sqrt(((-y^2)-x^2)*sqrt(y^2+x^2)+x^2), y = sqrt(((-y^2)-x^2)*sqrt(y^2+x^2)+x^2)] -+ [y = -sqrt((...-y^2...-x^2)*sqrt(y^2+x^2)+x^2), y = sqrt((...-y^2...-x^2)*sqrt(y^2+x^2)+x^2)] - - - 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=-...{{\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] - - To have the above appear onscreen via ``xdvi``, type - ``view(s)``. (TODO: For OS X should create pdf output -@@ -200,7 +206,7 @@ - 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) - 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) -+ (((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) - - :: - -@@ -234,7 +240,7 @@ - sage: A.eigenvalues() - [[0,4],[3,1]] - sage: A.eigenvectors() -- [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-4/3]],[[1,2,3,4]]]] -+ [[[0,4],[3,1]],[[[1,0,0,-4],[0,1,0,-2],[0,0,1,-...4/3...]],[[1,2,3,4]]]] - - We can also compute the echelon form in Sage:: - -@@ -287,12 +293,12 @@ - :: - - sage: maxima("laplace(diff(x(t),t,2),t,s)") -- (-%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s -+ ...-...%at('diff(x(t),t,1),t = 0))+s^2*'laplace(x(t),t,s)-x(0)*s - - It is difficult to read some of these without the 2d - representation:: - -- sage: print(maxima("laplace(diff(x(t),t,2),t,s)")) -+ sage: print(maxima("laplace(diff(x(t),t,2),t,s)")) # not tested - depends on maxima version - ! - d ! 2 - (- -- (x(t))! ) + s laplace(x(t), t, s) - x(0) s -@@ -396,7 +402,7 @@ - - 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 -+ -...{{i\,e^{3\,i\,x}}\over{6}}...-{{i\,e^{i\,x}}\over{2}}+c - - Long Input - ---------- -@@ -684,7 +690,7 @@ def _expect_expr(self, expr=None, timeout=None): - sage: maxima.assume('a>0') - [a > 0] - sage: maxima('integrate(1/(x^3*(a+b*x)^(1/3)),x)') -- (-(b^2*log((b*x+a)^(2/3)+a^(1/3)*(b*x+a)^(1/3)+a^(2/3)))/(9*a^(7/3))) +(2*b^2*atan((2*(b*x+a)^(1/3)+a^(1/3))/(sqrt(3)*a^(1/3))))/(3^(3/2)*a^(7/3)) +(2*b^2*log((b*x+a)^(1/3)-a^(1/3)))/(9*a^(7/3)) +(4*b^2*(b*x+a)^(5/3)-7*a*b^2*(b*x+a)^(2/3)) /(6*a^2*(b*x+a)^2-12*a^3*(b*x+a)+6*a^4) -+ ...-...(b^2*log((b*x+a)^(2/3)+a^(1/3)*(b*x+a)^(1/3)+a^(2/3)))/(9*a^(7/3))) +(2*b^2*atan((2*(b*x+a)^(1/3)+a^(1/3))/(sqrt(3)*a^(1/3))))/(3^(3/2)*a^(7/3)) +(2*b^2*log((b*x+a)^(1/3)-a^(1/3)))/(9*a^(7/3)) +(4*b^2*(b*x+a)^(5/3)-7*a*b^2*(b*x+a)^(2/3)) /(6*a^2*(b*x+a)^2-12*a^3*(b*x+a)+6*a^4) - sage: maxima('integrate(x^n,x)') - Traceback (most recent call last): - ... -diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py -index 4f6306ba4fc..aecfcba5e23 100644 ---- a/src/sage/interfaces/maxima_abstract.py -+++ b/src/sage/interfaces/maxima_abstract.py -@@ -856,9 +856,9 @@ def de_solve(self, de, vars, ics=None): - sage: maxima.de_solve('diff(y,x,2) + 3*x = y', ['x','y']) - y = %k1*%e^x+%k2*%e^-x+3*x - sage: maxima.de_solve('diff(y,x) + 3*x = y', ['x','y']) -- y = (%c-3*((-x)-1)*%e^-x)*%e^x -+ y = (%c-3*(...-x...-1)*%e^-x)*%e^x - 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*(5*%e^x-3*%e*x-3*%e)... - """ - if not isinstance(vars, str): - str_vars = '%s, %s'%(vars[1], vars[0]) -@@ -1572,8 +1572,9 @@ def integral(self, var='x', min=None, max=None): - - :: - -- sage: f = maxima('exp(x^2)').integral('x',0,1); f -- -(sqrt(%pi)*%i*erf(%i))/2 -+ sage: f = maxima('exp(x^2)').integral('x',0,1) -+ sage: f.sage() -+ -1/2*I*sqrt(pi)*erf(I) - sage: f.numer() - 1.46265174590718... - """ -diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py -index bba8504aa92..cd1be891872 100644 ---- a/src/sage/interfaces/maxima_lib.py -+++ b/src/sage/interfaces/maxima_lib.py -@@ -134,10 +134,11 @@ - else: - ecl_eval("(require 'maxima)") - ecl_eval("(in-package :maxima)") --ecl_eval("(setq $nolabels t))") --ecl_eval("(defvar *MAXIMA-LANG-SUBDIR* NIL)") - ecl_eval("(set-locale-subdir)") - -+# This workaround has to happen before any call to (set-pathnames). -+# To be safe please do not call anything other than -+# (set-locale-subdir) before this block. - try: - ecl_eval("(set-pathnames)") - except RuntimeError: -@@ -154,6 +155,8 @@ - # Call `(set-pathnames)` again to complete its job. - ecl_eval("(set-pathnames)") - -+ecl_eval("(initialize-runtime-globals)") -+ecl_eval("(setq $nolabels t))") - ecl_eval("(defun add-lineinfo (x) x)") - ecl_eval('(defun principal nil (cond ($noprincipal (diverg)) ((not pcprntd) (merror "Divergent Integral"))))') - ecl_eval("(remprop 'mfactorial 'grind)") # don't use ! for factorials (#11539) -diff --git a/src/sage/matrix/matrix1.pyx b/src/sage/matrix/matrix1.pyx -index f38c429d994..47df9fc80a5 100644 ---- a/src/sage/matrix/matrix1.pyx -+++ b/src/sage/matrix/matrix1.pyx -@@ -248,7 +248,7 @@ cdef class Matrix(Matrix0): - sage: a = maxima(m); a - matrix([0,1,2],[3,4,5],[6,7,8]) - sage: a.charpoly('x').expand() -- (-x^3)+12*x^2+18*x -+ ...-x^3...+12*x^2+18*x - sage: m.charpoly() - x^3 - 12*x^2 - 18*x - """ -diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx -index 0532ea0c9bd..6ea2bd4473d 100644 ---- a/src/sage/modules/free_module_element.pyx -+++ b/src/sage/modules/free_module_element.pyx -@@ -4053,7 +4053,7 @@ cdef class FreeModuleElement(Vector): # abstract base class - sage: t=var('t') - sage: r=vector([t,t^2,sin(t)]) - sage: vec,answers=r.nintegral(t,0,1) -- sage: vec -+ sage: vec # abs tol 1e-15 - (0.5, 0.3333333333333334, 0.4596976941318602) - sage: type(vec) - -diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py -index a72ab547c76..51dcaf8d847 100644 ---- a/src/sage/symbolic/relation.py -+++ b/src/sage/symbolic/relation.py -@@ -657,7 +657,7 @@ def solve(f, *args, **kwds): - equations, at times approximations will be given by Maxima, due to the - underlying algorithm:: - -- sage: sols = solve([x^3==y,y^2==x], [x,y]); sols[-1], sols[0] -+ sage: sols = solve([x^3==y,y^2==x], [x,y]); sols[-1], sols[0] # abs tol 1e-15 - ([x == 0, y == 0], - [x == (0.3090169943749475 + 0.9510565162951535*I), - y == (-0.8090169943749475 - 0.5877852522924731*I)]) diff --git a/srcpkgs/sagemath/patches/35825-singular_4.3.2p2.patch b/srcpkgs/sagemath/patches/35825-singular_4.3.2p2.patch deleted file mode 100644 index 4d01eeabee6c9..0000000000000 --- a/srcpkgs/sagemath/patches/35825-singular_4.3.2p2.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py -index ea027e8a716..a1fe036917e 100644 ---- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py -+++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py -@@ -1251,7 +1251,7 @@ def leinartas_decomposition(self): - sage: H = R(f.denominator()) - sage: ff = FFPD(G, H.factor()) - sage: decomp = ff.leinartas_decomposition() -- sage: decomp -+ sage: decomp # random - non canonical depends on singular version - (0, []) + - (-(x*y^2*sin(x) + x^2*y + x*y + y*sin(x) + x)*y, [(y, 1)]) + - ((x*y^2*sin(x) + x^2*y + x*y + y*sin(x) + x)*x*y, [(x*y + 1, 1)]) + -@@ -1611,9 +1611,7 @@ def asymptotics(self, p, alpha, N, asy_var=None, numerical=0, - (-16, [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 2)]) - sage: alpha = [3, 3, 2] - sage: decomp = F.asymptotic_decomposition(alpha); decomp -- (0, []) + -- (16*r*(3/x - 2/z) + 16/x - 16/z, -- [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)]) -+ (0, []) + (..., [(x + 2*y + z - 4, 1), (2*x + y + z - 4, 1)]) - sage: F1 = decomp[1] - sage: p = {x: 1, y: 1, z: 1} - sage: asy = F1.asymptotics(p, alpha, 2, verbose=True) # long time diff --git a/srcpkgs/sagemath/patches/35826-numpy_1.25.0.patch b/srcpkgs/sagemath/patches/35826-numpy_1.25.0.patch deleted file mode 100644 index 426f841ebbab6..0000000000000 --- a/srcpkgs/sagemath/patches/35826-numpy_1.25.0.patch +++ /dev/null @@ -1,83 +0,0 @@ -diff --git a/src/sage/calculus/desolvers.py b/src/sage/calculus/desolvers.py -index 55ed3a0fe10..4cfa22a97e4 100644 ---- a/src/sage/calculus/desolvers.py -+++ b/src/sage/calculus/desolvers.py -@@ -1598,7 +1598,7 @@ def desolve_odeint(des, ics, times, dvars, ivar=None, compute_jac=False, args=() - sage: ic=epsilon - sage: t=srange(0,2/epsilon,1) - sage: sol=desolve_odeint(f,ic,t,y,rtol=1e-9,atol=1e-10,compute_jac=True) -- sage: p=points(zip(t,sol)) -+ sage: p=points(zip(t,sol[:,0])) - sage: p.show() - - Another stiff system with some optional parameters with no -@@ -1637,7 +1637,7 @@ def desolve_odeint_inner(ivar): - J = fast_float(J, dvar, ivar) - - def Dfun(y, t): -- return [J(y, t)] -+ return [J(y.item(), t)] - - # n-dimensional systems: - else: -diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx -index d5402d5c3b0..a00912951c5 100644 ---- a/src/sage/matrix/matrix2.pyx -+++ b/src/sage/matrix/matrix2.pyx -@@ -430,12 +430,12 @@ cdef class Matrix(Matrix1): - try: - return self.transpose().solve_right(B, check=check) - except ValueError as e: -- raise ValueError(str(e).replace('row', 'column')) -+ raise e.__class__(str(e).replace('row', 'column')) - else: - try: - return self.transpose().solve_right(B.transpose(), check=check).transpose() - except ValueError as e: -- raise ValueError(str(e).replace('row', 'column')) -+ raise e.__class__(str(e).replace('row', 'column')) - - def solve_right(self, B, check=True): - r""" -diff --git a/src/sage/matrix/matrix_numpy_dense.pyx b/src/sage/matrix/matrix_numpy_dense.pyx -index 5b75ed133ff..17867f9a65c 100644 ---- a/src/sage/matrix/matrix_numpy_dense.pyx -+++ b/src/sage/matrix/matrix_numpy_dense.pyx -@@ -382,8 +382,9 @@ cdef class Matrix_numpy_dense(Matrix_dense): - sage: m = matrix(RDF,[[1,2],[3,4]]) - sage: n = m.numpy() - sage: import numpy -- sage: numpy.linalg.eig(n) -- (array([-0.37228132, 5.37228132]), array([[-0.82456484, -0.41597356], -+ sage: tuple(numpy.linalg.eig(n)) -+ (array([-0.37228132, 5.37228132]), -+ array([[-0.82456484, -0.41597356], - [ 0.56576746, -0.90937671]])) - sage: m = matrix(RDF, 2, range(6)); m - [0.0 1.0 2.0] -diff --git a/src/sage/plot/plot3d/list_plot3d.py b/src/sage/plot/plot3d/list_plot3d.py -index d64b766001e..0158f856dbb 100644 ---- a/src/sage/plot/plot3d/list_plot3d.py -+++ b/src/sage/plot/plot3d/list_plot3d.py -@@ -602,7 +602,7 @@ def g(x, y): - from .parametric_surface import ParametricSurface - - def g(x, y): -- z = f([x, y]) -+ z = f([x, y]).item() - return (x, y, z) - G = ParametricSurface(g, (list(numpy.r_[xmin:xmax:num_points * j]), - list(numpy.r_[ymin:ymax:num_points * j])), -diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py -index e9bbfaa8370..9ba89595d70 100644 ---- a/src/sage/plot/plot3d/plot3d.py -+++ b/src/sage/plot/plot3d/plot3d.py -@@ -378,7 +378,7 @@ def to_cartesian(self, func, params=None): - ....: [ 0.16763356, 0.19993708, 0.31403568, 0.47359696, 0.55282422], - ....: [ 0.16763356, 0.25683223, 0.16649297, 0.10594339, 0.55282422]]) - sage: import scipy.interpolate -- sage: f=scipy.interpolate.RectBivariateSpline(v_phi,v_theta,m_r) -+ sage: f=scipy.interpolate.RectBivariateSpline(v_phi,v_theta,m_r).ev - sage: spherical_plot3d(f,(0,2*pi),(0,pi)) - Graphics3d Object - diff --git a/srcpkgs/sagemath/patches/35831-setuptools_68.0.0.patch b/srcpkgs/sagemath/patches/35831-setuptools_68.0.0.patch deleted file mode 100644 index dec7851e027d1..0000000000000 --- a/srcpkgs/sagemath/patches/35831-setuptools_68.0.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py -index 6800eb9a27b..8d0b43679ca 100644 ---- a/src/sage/all__sagemath_repl.py -+++ b/src/sage/all__sagemath_repl.py -@@ -44,7 +44,7 @@ - warnings.filterwarnings('ignore', category=DeprecationWarning, - message='pkg_resources is deprecated as an API|' - 'Deprecated call to `pkg_resources.declare_namespace(.*)`', -- module='pkg_resources') -+ module='pkg_resources|setuptools.sandbox') - warnings.filterwarnings('ignore', category=DeprecationWarning, - message='msvccompiler is deprecated and slated to be removed', - module='distutils.msvccompiler') diff --git a/srcpkgs/sagemath/patches/35934-singular_4.3.2p7.patch b/srcpkgs/sagemath/patches/35934-singular_4.3.2p7.patch new file mode 100644 index 0000000000000..f4b8772d5ab77 --- /dev/null +++ b/srcpkgs/sagemath/patches/35934-singular_4.3.2p7.patch @@ -0,0 +1,26 @@ +diff --git a/src/sage/sandpiles/sandpile.py b/src/sage/sandpiles/sandpile.py +index 02d2021b2fb..786b355cc17 100644 +--- a/src/sage/sandpiles/sandpile.py ++++ b/src/sage/sandpiles/sandpile.py +@@ -2495,7 +2495,7 @@ class Sandpile(DiGraph): + """ + R = self.ring() + I = self._unsaturated_ideal._singular_() +- self._ideal = R.ideal(I.sat(prod(R.gens())._singular_())[1]) ++ self._ideal = R.ideal(I.sat(prod(R.gens())._singular_())) + + def unsaturated_ideal(self): + r""" +diff --git a/src/sage/schemes/projective/projective_subscheme.py b/src/sage/schemes/projective/projective_subscheme.py +index e6caf19ba74..8b5481aaf38 100644 +--- a/src/sage/schemes/projective/projective_subscheme.py ++++ b/src/sage/schemes/projective/projective_subscheme.py +@@ -1004,7 +1004,7 @@ class AlgebraicScheme_subscheme_projective(AlgebraicScheme_subscheme): + sat = ff.elim__lib.sat + + max_ideal = S.ideal(z[n + 1: 2 * n + 2]) +- J_sat_gens = sat(J, max_ideal)[0] ++ J_sat_gens = sat(J, max_ideal) + J_sat = S.ideal(J_sat_gens) + L = J_sat.elimination_ideal(z[0: n + 1] + (z[-1],)) + return Pd.subscheme(L.change_ring(Rd)) diff --git a/srcpkgs/sagemath/patches/36006-gmp_6.3.0.patch b/srcpkgs/sagemath/patches/36006-gmp_6.3.0.patch new file mode 100644 index 0000000000000..dd054602ff608 --- /dev/null +++ b/srcpkgs/sagemath/patches/36006-gmp_6.3.0.patch @@ -0,0 +1,38 @@ +diff --git a/src/sage/ext/memory.pyx b/src/sage/ext/memory.pyx +index 1de6dedab82..c5b16168d04 100644 +--- a/src/sage/ext/memory.pyx ++++ b/src/sage/ext/memory.pyx +@@ -3,14 +3,14 @@ Low-level memory allocation functions + + TESTS: + +-Check that a ``MemoryError`` is raised if we try to allocate a ++Check that an error is raised if we try to allocate a + ridiculously large integer, see :trac:`15363`:: + +- sage: 2^(2^63-3) +- Traceback (most recent call last): +- ... +- OverflowError: exponent must be at most 2147483647 # 32-bit +- RuntimeError: Aborted # 64-bit ++ sage: try: ++ ....: 2^(2^63-3) ++ ....: except (OverflowError, RuntimeError, FloatingPointError): ++ ....: print ('Overflow error') ++ Overflow error + + AUTHORS: + +diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx +index 2cd080ddafa..090ab59cb28 100644 +--- a/src/sage/rings/integer.pyx ++++ b/src/sage/rings/integer.pyx +@@ -6654,7 +6654,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): + sage: try: + ....: print('Possible error output from gmp', flush=True) + ....: 1 << (2^60) +- ....: except (MemoryError, OverflowError, RuntimeError): ++ ....: except (MemoryError, OverflowError, RuntimeError, FloatingPointError): + ....: pass + ....: else: + ....: print("Failed to raise exception") diff --git a/srcpkgs/sagemath/patches/36018-singular_4.3.2p7.patch b/srcpkgs/sagemath/patches/36018-singular_4.3.2p7.patch new file mode 100644 index 0000000000000..184c908acabaa --- /dev/null +++ b/srcpkgs/sagemath/patches/36018-singular_4.3.2p7.patch @@ -0,0 +1,122 @@ +diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py +index b15cc1c602c..4b5c76e2bfa 100644 +--- a/src/sage/interfaces/singular.py ++++ b/src/sage/interfaces/singular.py +@@ -604,8 +604,7 @@ def eval(self, x, allow_semicolon=True, strip=True, **kwds): + sage: i = singular.ideal(['x^2','y^2','z^2']) + sage: s = i.std() + sage: singular.eval('hilb(%s)'%(s.name())) +- '// 1 t^0\n// -3 t^2\n// 3 t^4\n// -1 t^6\n\n// 1 t^0\n// +- 3 t^1\n// 3 t^2\n// 1 t^3\n// dimension (affine) = 0\n// ++ '...// dimension (affine) = 0\n// + degree (affine) = 8' + + :: +@@ -613,15 +612,7 @@ def eval(self, x, allow_semicolon=True, strip=True, **kwds): + sage: from sage.misc.verbose import set_verbose + sage: set_verbose(1) + sage: o = singular.eval('hilb(%s)'%(s.name())) +- // 1 t^0 +- // -3 t^2 +- // 3 t^4 +- // -1 t^6 +- // 1 t^0 +- // 3 t^1 +- // 3 t^2 +- // 1 t^3 +- // dimension (affine) = 0 ++ ...// dimension (affine) = 0 + // degree (affine) = 8 + + This is mainly useful if this method is called implicitly. Because +@@ -631,15 +622,7 @@ def eval(self, x, allow_semicolon=True, strip=True, **kwds): + :: + + sage: o = s.hilb() +- // 1 t^0 +- // -3 t^2 +- // 3 t^4 +- // -1 t^6 +- // 1 t^0 +- // 3 t^1 +- // 3 t^2 +- // 1 t^3 +- // dimension (affine) = 0 ++ ...// dimension (affine) = 0 + // degree (affine) = 8 + // ** right side is not a datum, assignment ignored + ... +diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx +index f40346d1fd0..c597c63aafe 100644 +--- a/src/sage/libs/singular/function.pyx ++++ b/src/sage/libs/singular/function.pyx +@@ -1241,32 +1241,22 @@ cdef class SingularFunction(SageObject): + sage: I = Ideal([x^3*y^2 + 3*x^2*y^2*z + y^3*z^2 + z^5]) + sage: I = Ideal(I.groebner_basis()) + sage: hilb = sage.libs.singular.function_factory.ff.hilb +- sage: hilb(I) # Singular will print // ** _ is no standard basis +- // ** _ is no standard basis +- // 1 t^0 +- // -1 t^5 +- +- // 1 t^0 +- // 1 t^1 +- // 1 t^2 +- // 1 t^3 +- // 1 t^4 +- // dimension (proj.) = 1 +- // degree (proj.) = 5 ++ sage: from sage.misc.sage_ostools import redirection ++ sage: out = tmp_filename() ++ sage: with redirection(sys.stdout, open(out, 'w')): ++ ....: hilb(I) # Singular will print // ** _ is no standard basis ++ sage: with open(out) as f: ++ ....: 'is no standard basis' in f.read() ++ True + + So we tell Singular that ``I`` is indeed a Groebner basis:: + +- sage: hilb(I,attributes={I:{'isSB':1}}) # no complaint from Singular +- // 1 t^0 +- // -1 t^5 +- +- // 1 t^0 +- // 1 t^1 +- // 1 t^2 +- // 1 t^3 +- // 1 t^4 +- // dimension (proj.) = 1 +- // degree (proj.) = 5 ++ sage: out = tmp_filename() ++ sage: with redirection(sys.stdout, open(out, 'w')): ++ ....: hilb(I,attributes={I:{'isSB':1}}) # no complaint from Singular ++ sage: with open(out) as f: ++ ....: 'is no standard basis' in f.read() ++ False + + + TESTS: +diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal.py b/src/sage/rings/polynomial/multi_polynomial_ideal.py +index c9753055fc7..90600f1e046 100644 +--- a/src/sage/rings/polynomial/multi_polynomial_ideal.py ++++ b/src/sage/rings/polynomial/multi_polynomial_ideal.py +@@ -3123,13 +3123,16 @@ def hilbert_numerator(self, grading=None, algorithm='sage'): + sage: I.hilbert_numerator() # needs sage.rings.number_field + -t^5 + 1 + +- This example returns a wrong answer due to an integer overflow in Singular:: ++ This example returns a wrong answer in singular < 4.3.2p4 due to an integer overflow:: + + sage: n=4; m=11; P = PolynomialRing(QQ, n*m, "x"); x = P.gens(); M = Matrix(n, x) + sage: I = P.ideal(M.minors(2)) + sage: J = P * [m.lm() for m in I.groebner_basis()] +- sage: J.hilbert_numerator(algorithm='singular') +- ...120*t^33 - 3465*t^32 + 48180*t^31 - ... ++ sage: J.hilbert_numerator(algorithm='singular') # known bug ++ Traceback (most recent call last): ++ .... ++ RuntimeError: error in Singular function call 'hilb': ++ overflow at t^22 + + Our two algorithms should always agree; not tested until + :trac:`33178` is fixed:: diff --git a/srcpkgs/sagemath/patches/get_patches b/srcpkgs/sagemath/patches/get_patches index 888c66f779e09..223d30c310614 100755 --- a/srcpkgs/sagemath/patches/get_patches +++ b/srcpkgs/sagemath/patches/get_patches @@ -1,7 +1,9 @@ #! /bin/sh +version=10.1 + URL_BASE_PR="https://github.com/sagemath/sage/pull/" -URL_BASE_COMPARE="https://github.com/sagemath/sage/compare/10.0..." +URL_BASE_COMPARE="https://github.com/sagemath/sage/compare/${version}..." case "$1" in -n) DO=echo ;; @@ -18,18 +20,6 @@ get_pr() { # run from patches dir cd $(dirname "$0") -# merged in 10.0.beta0 -get_pr 35584 "networkx 3.1" - -# merged in 10.0.beta1 -get_pr 35612 "linbox 1.7.0" -get_pr 35635 "sympy 1.12" -get_pr 35619 "maxima 5.46.0" - # positive review -get_pr 35707 "maxima 5.47.0" -get_pr 35831 "setuptools 68.0.0" - -# needs review -get_pr 35825 "singular 4.3.2p2" -get_pr 35826 "numpy 1.25.0" +get_pr 36006 "gmp 6.3.0" +get_pr 36018 "singular 4.3.2p7" diff --git a/srcpkgs/sagemath/template b/srcpkgs/sagemath/template index 2491d77dbc8d9..ae06e8ef36471 100644 --- a/srcpkgs/sagemath/template +++ b/srcpkgs/sagemath/template @@ -1,7 +1,7 @@ # Template file for 'sagemath' pkgname=sagemath -version=10.0 -revision=2 +version=10.1 +revision=1 build_wrksrc=pkgs/sagemath-standard build_style=python3-module _bindir=/usr/lib/sagemath/$version/bin @@ -33,15 +33,12 @@ license="GPL-2.0-or-later" homepage="http://sagemath.org/" changelog="https://github.com/sagemath/sage/releases" distfiles="https://github.com/sagemath/sage/archive/refs/tags/$version.tar.gz" -checksum=60858efd0d1f2526486740962bf72c99f9141a56caf8395f3291fded276faf55 +checksum=a658612b1b2376ddaf207cc8ed0ef458d4c2880c16e19139bedbe8baa42ad62f nocross="due to ntl (flintlib), fflas-ffpack, givaro, linbox, cysignals, sympow, maxima" -do_configure() { +post_patch() { # git tree needs bootstrapping - ( cd $wrksrc/build/pkgs/sagelib && - PATH=../../bin:$PATH \ - BOOTSTRAP_QUIET=no \ - ./bootstrap ) + $wrksrc/bootstrap sagelib } pre_build() {