sagemath/sagemath-mpfr.patch
Jerry James eaa777c690 Update to sagemath 8.4.
Also:
- Build for python 3 instead of python 2 due to upcoming python 2 removal.
- Add -python3 and -escape patches to fix problems with python 3.
- Drop -nofstring patch, only needed for python 2.
- Drop upstreamed -eclib patch.
- Switch from atlas to openblas and rename -atlas patch to -openblas.
- Add -buildroot patch and only build cython interfaces once.
2018-11-01 19:25:26 -06:00

47 lines
2.4 KiB
Diff

diff -up src/sage/libs/mpfr/__init__.pxd.orig src/sage/libs/mpfr/__init__.pxd
--- src/sage/libs/mpfr/__init__.pxd.orig 2018-08-03 05:10:08.000000000 -0600
+++ src/sage/libs/mpfr/__init__.pxd 2018-08-29 10:41:34.027286042 -0600
@@ -96,7 +96,6 @@ cdef extern from "mpfr.h":
int mpfr_sqrt(mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
int mpfr_sqrt_ui(mpfr_t rop, unsigned long int op, mpfr_rnd_t rnd)
int mpfr_cbrt(mpfr_t rop, mpfr_t op, mpfr_rnd_t rnd)
- int mpfr_rootn_ui(mpfr_t rop, mpfr_t op, unsigned long int k, mpfr_rnd_t rnd)
int mpfr_root(mpfr_t rop, mpfr_t op, unsigned long int k, mpfr_rnd_t rnd)
int mpfr_pow(mpfr_t rop, mpfr_t op1, mpfr_t op2, mpfr_rnd_t rnd)
int mpfr_pow_ui(mpfr_t rop, mpfr_t op1, unsigned long int op2, mpfr_rnd_t rnd)
diff -up src/sage/rings/complex_mpc.pyx.orig src/sage/rings/complex_mpc.pyx
--- src/sage/rings/complex_mpc.pyx.orig 2018-08-03 05:10:09.000000000 -0600
+++ src/sage/rings/complex_mpc.pyx 2018-08-29 10:41:34.027286042 -0600
@@ -2225,7 +2225,7 @@ cdef class MPComplexNumber(sage.structur
cdef RealNumber a,r
a = self.argument()/n
r = self.abs()
- mpfr_rootn_ui(r.value, r.value, n, rrnd)
+ mpfr_root(r.value, r.value, n, rrnd)
cdef MPComplexNumber z
z = self._new()
diff -up src/sage/rings/complex_number.pyx.orig src/sage/rings/complex_number.pyx
--- src/sage/rings/complex_number.pyx.orig 2018-08-03 05:10:09.000000000 -0600
+++ src/sage/rings/complex_number.pyx 2018-08-29 10:41:34.027286042 -0600
@@ -2276,7 +2276,7 @@ cdef class ComplexNumber(sage.structure.
rho = abs(self)
arg = self.argument() / n
mpfr_init2(r, self._prec)
- mpfr_rootn_ui(r, rho.value, n, rnd)
+ mpfr_root(r, rho.value, n, rnd)
mpfr_sin_cos(z.__im, z.__re, arg.value, rnd)
mpfr_mul(z.__re, z.__re, r, rnd)
diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx
--- src/sage/rings/real_mpfr.pyx.orig 2018-08-03 05:10:09.000000000 -0600
+++ src/sage/rings/real_mpfr.pyx 2018-08-29 10:41:34.028286030 -0600
@@ -5370,7 +5370,7 @@ cdef class RealNumber(sage.structure.ele
if algorithm == 1:
x = self._new()
sig_on()
- mpfr_rootn_ui(x.value, self.value, n, (<RealField_class>self._parent).rnd)
+ mpfr_root(x.value, self.value, n, (<RealField_class>self._parent).rnd)
sig_off()
return x