Antonio Rojas pushed to branch main at Arch Linux / Packaging / Packages /
sagemath
Commits:
fe06395d by Antonio Rojas at 2026-02-24T23:18:25+01:00
upgpkg: 10.8-6: More mpmath 1.4 fixes
- - - - -
3 changed files:
- .SRCINFO
- PKGBUILD
- mpmath-1.4.patch
Changes:
=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
pkgbase = sagemath
pkgdesc = Open Source Mathematics Software, free alternative to Magma,
Maple, Mathematica, and Matlab
pkgver = 10.8
- pkgrel = 5
+ pkgrel = 6
url = http://www.sagemath.org
arch = x86_64
license = GPL-2.0-or-later
@@ -138,6 +138,6 @@ pkgbase = sagemath
sha256sums =
d7d73c956b6930c0716841565f3d1dd29e21dba2e2ed28b6ff11391d7776e9c3
sha256sums =
f1dd7fea298f38be0f03f46ed4bc9281267f03ec3eee2582edb385ca4cb5db09
sha256sums =
db094cafdb1fb01c7fa6e9c3c007b1b7062022341518bd9243c58c98b504cf0a
- sha256sums =
4479cb08b77c8d44e408c492ad53d5bdef27f0d0d5c17d3c125370c828fd5366
+ sha256sums =
e35dfbb4dd2b44eb06acaeeb17ea0d82b6d4ef011742e1bb3da3705a169fbe21
pkgname = sagemath
=====================================
PKGBUILD
=====================================
@@ -7,7 +7,7 @@
pkgname=sagemath
pkgver=10.8
-pkgrel=5
+pkgrel=6
pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple,
Mathematica, and Matlab'
arch=(x86_64)
url='http://www.sagemath.org'
@@ -145,7 +145,7 @@ source=(git+https://github.com/sagemath/sage#tag=$pkgver
sha256sums=('d7d73c956b6930c0716841565f3d1dd29e21dba2e2ed28b6ff11391d7776e9c3'
'f1dd7fea298f38be0f03f46ed4bc9281267f03ec3eee2582edb385ca4cb5db09'
'db094cafdb1fb01c7fa6e9c3c007b1b7062022341518bd9243c58c98b504cf0a'
- '4479cb08b77c8d44e408c492ad53d5bdef27f0d0d5c17d3c125370c828fd5366')
+ 'e35dfbb4dd2b44eb06acaeeb17ea0d82b6d4ef011742e1bb3da3705a169fbe21')
prepare(){
cd sage
=====================================
mpmath-1.4.patch
=====================================
@@ -5638,3 +5638,61 @@ index 98ffac46406..7f1eaabf623 100644
cdef class CoercionModel:
+diff --git a/src/sage/functions/error.py b/src/sage/functions/error.py
+index 78eb4992aa6..8822b3ed584 100644
+--- a/src/sage/functions/error.py
++++ b/src/sage/functions/error.py
+@@ -257,7 +257,7 @@ class Function_erf(BuiltinFunction):
+ sage: erf(2).n(200)
# needs sage.symbolic
+ 0.99532226501895273416206925636725292861089179704006007673835
+ sage: erf(pi - 1/2*I).n(100)
# needs sage.symbolic
+- 1.0000111669099367825726058952 +
1.6332655417638522934072124547e-6*I
++ 1.0000111669099367825726058952 +
1.6332655417638522934072124548e-6*I
+
+ TESTS:
+
+diff --git a/src/sage/functions/exp_integral.py
b/src/sage/functions/exp_integral.py
+index e074c430808..09d2bbda71b 100644
+--- a/src/sage/functions/exp_integral.py
++++ b/src/sage/functions/exp_integral.py
+@@ -993,7 +993,7 @@ class Function_cos_integral(BuiltinFunction):
+ sage: N(cos_integral(10^-10), digits=30)
# needs sage.symbolic
+ -22.4486352650389239795759024568
+ sage: cos_integral(ComplexField(100)(I))
# needs sage.symbolic
+- 0.83786694098020824089467857943 + 1.5707963267948966192313216916*I
++ 0.83786694098020824089467857944 + 1.5707963267948966192313216916*I
+ """
+ return _mpmath_utils_call(_mpmath_ci, z, parent=parent)
+
+diff --git a/src/sage/libs/mpmath/all.py b/src/sage/libs/mpmath/all.py
+index ea35faeb721..14a4be971e6 100644
+--- a/src/sage/libs/mpmath/all.py
++++ b/src/sage/libs/mpmath/all.py
+@@ -22,5 +22,5 @@ _constants_funcs = {
+
+
+ def eval_constant(name, ring):
+- prec = ring.precision() + 20
++ prec = int(ring.precision() + 20)
+ return ring(_constants_funcs[name](prec)) >> prec
+diff --git a/src/sage/rings/complex_mpfr.pyx b/src/sage/rings/complex_mpfr.pyx
+index 11f58008fcf..ba26d194b1f 100644
+--- a/src/sage/rings/complex_mpfr.pyx
++++ b/src/sage/rings/complex_mpfr.pyx
+@@ -54,6 +54,7 @@ from sage.rings.integer_ring import ZZ
+
+ cimport gmpy2
+ gmpy2.import_gmpy2()
++from mpmath import mp
+
+ try:
+ from cypari2.gen import Gen as pari_gen
+@@ -984,7 +985,7 @@ cdef class
ComplexNumber(sage.structure.element.FieldElement):
+ real, imag = real
+ elif isinstance(real, complex):
+ real, imag = real.real, real.imag
+- elif type(real) is gmpy2.mpc:
++ elif isinstance(real, (gmpy2.mpc, mp.mpc)):
+ real, imag = (<gmpy2.mpc>real).real, (<gmpy2.mpc>real).imag
+ else:
+ imag = 0
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/sagemath/-/commit/fe06395dae567cfb79c895d29a64050721e40b33
--
View it on GitLab:
https://gitlab.archlinux.org/archlinux/packaging/packages/sagemath/-/commit/fe06395dae567cfb79c895d29a64050721e40b33
You're receiving this email because of your account on gitlab.archlinux.org.