sage: 8.2 -> 8.3
This commit is contained in:
parent
86f058c842
commit
840b64fdb8
@ -131,7 +131,6 @@ let
|
|||||||
});
|
});
|
||||||
|
|
||||||
# *not* to confuse with the python package "pynac"
|
# *not* to confuse with the python package "pynac"
|
||||||
# https://trac.sagemath.org/ticket/24838 (depends on arb update)
|
|
||||||
pynac = nixpkgs.pynac.override { inherit singular flint; };
|
pynac = nixpkgs.pynac.override { inherit singular flint; };
|
||||||
|
|
||||||
eclib = nixpkgs.eclib.override { inherit pari ntl; };
|
eclib = nixpkgs.eclib.override { inherit pari ntl; };
|
||||||
@ -167,6 +166,7 @@ let
|
|||||||
ecl = nixpkgs.ecl_16_1_2;
|
ecl = nixpkgs.ecl_16_1_2;
|
||||||
|
|
||||||
# sage currently uses an unreleased version of pari
|
# sage currently uses an unreleased version of pari
|
||||||
|
# https://trac.sagemath.org/ticket/25567
|
||||||
pari = (nixpkgs.pari.override { withThread = false; }).overrideAttrs (attrs: rec {
|
pari = (nixpkgs.pari.override { withThread = false; }).overrideAttrs (attrs: rec {
|
||||||
version = "2.10-1280-g88fb5b3"; # on update remove pari-stackwarn patch from `sage-src.nix`
|
version = "2.10-1280-g88fb5b3"; # on update remove pari-stackwarn patch from `sage-src.nix`
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
|
@ -1,427 +0,0 @@
|
|||||||
commit c885927e25b29bd23869e02379c2918da430323e
|
|
||||||
Author: Timo Kaufmann <timokau@zoho.com>
|
|
||||||
Date: Sat Jun 30 02:26:15 2018 +0200
|
|
||||||
|
|
||||||
diff --git a/build/pkgs/arb/checksums.ini b/build/pkgs/arb/checksums.ini
|
|
||||||
index 1924ee03c3..9323b97391 100644
|
|
||||||
--- a/build/pkgs/arb/checksums.ini
|
|
||||||
+++ b/build/pkgs/arb/checksums.ini
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
tarball=arb-VERSION.tar.gz
|
|
||||||
-sha1=27476d0529e48a07d92da90bd0fb80dd18f443e3
|
|
||||||
-md5=733285d9705d10b8024e551ffa81952f
|
|
||||||
-cksum=2391183744
|
|
||||||
+sha1=44eda7bf8eaa666c45b1fc2c1b5bd08756d94b58
|
|
||||||
+md5=fa24de9fffe4394fb6a7a6792e2ecc5f
|
|
||||||
+cksum=3689220688
|
|
||||||
diff --git a/build/pkgs/arb/package-version.txt b/build/pkgs/arb/package-version.txt
|
|
||||||
index c8810e9bdb..fb2c0766b7 100644
|
|
||||||
--- a/build/pkgs/arb/package-version.txt
|
|
||||||
+++ b/build/pkgs/arb/package-version.txt
|
|
||||||
@@ -1 +1 @@
|
|
||||||
-2.12.0.p0
|
|
||||||
+2.13.0
|
|
||||||
diff --git a/build/pkgs/arb/patches/arb-pie-hardening-conflict.patch b/build/pkgs/arb/patches/arb-pie-hardening-conflict.patch
|
|
||||||
deleted file mode 100644
|
|
||||||
index 3e5c0e708b..0000000000
|
|
||||||
--- a/build/pkgs/arb/patches/arb-pie-hardening-conflict.patch
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,17 +0,0 @@
|
|
||||||
-In newer binutils, ld options -r and -pie conflict.
|
|
||||||
-Patch due to Jörg-Volker Peetz
|
|
||||||
-(source : https://groups.google.com/d/msg/sage-devel/TduebNoZuBE/sEULolL0BQAJ),
|
|
||||||
-packaged by Emmanuel Charpentier
|
|
||||||
-
|
|
||||||
-diff -ru arb-2.8.1-orig/Makefile.subdirs arb-2.8.1-new/Makefile.subdirs
|
|
||||||
---- arb-2.8.1-orig/Makefile.subdirs 2015-12-31 17:30:01.000000000 +0100
|
|
||||||
-+++ arb-2.8.1-new/Makefile.subdirs 2016-11-07 18:50:34.540051779 +0100
|
|
||||||
-@@ -52,7 +52,7 @@
|
|
||||||
- $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@"
|
|
||||||
-
|
|
||||||
- $(MOD_LOBJ): $(LOBJS)
|
|
||||||
-- $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib
|
|
||||||
-+ $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib
|
|
||||||
-
|
|
||||||
- -include $(LOBJS:.lo=.d)
|
|
||||||
-
|
|
||||||
diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx
|
|
||||||
index 70d51e655a..00e7caea2c 100644
|
|
||||||
--- a/src/sage/rings/complex_arb.pyx
|
|
||||||
+++ b/src/sage/rings/complex_arb.pyx
|
|
||||||
@@ -857,14 +857,14 @@ class ComplexBallField(UniqueRepresentation, Field):
|
|
||||||
[0.500000000000000 +/- 2.09e-16]
|
|
||||||
|
|
||||||
sage: CBF.integral(lambda x, _: x.gamma(), 1 - CBF(i), 1 + CBF(i))
|
|
||||||
- [+/- 3.95e-15] + [1.5723926694981 +/- 4.53e-14]*I
|
|
||||||
+ [+/- 4...e-15] + [1.5723926694981 +/- 4...e-14]*I
|
|
||||||
|
|
||||||
sage: C = ComplexBallField(100)
|
|
||||||
sage: C.integral(lambda x, _: x.cos() * x.sin(), 0, 1)
|
|
||||||
[0.35403670913678559674939205737 +/- 8.89e-30]
|
|
||||||
|
|
||||||
sage: CBF.integral(lambda x, _: (x + x.exp()).sin(), 0, 8)
|
|
||||||
- [0.34740017266 +/- 6.36e-12]
|
|
||||||
+ [0.34740017266 +/- 6...e-12]
|
|
||||||
|
|
||||||
sage: C = ComplexBallField(2000)
|
|
||||||
sage: C.integral(lambda x, _: (x + x.exp()).sin(), 0, 8) # long time
|
|
||||||
@@ -879,14 +879,14 @@ class ComplexBallField(UniqueRepresentation, Field):
|
|
||||||
....: else:
|
|
||||||
....: return z.sqrt()
|
|
||||||
sage: CBF.integral(my_sqrt, -1 + CBF(i), -1 - CBF(i))
|
|
||||||
- [+/- 1.14e-14] + [-0.4752076627926 +/- 5.18e-14]*I
|
|
||||||
+ [+/- 1.14e-14] + [-0.4752076627926 +/- 5...e-14]*I
|
|
||||||
|
|
||||||
Note, though, that proper handling of the ``analytic`` flag is required
|
|
||||||
even when the path does not touch the branch cut::
|
|
||||||
|
|
||||||
sage: correct = CBF.integral(my_sqrt, 1, 2); correct
|
|
||||||
[1.21895141649746 +/- 3.73e-15]
|
|
||||||
- sage: RBF(integral(sqrt(x), x, 1, 2))
|
|
||||||
+ sage: RBF(integral(sqrt(x), x, 1, 2)) # long time
|
|
||||||
[1.21895141649746 +/- 1.79e-15]
|
|
||||||
sage: wrong = CBF.integral(lambda z, _: z.sqrt(), 1, 2) # WRONG!
|
|
||||||
sage: correct - wrong
|
|
||||||
@@ -915,9 +915,9 @@ class ComplexBallField(UniqueRepresentation, Field):
|
|
||||||
the integrand is unbounded::
|
|
||||||
|
|
||||||
sage: CBF.integral(lambda x, _: 1/x, -1, 1)
|
|
||||||
- [+/- inf] + [+/- inf]*I
|
|
||||||
+ nan + nan*I
|
|
||||||
sage: CBF.integral(lambda x, _: 1/x, 10^-1000, 1)
|
|
||||||
- [+/- inf] + [+/- inf]*I
|
|
||||||
+ nan + nan*I
|
|
||||||
sage: CBF.integral(lambda x, _: 1/x, 10^-1000, 1, abs_tol=1e-10)
|
|
||||||
[2302.5850930 +/- 1.26e-8]
|
|
||||||
|
|
||||||
@@ -928,14 +928,15 @@ class ComplexBallField(UniqueRepresentation, Field):
|
|
||||||
sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, abs_tol=1e-450)
|
|
||||||
[2.304377150950e-439 +/- 9.74e-452]
|
|
||||||
sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, abs_tol=0)
|
|
||||||
- [2.304377150949e-439 +/- 7.53e-452]
|
|
||||||
- sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, rel_tol=1e-4, abs_tol=0)
|
|
||||||
- [2.30438e-439 +/- 3.90e-445]
|
|
||||||
+ [2.304377150950e-439 +/- 7...e-452]
|
|
||||||
+ sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, rel_tol=1e-2, abs_tol=0)
|
|
||||||
+ [2.30438e-439 +/- 5.94e-445]
|
|
||||||
|
|
||||||
- sage: CBF.integral(lambda x, _: x*(1/x).sin(), 0, 1)
|
|
||||||
- [+/- 0.644]
|
|
||||||
- sage: CBF.integral(lambda x, _: x*(1/x).sin(), 0, 1, use_heap=True)
|
|
||||||
- [0.3785300 +/- 4.32e-8]
|
|
||||||
+ sage: epsi = CBF(1e-10)
|
|
||||||
+ sage: CBF.integral(lambda x, _: x*(1/x).sin(), epsi, 1)
|
|
||||||
+ [0.38 +/- 8.54e-3]
|
|
||||||
+ sage: CBF.integral(lambda x, _: x*(1/x).sin(), epsi, 1, use_heap=True)
|
|
||||||
+ [0.37853002 +/- 8.73e-9]
|
|
||||||
|
|
||||||
ALGORITHM:
|
|
||||||
|
|
||||||
@@ -951,12 +952,12 @@ class ComplexBallField(UniqueRepresentation, Field):
|
|
||||||
|
|
||||||
sage: i = QuadraticField(-1).gen()
|
|
||||||
sage: CBF.integral(lambda x, _: (1 + i*x).gamma(), -1, 1)
|
|
||||||
- [1.5723926694981 +/- 4.53e-14] + [+/- 3.95e-15]*I
|
|
||||||
+ [1.5723926694981 +/- 4...e-14] + [+/- 4...e-15]*I
|
|
||||||
|
|
||||||
- sage: ComplexBallField(10000).integral(lambda x, _: x.sin(), 0, 1, rel_tol=1e-400)
|
|
||||||
- [0.459... +/- ...e-4...]
|
|
||||||
+ sage: ComplexBallField(10000).integral(lambda x, _: x.sin(), 0, 1, rel_tol=1e-300)
|
|
||||||
+ [0.459... +/- ...e-3...]
|
|
||||||
sage: CBF.integral(lambda x, _: x.sin(), 0, 100, rel_tol=10)
|
|
||||||
- [+/- 7.61]
|
|
||||||
+ [0.138 +/- 5.53e-4]
|
|
||||||
|
|
||||||
sage: ComplexBallField(10000).integral(lambda x, _: x.sin(), 0, 1, abs_tol=1e-400)
|
|
||||||
[0.459697... +/- ...e-4...]
|
|
||||||
@@ -2389,9 +2390,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: ~CBF(i/3)
|
|
||||||
[-3.00000000000000 +/- 9.44e-16]*I
|
|
||||||
sage: ~CBF(0)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
sage: ~CBF(RIF(10,11))
|
|
||||||
- [0.1 +/- 9.53e-3]
|
|
||||||
+ [0.1 +/- 9.10e-3]
|
|
||||||
"""
|
|
||||||
cdef ComplexBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
||||||
@@ -2512,9 +2513,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(-2, 1)/CBF(1, 1/3)
|
|
||||||
[-1.500000000000000 +/- 8.83e-16] + [1.500000000000000 +/- 5.64e-16]*I
|
|
||||||
sage: CBF(2+I)/CBF(0)
|
|
||||||
- [+/- inf] + [+/- inf]*I
|
|
||||||
+ nan + nan*I
|
|
||||||
sage: CBF(1)/CBF(0)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
sage: CBF(1)/CBF(RBF(0, 1.))
|
|
||||||
nan
|
|
||||||
"""
|
|
||||||
@@ -2543,9 +2544,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(0)^(1/3)
|
|
||||||
0
|
|
||||||
sage: CBF(0)^(-1)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
sage: CBF(0)^(-2)
|
|
||||||
- [+/- inf] + [+/- inf]*I
|
|
||||||
+ nan + nan*I
|
|
||||||
|
|
||||||
TESTS::
|
|
||||||
|
|
||||||
@@ -2656,12 +2657,12 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(1).rising_factorial(5)
|
|
||||||
120.0000000000000
|
|
||||||
sage: CBF(1/3, 1/2).rising_factorial(300)
|
|
||||||
- [-3.87949484514e+612 +/- 5.23e+600] + [-3.52042209763e+612 +/- 5.55e+600]*I
|
|
||||||
+ [-3.87949484514e+612 +/- 5...e+600] + [-3.52042209763e+612 +/- 5...e+600]*I
|
|
||||||
|
|
||||||
sage: CBF(1).rising_factorial(-1)
|
|
||||||
nan
|
|
||||||
sage: CBF(1).rising_factorial(2**64)
|
|
||||||
- [+/- 2.30e+347382171305201370464]
|
|
||||||
+ [+/- 2.30e+347382171326740403407]
|
|
||||||
sage: ComplexBallField(128)(1).rising_factorial(2**64)
|
|
||||||
[2.343691126796861348e+347382171305201285713 +/- 4.71e+347382171305201285694]
|
|
||||||
sage: CBF(1/2).rising_factorial(CBF(2,3))
|
|
||||||
@@ -2700,7 +2701,7 @@ cdef class ComplexBall(RingElement):
|
|
||||||
[1.000000000000000 +/- 2.83e-16] + [-0.441271200305303 +/- 2.82e-16]*I
|
|
||||||
|
|
||||||
sage: CBF('inf').log()
|
|
||||||
- nan + nan*I
|
|
||||||
+ [+/- inf]
|
|
||||||
sage: CBF(2).log(0)
|
|
||||||
nan + nan*I
|
|
||||||
"""
|
|
||||||
@@ -2808,7 +2809,7 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(pi/2, 1/10).tan()
|
|
||||||
[+/- 2.87e-14] + [10.0333111322540 +/- 2.36e-14]*I
|
|
||||||
sage: CBF(pi/2).tan()
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
"""
|
|
||||||
cdef ComplexBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
||||||
@@ -2825,7 +2826,7 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(pi, 1/10).cot()
|
|
||||||
[+/- 5.74e-14] + [-10.0333111322540 +/- 2.81e-14]*I
|
|
||||||
sage: CBF(pi).cot()
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
"""
|
|
||||||
cdef ComplexBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
||||||
@@ -3211,9 +3212,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
1.000000000000000*I
|
|
||||||
|
|
||||||
sage: CBF(2+3*I).hypergeometric([1/4,1/3],[1/2])
|
|
||||||
- [0.7871684267473 +/- 7.34e-14] + [0.2749254173721 +/- 9.23e-14]*I
|
|
||||||
+ [0.7871684267473 +/- 7...e-14] + [0.2749254173721 +/- 9...e-14]*I
|
|
||||||
sage: CBF(2+3*I).hypergeometric([1/4,1/3],[1/2],regularized=True)
|
|
||||||
- [0.4441122268685 +/- 3.96e-14] + [0.1551100567338 +/- 5.75e-14]*I
|
|
||||||
+ [0.4441122268685 +/- 3...e-14] + [0.1551100567338 +/- 5...e-14]*I
|
|
||||||
|
|
||||||
sage: CBF(5).hypergeometric([2,3], [-5])
|
|
||||||
nan + nan*I
|
|
||||||
@@ -4041,9 +4042,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
|
|
||||||
sage: phi = CBF(1,1)
|
|
||||||
sage: (CBF.pi()/2).elliptic_e_inc(phi)
|
|
||||||
- [1.283840957898 +/- 3.23e-13] + [-0.5317843366915 +/- 7.79e-14]*I
|
|
||||||
+ [1.283840957898 +/- 3...e-13] + [-0.5317843366915 +/- 7...e-14]*I
|
|
||||||
sage: phi.elliptic_e()
|
|
||||||
- [1.2838409578982 +/- 5.90e-14] + [-0.5317843366915 +/- 3.35e-14]*I
|
|
||||||
+ [1.2838409578982 +/- 5...e-14] + [-0.5317843366915 +/- 3...e-14]*I
|
|
||||||
|
|
||||||
sage: phi = CBF(2, 3/7)
|
|
||||||
sage: (CBF.pi()/2).elliptic_e_inc(phi)
|
|
||||||
@@ -4312,8 +4313,7 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(10).laguerre_L(3, 2)
|
|
||||||
[-6.666666666667 +/- 4.15e-13]
|
|
||||||
sage: CBF(5,7).laguerre_L(CBF(2,3), CBF(1,-2))
|
|
||||||
- [5515.315030271 +/- 4.37e-10] + [-12386.942845271 +/- 5.47e-10]*I
|
|
||||||
-
|
|
||||||
+ [5515.315030271 +/- 4...e-10] + [-12386.942845271 +/- 5...e-10]*I
|
|
||||||
"""
|
|
||||||
cdef ComplexBall my_n = self._parent.coerce(n)
|
|
||||||
cdef ComplexBall my_m = self._parent.coerce(m)
|
|
||||||
@@ -4357,9 +4357,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
EXAMPLES::
|
|
||||||
|
|
||||||
sage: CBF(1/2).legendre_P(5)
|
|
||||||
- [0.08984375000000000 +/- 4.5...e-18]
|
|
||||||
+ [0.0898437500000000 +/- 7...e-17]
|
|
||||||
sage: CBF(1,2).legendre_P(CBF(2,3), CBF(0,1))
|
|
||||||
- [0.10996180744364 +/- 7.45e-15] + [0.14312767804055 +/- 8.38e-15]*I
|
|
||||||
+ [0.10996180744364 +/- 7.12e-15] + [0.14312767804055 +/- 8.07e-15]*I
|
|
||||||
sage: CBF(-10).legendre_P(5, 325/100)
|
|
||||||
[-22104403.487377 +/- 6.81e-7] + [53364750.687392 +/- 7.25e-7]*I
|
|
||||||
sage: CBF(-10).legendre_P(5, 325/100, type=3)
|
|
||||||
@@ -4393,9 +4393,9 @@ cdef class ComplexBall(RingElement):
|
|
||||||
sage: CBF(1/2).legendre_Q(5)
|
|
||||||
[0.55508089057168 +/- 2.79e-15]
|
|
||||||
sage: CBF(1,2).legendre_Q(CBF(2,3), CBF(0,1))
|
|
||||||
- [0.167678710 +/- 4.60e-10] + [-0.161558598 +/- 7.47e-10]*I
|
|
||||||
+ [0.167678710 +/- 3.91e-10] + [-0.161558598 +/- 6.77e-10]*I
|
|
||||||
sage: CBF(-10).legendre_Q(5, 325/100)
|
|
||||||
- [-83825154.36008 +/- 4.94e-6] + [-34721515.80396 +/- 5.40e-6]*I
|
|
||||||
+ [-83825154.36008 +/- 5.02e-6] + [-34721515.80396 +/- 5.42e-6]*I
|
|
||||||
sage: CBF(-10).legendre_Q(5, 325/100, type=3)
|
|
||||||
[-4.797306921692e-6 +/- 6.82e-19] + [-4.797306921692e-6 +/- 6.57e-19]*I
|
|
||||||
|
|
||||||
diff --git a/src/sage/rings/polynomial/polynomial_complex_arb.pyx b/src/sage/rings/polynomial/polynomial_complex_arb.pyx
|
|
||||||
index c436d4705b..ef611a566b 100644
|
|
||||||
--- a/src/sage/rings/polynomial/polynomial_complex_arb.pyx
|
|
||||||
+++ b/src/sage/rings/polynomial/polynomial_complex_arb.pyx
|
|
||||||
@@ -543,7 +543,7 @@ cdef class Polynomial_complex_arb(Polynomial):
|
|
||||||
sage: (1 - x/3).inverse_series_trunc(3)
|
|
||||||
([0.1111111111111111 +/- 5.99e-17])*x^2 + ([0.3333333333333333 +/- 7.04e-17])*x + 1.000000000000000
|
|
||||||
sage: x.inverse_series_trunc(1)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
sage: Pol(0).inverse_series_trunc(2)
|
|
||||||
(nan + nan*I)*x + nan + nan*I
|
|
||||||
|
|
||||||
@@ -671,7 +671,7 @@ cdef class Polynomial_complex_arb(Polynomial):
|
|
||||||
sage: pol._sqrt_series(2)
|
|
||||||
([+/- 7.51e-3] + [+/- 0.501]*I)*x + [+/- 5.01e-3] + [+/- 1.01]*I
|
|
||||||
sage: x._sqrt_series(2)
|
|
||||||
- ([+/- inf] + [+/- inf]*I)*x
|
|
||||||
+ (nan + nan*I)*x
|
|
||||||
"""
|
|
||||||
cdef Polynomial_complex_arb res = self._new()
|
|
||||||
if n < 0:
|
|
||||||
diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx
|
|
||||||
index c9f68e38d7..76e3037a9a 100644
|
|
||||||
--- a/src/sage/rings/real_arb.pyx
|
|
||||||
+++ b/src/sage/rings/real_arb.pyx
|
|
||||||
@@ -161,7 +161,7 @@ values and should be preferred::
|
|
||||||
|
|
||||||
sage: RBF(NaN) < RBF(infinity)
|
|
||||||
False
|
|
||||||
- sage: 1/RBF(0) <= RBF(infinity)
|
|
||||||
+ sage: RBF(0).add_error(infinity) <= RBF(infinity)
|
|
||||||
True
|
|
||||||
|
|
||||||
TESTS::
|
|
||||||
@@ -252,6 +252,8 @@ cdef void mpfi_to_arb(arb_t target, const mpfi_t source, const long precision):
|
|
||||||
(+infinity, +infinity)
|
|
||||||
sage: RBF(RIF(-infinity)).endpoints()
|
|
||||||
(-infinity, -infinity)
|
|
||||||
+ sage: RBF(RIF(-infinity, infinity)).endpoints()
|
|
||||||
+ (-infinity, +infinity)
|
|
||||||
sage: RIF(RBF(infinity)).endpoints()
|
|
||||||
(+infinity, +infinity)
|
|
||||||
sage: RIF(RBF(-infinity)).endpoints()
|
|
||||||
@@ -266,10 +268,11 @@ cdef void mpfi_to_arb(arb_t target, const mpfi_t source, const long precision):
|
|
||||||
if _do_sig(precision): sig_on()
|
|
||||||
mpfi_get_left(left, source)
|
|
||||||
mpfi_get_right(right, source)
|
|
||||||
- arb_set_interval_mpfr(target, left, right, precision)
|
|
||||||
- # Work around weakness of arb_set_interval_mpfr(tgt, inf, inf)
|
|
||||||
- if mpfr_equal_p(left, right):
|
|
||||||
- mag_zero(arb_radref(target))
|
|
||||||
+ if mpfr_inf_p(left) and mpfr_inf_p(right) and mpfr_sgn(left) < 0 < mpfr_sgn(right):
|
|
||||||
+ # Work around a weakness of arb_set_interval_mpfr(tgt, -inf, inf)
|
|
||||||
+ arb_zero_pm_inf(target)
|
|
||||||
+ else:
|
|
||||||
+ arb_set_interval_mpfr(target, left, right, precision)
|
|
||||||
if _do_sig(precision): sig_off()
|
|
||||||
|
|
||||||
mpfr_clear(left)
|
|
||||||
@@ -649,17 +652,15 @@ class RealBallField(UniqueRepresentation, Field):
|
|
||||||
EXAMPLES::
|
|
||||||
|
|
||||||
sage: RBF.some_elements()
|
|
||||||
- [1.000000000000000,
|
|
||||||
- [0.3333333333333333 +/- 7.04e-17],
|
|
||||||
+ [0, 1.000000000000000, [0.3333333333333333 +/- 7.04e-17],
|
|
||||||
[-4.733045976388941e+363922934236666733021124 +/- 3.46e+363922934236666733021108],
|
|
||||||
- [+/- inf],
|
|
||||||
- [+/- inf],
|
|
||||||
- nan]
|
|
||||||
+ [+/- inf], [+/- inf], [+/- inf], nan]
|
|
||||||
"""
|
|
||||||
import sage.symbolic.constants
|
|
||||||
- return [self(1), self(1)/3,
|
|
||||||
+ inf = self(sage.rings.infinity.Infinity)
|
|
||||||
+ return [self(0), self(1), self(1)/3,
|
|
||||||
-self(2)**(Integer(2)**80),
|
|
||||||
- self(sage.rings.infinity.Infinity), ~self(0),
|
|
||||||
+ inf, -inf, self.zero().add_error(inf),
|
|
||||||
self.element_class(self, sage.symbolic.constants.NotANumber())]
|
|
||||||
|
|
||||||
def _sum_of_products(self, terms):
|
|
||||||
@@ -881,7 +882,7 @@ class RealBallField(UniqueRepresentation, Field):
|
|
||||||
sage: RBF.gamma(5)
|
|
||||||
24.00000000000000
|
|
||||||
sage: RBF.gamma(10**20)
|
|
||||||
- [+/- 5.92e+1956570551809674821757]
|
|
||||||
+ [+/- 5.50e+1956570552410610660600]
|
|
||||||
sage: RBF.gamma(1/3)
|
|
||||||
[2.678938534707747 +/- 8.99e-16]
|
|
||||||
sage: RBF.gamma(-5)
|
|
||||||
@@ -2247,7 +2248,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: inf = RBF(+infinity)
|
|
||||||
sage: other_inf = RBF(+infinity, 42.r)
|
|
||||||
sage: neg_inf = RBF(-infinity)
|
|
||||||
- sage: extended_line = 1/RBF(0)
|
|
||||||
+ sage: extended_line = RBF(0).add_error(infinity)
|
|
||||||
sage: exact_nan = inf - inf
|
|
||||||
sage: exact_nan.mid(), exact_nan.rad()
|
|
||||||
(NaN, 0.00000000)
|
|
||||||
@@ -2659,7 +2660,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: ~RBF(5)
|
|
||||||
[0.2000000000000000 +/- 4.45e-17]
|
|
||||||
sage: ~RBF(0)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
sage: RBF(RIF(-0.1,0.1))
|
|
||||||
[+/- 0.101]
|
|
||||||
|
|
||||||
@@ -2739,7 +2740,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: RBF(pi)/RBF(e)
|
|
||||||
[1.155727349790922 +/- 8.43e-16]
|
|
||||||
sage: RBF(2)/RBF(0)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
"""
|
|
||||||
cdef RealBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
||||||
@@ -2765,7 +2766,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: RBF(-1)^(1/3)
|
|
||||||
nan
|
|
||||||
sage: RBF(0)^(-1)
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
sage: RBF(-e)**RBF(pi)
|
|
||||||
nan
|
|
||||||
|
|
||||||
@@ -3129,7 +3130,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: RBF(1).tan()
|
|
||||||
[1.557407724654902 +/- 3.26e-16]
|
|
||||||
sage: RBF(pi/2).tan()
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
"""
|
|
||||||
cdef RealBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
||||||
@@ -3146,7 +3147,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: RBF(1).cot()
|
|
||||||
[0.642092615934331 +/- 4.79e-16]
|
|
||||||
sage: RBF(pi).cot()
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
"""
|
|
||||||
cdef RealBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
||||||
@@ -3257,7 +3258,7 @@ cdef class RealBall(RingElement):
|
|
||||||
sage: RBF(1).coth()
|
|
||||||
[1.313035285499331 +/- 4.97e-16]
|
|
||||||
sage: RBF(0).coth()
|
|
||||||
- [+/- inf]
|
|
||||||
+ nan
|
|
||||||
"""
|
|
||||||
cdef RealBall res = self._new()
|
|
||||||
if _do_sig(prec(self)): sig_on()
|
|
@ -0,0 +1,15 @@
|
|||||||
|
diff --git a/build/pkgs/openblas/package-version.txt b/build/pkgs/openblas/package-version.txt
|
||||||
|
index 3bc45c25d4..7c7c224887 100644
|
||||||
|
--- a/src/sage/schemes/elliptic_curves/padics.py
|
||||||
|
+++ b/src/sage/schemes/elliptic_curves/padics.py
|
||||||
|
@@ -292,8 +292,8 @@ def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True):
|
||||||
|
|
||||||
|
sage: max_prec = 30 # make sure we get past p^2 # long time
|
||||||
|
sage: full = E.padic_regulator(5, max_prec) # long time
|
||||||
|
- sage: for prec in range(1, max_prec): # long time
|
||||||
|
- ....: assert E.padic_regulator(5, prec) == full # long time
|
||||||
|
+ sage: for prec in range(1, max_prec): # known bug (#25969) # long time
|
||||||
|
+ ....: assert E.padic_regulator(5, prec) == full # known bug (#25969) # long time
|
||||||
|
|
||||||
|
A case where the generator belongs to the formal group already
|
||||||
|
(:trac:`3632`)::
|
@ -1,48 +0,0 @@
|
|||||||
diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py
|
|
||||||
index 961c20aaac..3d601d8939 100644
|
|
||||||
--- a/src/sage/interfaces/maxima_abstract.py
|
|
||||||
+++ b/src/sage/interfaces/maxima_abstract.py
|
|
||||||
@@ -1743,7 +1743,7 @@ class MaximaAbstractElement(ExtraTabCompletion, InterfaceElement):
|
|
||||||
sage: y,d = var('y,d')
|
|
||||||
sage: f = function('f')
|
|
||||||
sage: latex(maxima(derivative(f(x*y), x)))
|
|
||||||
- \left(\left.{{{\it \partial}}\over{{\it \partial}\, {\it t_0}}}\,f\left({\it t_0}\right) \right|_{{\it t_0}={\it x}\, {\it y}}\right)\,{\it y}
|
|
||||||
+ \left(\left.{{{\it \partial}}\over{{\it \partial}\, {\it t}_{0}}}\,f\left({\it t}_{0}\right) \right|_{{\it t}_{0}={\it x}\, {\it y}}\right)\,{\it y}
|
|
||||||
sage: latex(maxima(derivative(f(x,y,d), d,x,x,y)))
|
|
||||||
{{{\it \partial}^4}\over{{\it \partial}\,{\it d}\, {\it \partial}\,{\it x}^2\,{\it \partial}\, {\it y}}}\,f\left({\it x} , {\it y} , {\it d}\right)
|
|
||||||
sage: latex(maxima(d/(d-2)))
|
|
||||||
diff --git a/src/sage/manifolds/differentiable/metric.py b/src/sage/manifolds/differentiable/metric.py
|
|
||||||
index 3cd6ad3235..1e18af1a6b 100644
|
|
||||||
--- a/src/sage/manifolds/differentiable/metric.py
|
|
||||||
+++ b/src/sage/manifolds/differentiable/metric.py
|
|
||||||
@@ -993,7 +993,7 @@ class PseudoRiemannianMetric(TensorField):
|
|
||||||
2-dimensional differentiable manifold S^2
|
|
||||||
sage: g.riemann()[:]
|
|
||||||
[[[[0, 0], [0, 0]], [[0, sin(th)^2], [-sin(th)^2, 0]]],
|
|
||||||
- [[[0, (cos(th)^2 - 1)/sin(th)^2], [1, 0]], [[0, 0], [0, 0]]]]
|
|
||||||
+ [[[0, -1], [1, 0]], [[0, 0], [0, 0]]]]
|
|
||||||
|
|
||||||
In dimension 2, the Riemann tensor can be expressed entirely in terms of
|
|
||||||
the Ricci scalar `r`:
|
|
||||||
diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
|
|
||||||
index dfb8751467..27402e54ab 100644
|
|
||||||
--- a/src/sage/symbolic/expression.pyx
|
|
||||||
+++ b/src/sage/symbolic/expression.pyx
|
|
||||||
@@ -7154,7 +7154,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: ex = lcm(sin(x)^2 - 1, sin(x)^2 + sin(x)); ex
|
|
||||||
(sin(x)^2 + sin(x))*(sin(x)^2 - 1)/(sin(x) + 1)
|
|
||||||
sage: ex.simplify_full()
|
|
||||||
- -cos(x)^2*sin(x)
|
|
||||||
+ sin(x)^3 - sin(x)
|
|
||||||
|
|
||||||
TESTS:
|
|
||||||
|
|
||||||
@@ -10004,7 +10004,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
|
|
||||||
sage: f=tan(3*x)
|
|
||||||
sage: f.simplify_trig()
|
|
||||||
- (4*cos(x)^2 - 1)*sin(x)/(4*cos(x)^3 - 3*cos(x))
|
|
||||||
+ -(4*cos(x)^2 - 1)*sin(x)/(4*cos(x)*sin(x)^2 - cos(x))
|
|
||||||
sage: f.simplify_trig(False)
|
|
||||||
sin(3*x)/cos(3*x)
|
|
||||||
|
|
@ -1,479 +0,0 @@
|
|||||||
diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py
|
|
||||||
index 3a417d9d5c..fadaadbaf6 100644
|
|
||||||
--- a/src/sage/calculus/calculus.py
|
|
||||||
+++ b/src/sage/calculus/calculus.py
|
|
||||||
@@ -231,7 +231,7 @@ Another example::
|
|
||||||
sage: f(x=3)
|
|
||||||
arcsinh(1)
|
|
||||||
sage: f.derivative(x)
|
|
||||||
- 1/3/sqrt(1/9*x^2 + 1)
|
|
||||||
+ 1/sqrt(x^2 + 9)
|
|
||||||
|
|
||||||
We compute the length of the parabola from 0 to 2::
|
|
||||||
|
|
||||||
@@ -1509,8 +1509,8 @@ def laplace(ex, t, s, algorithm='maxima'):
|
|
||||||
Testing SymPy::
|
|
||||||
|
|
||||||
sage: laplace(t^n, t, s, algorithm='sympy')
|
|
||||||
- (s^(-n)*gamma(n + 1)/s, 0, -re(n) < 1)
|
|
||||||
-
|
|
||||||
+ (gamma(n + 1)/(s*s^n), 0, -re(n) < 1)
|
|
||||||
+
|
|
||||||
Testing Maxima::
|
|
||||||
|
|
||||||
sage: laplace(t^n, t, s, algorithm='maxima')
|
|
||||||
diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py
|
|
||||||
index 1fc2db5c94..f3e49b9cdb 100644
|
|
||||||
--- a/src/sage/functions/hypergeometric.py
|
|
||||||
+++ b/src/sage/functions/hypergeometric.py
|
|
||||||
@@ -34,7 +34,7 @@ Simplification (note that ``simplify_full`` does not yet call
|
|
||||||
sage: a.simplify_hypergeometric()
|
|
||||||
1/((-e^x + 1)^e^x)
|
|
||||||
sage: a.simplify_hypergeometric(algorithm='sage')
|
|
||||||
- (-e^x + 1)^(-e^x)
|
|
||||||
+ 1/((-e^x + 1)^e^x)
|
|
||||||
|
|
||||||
Equality testing::
|
|
||||||
|
|
||||||
@@ -145,7 +145,7 @@ Series expansions of confluent hypergeometric functions::
|
|
||||||
|
|
||||||
sage: hypergeometric_M(2, 2, x).series(x, 3)
|
|
||||||
1 + 1*x + 1/2*x^2 + Order(x^3)
|
|
||||||
- sage: hypergeometric_U(2, 2, x).series(x == 3, 100).subs(x=1).n()
|
|
||||||
+ sage: hypergeometric_U(2, 2, x).series(x == 3, 100).subs(x=1).n() # known bug (see :trac:`25688`)
|
|
||||||
0.403652637676806
|
|
||||||
sage: hypergeometric_U(2, 2, 1).n()
|
|
||||||
0.403652637676806
|
|
||||||
@@ -773,7 +773,7 @@ def closed_form(hyp):
|
|
||||||
sage: closed_form(hypergeometric([], [], z))
|
|
||||||
e^z
|
|
||||||
sage: closed_form(hypergeometric([a], [], z))
|
|
||||||
- (-z + 1)^(-a)
|
|
||||||
+ 1/((-z + 1)^a)
|
|
||||||
sage: closed_form(hypergeometric([1, 1, 2], [1, 1], z))
|
|
||||||
(z - 1)^(-2)
|
|
||||||
sage: closed_form(hypergeometric([2, 3], [1], x))
|
|
||||||
@@ -1121,7 +1121,7 @@ class Hypergeometric_U(BuiltinFunction):
|
|
||||||
sage: var('a b z')
|
|
||||||
(a, b, z)
|
|
||||||
sage: hypergeometric_U(a, b, z).generalized()
|
|
||||||
- z^(-a)*hypergeometric((a, a - b + 1), (), -1/z)
|
|
||||||
+ hypergeometric((a, a - b + 1), (), -1/z)/z^a
|
|
||||||
sage: hypergeometric_U(1, 3, 1/2).generalized()
|
|
||||||
2*hypergeometric((1, -1), (), -2)
|
|
||||||
sage: hypergeometric_U(3, I, 2).generalized()
|
|
||||||
diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py
|
|
||||||
index 75d1bf8060..61968582af 100644
|
|
||||||
--- a/src/sage/functions/log.py
|
|
||||||
+++ b/src/sage/functions/log.py
|
|
||||||
@@ -518,17 +518,17 @@ class Function_polylog(GinacFunction):
|
|
||||||
|
|
||||||
sage: BF = RealBallField(100)
|
|
||||||
sage: polylog(2, BF(1/3))
|
|
||||||
- [0.36621322997706348761674629766 +/- 4.51e-30]
|
|
||||||
+ [0.36621322997706348761674629766... +/- ...]
|
|
||||||
sage: polylog(2, BF(4/3))
|
|
||||||
- nan
|
|
||||||
+ [2.27001825336107090380391448586 +/- 5.64e-30] + [-0.90377988538400159956755721265 +/- 8.39e-30]*I
|
|
||||||
sage: parent(_)
|
|
||||||
- Real ball field with 100 bits of precision
|
|
||||||
+ Complex ball field with 100 bits of precision
|
|
||||||
sage: polylog(2, CBF(1/3))
|
|
||||||
- [0.366213229977063 +/- 5.85e-16]
|
|
||||||
+ [0.366213229977063 +/- ...]
|
|
||||||
sage: parent(_)
|
|
||||||
Complex ball field with 53 bits of precision
|
|
||||||
sage: polylog(2, CBF(1))
|
|
||||||
- [1.644934066848226 +/- 6.59e-16]
|
|
||||||
+ [1.644934066848226 +/- ...]
|
|
||||||
sage: parent(_)
|
|
||||||
Complex ball field with 53 bits of precision
|
|
||||||
"""
|
|
||||||
diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py
|
|
||||||
index e7e7a311cd..1f2926d6c9 100644
|
|
||||||
--- a/src/sage/functions/trig.py
|
|
||||||
+++ b/src/sage/functions/trig.py
|
|
||||||
@@ -529,13 +529,8 @@ class Function_arcsin(GinacFunction):
|
|
||||||
arcsin
|
|
||||||
sage: asin(complex(1,1))
|
|
||||||
(0.6662394324925152+1.0612750619050357j)
|
|
||||||
-
|
|
||||||
- Check that :trac:`22823` is fixed::
|
|
||||||
-
|
|
||||||
- sage: bool(asin(SR(2.1)) == NaN)
|
|
||||||
- True
|
|
||||||
- sage: asin(SR(2.1)).is_real()
|
|
||||||
- False
|
|
||||||
+ sage: asin(SR(2.1))
|
|
||||||
+ 1.57079632679490 - 1.37285914424258*I
|
|
||||||
"""
|
|
||||||
GinacFunction.__init__(self, 'arcsin', latex_name=r"\arcsin",
|
|
||||||
conversions=dict(maxima='asin', sympy='asin', fricas="asin", giac="asin"))
|
|
||||||
@@ -595,13 +590,8 @@ class Function_arccos(GinacFunction):
|
|
||||||
arccos
|
|
||||||
sage: acos(complex(1,1))
|
|
||||||
(0.9045568943023814-1.0612750619050357j)
|
|
||||||
-
|
|
||||||
- Check that :trac:`22823` is fixed::
|
|
||||||
-
|
|
||||||
- sage: bool(acos(SR(2.1)) == NaN)
|
|
||||||
- True
|
|
||||||
- sage: acos(SR(2.1)).is_real()
|
|
||||||
- False
|
|
||||||
+ sage: acos(SR(2.1))
|
|
||||||
+ 1.37285914424258*I
|
|
||||||
"""
|
|
||||||
GinacFunction.__init__(self, 'arccos', latex_name=r"\arccos",
|
|
||||||
conversions=dict(maxima='acos', sympy='acos', fricas='acos', giac='acos'))
|
|
||||||
@@ -807,7 +797,7 @@ class Function_arcsec(GinacFunction):
|
|
||||||
sage: arcsec(2).n(100)
|
|
||||||
1.0471975511965977461542144611
|
|
||||||
sage: arcsec(1/2).n(100)
|
|
||||||
- NaN
|
|
||||||
+ 1.3169578969248167086250463473*I
|
|
||||||
sage: RDF(arcsec(2)) # abs tol 1e-15
|
|
||||||
1.0471975511965976
|
|
||||||
sage: arcsec(1 + I)
|
|
||||||
@@ -958,7 +948,9 @@ class Function_arctan2(GinacFunction):
|
|
||||||
sage: atan2(0,0,hold=True)
|
|
||||||
arctan2(0, 0)
|
|
||||||
sage: atan2(0,0,hold=True).n()
|
|
||||||
- NaN
|
|
||||||
+ Traceback (most recent call last):
|
|
||||||
+ ...
|
|
||||||
+ RuntimeError: atan2(): division by zero
|
|
||||||
|
|
||||||
Check if :trac:`10062` is fixed, this was caused by
|
|
||||||
``(I*I).is_positive()`` returning ``True``::
|
|
||||||
diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py
|
|
||||||
index 3b5c8d1729..1c6b73a16c 100644
|
|
||||||
--- a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py
|
|
||||||
+++ b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py
|
|
||||||
@@ -1422,8 +1422,10 @@ class HyperbolicGeodesicUHP(HyperbolicGeodesic):
|
|
||||||
expressions do not generate runtime errors. ::
|
|
||||||
|
|
||||||
sage: g=HyperbolicPlane().UHP().get_geodesic(-1+I,1+I)
|
|
||||||
- sage: g.midpoint()
|
|
||||||
- Point in UHP 1/2*(sqrt(2)*e^(1/2*arccosh(3)) - sqrt(2) + (I - 1)*e^(1/2*arccosh(3)) + I - 1)/((1/4*I - 1/4)*sqrt(2)*e^(1/2*arccosh(3)) - (1/4*I - 1/4)*sqrt(2) + 1/2*e^(1/2*arccosh(3)) + 1/2)
|
|
||||||
+ sage: point = g.midpoint(); point
|
|
||||||
+ Point in UHP -1/2*(sqrt(2)*...
|
|
||||||
+ sage: QQbar(point.coordinates()).radical_expression()
|
|
||||||
+ I*sqrt(2)
|
|
||||||
|
|
||||||
Check that floating points remain floating points
|
|
||||||
in :meth:`midpoint` ::
|
|
||||||
diff --git a/src/sage/interfaces/fricas.py b/src/sage/interfaces/fricas.py
|
|
||||||
index 82aae78e37..8501ea2a18 100644
|
|
||||||
--- a/src/sage/interfaces/fricas.py
|
|
||||||
+++ b/src/sage/interfaces/fricas.py
|
|
||||||
@@ -1084,14 +1084,14 @@ class FriCASElement(ExpectElement):
|
|
||||||
0.451026811796262,
|
|
||||||
0.732815101786507,
|
|
||||||
0.837981225008390,
|
|
||||||
- NaN,
|
|
||||||
- NaN,
|
|
||||||
+ 1.57079632679490 - 0.467145308103262*I,
|
|
||||||
+ 0.467145308103262*I,
|
|
||||||
1.11976951499863,
|
|
||||||
0.451026811796262,
|
|
||||||
0.732815101786507,
|
|
||||||
0.837981225008390,
|
|
||||||
- NaN,
|
|
||||||
- NaN]
|
|
||||||
+ 1.57079632679490 - 0.467145308103262*I,
|
|
||||||
+ 0.467145308103262*I]
|
|
||||||
sage: l = [tanh, sinh, cosh, coth, sech, csch, asinh, acosh, atanh, acoth, asech, acsch, arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch]
|
|
||||||
sage: [f(x)._fricas_().sage().subs(x=0.9) for f in l] # optional - fricas
|
|
||||||
[0.716297870199024,
|
|
||||||
diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx
|
|
||||||
index 9e9d8f664b..e3406f007e 100644
|
|
||||||
--- a/src/sage/libs/pynac/pynac.pyx
|
|
||||||
+++ b/src/sage/libs/pynac/pynac.pyx
|
|
||||||
@@ -1824,7 +1824,7 @@ cdef py_atan2(x, y):
|
|
||||||
sage: atan2(CC(I), CC(I+1))
|
|
||||||
0.553574358897045 + 0.402359478108525*I
|
|
||||||
sage: atan2(CBF(I), CBF(I+1))
|
|
||||||
- [0.55357435889705 +/- 5.58e-15] + [0.402359478108525 +/- 7.11e-16]*I
|
|
||||||
+ [0.55357435889705 +/- ...] + [0.402359478108525 +/- ...]*I
|
|
||||||
|
|
||||||
Check that :trac:`23776` is fixed and RDF input gives real output::
|
|
||||||
|
|
||||||
diff --git a/src/sage/matrix/matrix_symbolic_dense.pyx b/src/sage/matrix/matrix_symbolic_dense.pyx
|
|
||||||
index 46a15e53eb..7a0beb437b 100644
|
|
||||||
--- a/src/sage/matrix/matrix_symbolic_dense.pyx
|
|
||||||
+++ b/src/sage/matrix/matrix_symbolic_dense.pyx
|
|
||||||
@@ -200,7 +200,7 @@ cdef class Matrix_symbolic_dense(Matrix_generic_dense):
|
|
||||||
sage: eval, [evec], mult = es[0]
|
|
||||||
sage: delta = eval*evec - evec*A
|
|
||||||
sage: abs(abs(delta)) < 1e-10
|
|
||||||
- sqrt(9/25*((2*sqrt(6) - 3)*(sqrt(6) - 2) + 7*sqrt(6) - 18)^2 + 9/25*((sqrt(6) - 2)*(sqrt(6) - 4) + 6*sqrt(6) - 14)^2) < (1.00000000000000e-10)
|
|
||||||
+ 3/5*sqrt(((2*sqrt(6) - 3)*(sqrt(6) - 2) + 7*sqrt(6) - 18)^2 + ((sqrt(6) - 2)*(sqrt(6) - 4) + 6*sqrt(6) - 14)^2) < (1.00000000000000e-10)
|
|
||||||
sage: abs(abs(delta)).n() < 1e-10
|
|
||||||
True
|
|
||||||
|
|
||||||
diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py
|
|
||||||
index 17a1d6e290..03892ceec0 100644
|
|
||||||
--- a/src/sage/modules/matrix_morphism.py
|
|
||||||
+++ b/src/sage/modules/matrix_morphism.py
|
|
||||||
@@ -214,9 +214,9 @@ class MatrixMorphism_abstract(sage.categories.morphism.Morphism):
|
|
||||||
sage: f((1, 0))
|
|
||||||
Traceback (most recent call last):
|
|
||||||
...
|
|
||||||
- TypeError: Unable to coerce entries (=[1.00000000000000*I, 0.000000000000000]) to coefficients in Real Field with 53 bits of precision
|
|
||||||
+ TypeError: Unable to coerce entries (=[1.00000000000000*I, 0]) to coefficients in Real Field with 53 bits of precision
|
|
||||||
sage: f((1, 0), coerce=False)
|
|
||||||
- (1.00000000000000*I, 0.000000000000000)
|
|
||||||
+ (1.00000000000000*I, 0)
|
|
||||||
|
|
||||||
"""
|
|
||||||
if self.domain().is_ambient():
|
|
||||||
diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py
|
|
||||||
index 77cdeb8c46..e501e74036 100644
|
|
||||||
--- a/src/sage/plot/plot.py
|
|
||||||
+++ b/src/sage/plot/plot.py
|
|
||||||
@@ -2061,7 +2061,7 @@ def _plot(funcs, xrange, parametric=False,
|
|
||||||
plot properly (:trac:`13246`)::
|
|
||||||
|
|
||||||
sage: parametric_plot((x, arcsec(x)), (x, -2, 2))
|
|
||||||
- Graphics object consisting of 1 graphics primitive
|
|
||||||
+ Graphics object consisting of 2 graphics primitives
|
|
||||||
|
|
||||||
"""
|
|
||||||
from sage.plot.colors import Color
|
|
||||||
diff --git a/src/sage/repl/display/formatter.py b/src/sage/repl/display/formatter.py
|
|
||||||
index 8ce2e839d7..948207c95e 100644
|
|
||||||
--- a/src/sage/repl/display/formatter.py
|
|
||||||
+++ b/src/sage/repl/display/formatter.py
|
|
||||||
@@ -25,11 +25,11 @@ generally, all sage expression as an ASCII art object::
|
|
||||||
sage: shell = get_test_shell()
|
|
||||||
sage: shell.run_cell('%display ascii_art')
|
|
||||||
sage: shell.run_cell('integral(x^2/pi^x, x)')
|
|
||||||
- / 2 2 \ -x*log(pi)
|
|
||||||
- -\x *log (pi) + 2*x*log(pi) + 2/*e
|
|
||||||
- ---------------------------------------------
|
|
||||||
- 3
|
|
||||||
- log (pi)
|
|
||||||
+ -x / 2 2 \
|
|
||||||
+ -pi *\x *log (pi) + 2*x*log(pi) + 2/
|
|
||||||
+ --------------------------------------
|
|
||||||
+ 3
|
|
||||||
+ log (pi)
|
|
||||||
sage: shell.run_cell("i = var('i')")
|
|
||||||
sage: shell.run_cell('sum(i*x^i, i, 0, 10)')
|
|
||||||
10 9 8 7 6 5 4 3 2
|
|
||||||
diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
|
|
||||||
index d8ebbf4f76..8c60f65e99 100644
|
|
||||||
--- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
|
|
||||||
+++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py
|
|
||||||
@@ -151,8 +151,8 @@ A multiple point example (Example 6.5 of [RaWi2012]_)::
|
|
||||||
[(x + 2*y - 1, 1), (2*x + y - 1, 1)])
|
|
||||||
sage: F1 = decomp[1]
|
|
||||||
sage: F1.asymptotics(p, alpha, 2)
|
|
||||||
- (-3*((2*a^2 - 5*a*b + 2*b^2)*r^2 + (a + b)*r + 3)*((1/3)^(-a)*(1/3)^(-b))^r,
|
|
||||||
- (1/3)^(-a)*(1/3)^(-b), -3*(2*a^2 - 5*a*b + 2*b^2)*r^2 - 3*(a + b)*r - 9)
|
|
||||||
+ (-3*((2*a^2 - 5*a*b + 2*b^2)*r^2 + (a + b)*r + 3)*(1/((1/3)^a*(1/3)^b))^r,
|
|
||||||
+ 1/((1/3)^a*(1/3)^b), -3*(2*a^2 - 5*a*b + 2*b^2)*r^2 - 3*(a + b)*r - 9)
|
|
||||||
sage: alpha = [4, 3]
|
|
||||||
sage: decomp = F.asymptotic_decomposition(alpha)
|
|
||||||
sage: F1 = decomp[1]
|
|
||||||
@@ -2159,7 +2159,7 @@ class FractionWithFactoredDenominator(RingElement):
|
|
||||||
sage: p = {x: 1/3, y: 1/3}
|
|
||||||
sage: alpha = (var('a'), var('b'))
|
|
||||||
sage: F.asymptotics_multiple(p, alpha, 2, var('r')) # long time
|
|
||||||
- (3*((1/3)^(-a)*(1/3)^(-b))^r*e^(2/3), (1/3)^(-a)*(1/3)^(-b), 3*e^(2/3))
|
|
||||||
+ (3*(1/((1/3)^a*(1/3)^b))^r*e^(2/3), 1/((1/3)^a*(1/3)^b), 3*e^(2/3))
|
|
||||||
"""
|
|
||||||
from itertools import product
|
|
||||||
from sage.calculus.functions import jacobian
|
|
||||||
diff --git a/src/sage/stats/basic_stats.py b/src/sage/stats/basic_stats.py
|
|
||||||
index 16a268a02c..5fd244e93b 100644
|
|
||||||
--- a/src/sage/stats/basic_stats.py
|
|
||||||
+++ b/src/sage/stats/basic_stats.py
|
|
||||||
@@ -183,7 +183,7 @@ def std(v, bias=False):
|
|
||||||
sage: std([])
|
|
||||||
NaN
|
|
||||||
sage: std([I, sqrt(2), 3/5])
|
|
||||||
- sqrt(1/450*(10*sqrt(2) - 5*I - 3)^2 + 1/450*(5*sqrt(2) - 10*I + 3)^2 + 1/450*(5*sqrt(2) + 5*I - 6)^2)
|
|
||||||
+ 1/15*sqrt(1/2)*sqrt((10*sqrt(2) - 5*I - 3)^2 + (5*sqrt(2) - 10*I + 3)^2 + (5*sqrt(2) + 5*I - 6)^2)
|
|
||||||
sage: std([RIF(1.0103, 1.0103), RIF(2)])
|
|
||||||
0.6998235813403261?
|
|
||||||
sage: import numpy
|
|
||||||
diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx
|
|
||||||
index ab4c05de3a..60f0dc549a 100644
|
|
||||||
--- a/src/sage/symbolic/expression.pyx
|
|
||||||
+++ b/src/sage/symbolic/expression.pyx
|
|
||||||
@@ -622,7 +622,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: x^(-5)
|
|
||||||
x^(-5)
|
|
||||||
sage: x^(-y)
|
|
||||||
- x^(-y)
|
|
||||||
+ 1/(x^y)
|
|
||||||
sage: 2*x^(-1)
|
|
||||||
2/x
|
|
||||||
sage: i*x
|
|
||||||
@@ -3621,14 +3621,14 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: repl_dict = {b_0: b_0, b_3: b_1, b_2: b_3, b_1: b_2}
|
|
||||||
sage: P = precomp.substitute(repl_dict)
|
|
||||||
sage: P.expand()
|
|
||||||
- -2^(-b_0)*2^(-b_2)*2^b_3 - 2^b_0*2^(-b_2)*2^b_3 -
|
|
||||||
- 2^(-b_0)*2^b_2*2^b_3 + 2^b_0*2^b_2*2^b_3 - 2*2^(-b_0)*2^(-b_2)
|
|
||||||
- - 2*2^b_0*2^(-b_2) - 2*2^(-b_0)*2^b_2 + 2*2^b_0*2^b_2 +
|
|
||||||
- 2^(-b_0)*2^b_3 + 2^b_0*2^b_3 + 2^(-b_2)*2^b_3 + 2^b_2*2^b_3 +
|
|
||||||
- 2*2^(-b_0) + 2*2^b_0 + 2*2^(-b_2) + 2*2^b_2 - 9*2^b_3 -
|
|
||||||
- 2^(-b_0)*2^(-b_2)/2^b_3 - 2^b_0*2^(-b_2)/2^b_3 -
|
|
||||||
- 2^(-b_0)*2^b_2/2^b_3 + 2^b_0*2^b_2/2^b_3 + 2^(-b_0)/2^b_3 +
|
|
||||||
- 2^b_0/2^b_3 + 2^(-b_2)/2^b_3 + 2^b_2/2^b_3 - 9/2^b_3 - 18
|
|
||||||
+ 2^b_0*2^b_2*2^b_3 + 2*2^b_0*2^b_2 + 2^b_0*2^b_3 + 2^b_2*2^b_3 +
|
|
||||||
+ 2*2^b_0 + 2*2^b_2 - 9*2^b_3 + 2^b_0*2^b_2/2^b_3 -
|
|
||||||
+ 2^b_0*2^b_3/2^b_2 - 2^b_2*2^b_3/2^b_0 - 2*2^b_0/2^b_2 -
|
|
||||||
+ 2*2^b_2/2^b_0 + 2^b_0/2^b_3 + 2^b_2/2^b_3 + 2^b_3/2^b_0 +
|
|
||||||
+ 2^b_3/2^b_2 + 2/2^b_0 + 2/2^b_2 - 2^b_0/(2^b_2*2^b_3) -
|
|
||||||
+ 2^b_2/(2^b_0*2^b_3) - 9/2^b_3 - 2^b_3/(2^b_0*2^b_2) -
|
|
||||||
+ 2/(2^b_0*2^b_2) + 1/(2^b_0*2^b_3) + 1/(2^b_2*2^b_3) -
|
|
||||||
+ 1/(2^b_0*2^b_2*2^b_3) - 18
|
|
||||||
|
|
||||||
sage: _0,b_1,b_2=var('b_0,b_1,b_2')
|
|
||||||
sage: f = 1/27*b_2^2/(2^b_2)^2 + 1/27*b_1^2/(2^b_1)^2 + \
|
|
||||||
@@ -3809,7 +3809,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
|
|
||||||
sage: x = SR.symbol('x', domain='real')
|
|
||||||
sage: (x^3)^(1/3)
|
|
||||||
- (x^3)^(1/3)
|
|
||||||
+ x
|
|
||||||
sage: (x^4)^(1/4)
|
|
||||||
abs(x)
|
|
||||||
sage: (x^8)^(1/4)
|
|
||||||
@@ -3872,7 +3872,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: 2^(x/log(2))
|
|
||||||
e^x
|
|
||||||
sage: 2^(-x^2/2/log(2))
|
|
||||||
- e^(-1/2*x^2)
|
|
||||||
+ 1/e^(1/2*x^2)
|
|
||||||
sage: x^(x/log(x))
|
|
||||||
x^(x/log(x))
|
|
||||||
sage: assume(x > 0)
|
|
||||||
@@ -4816,18 +4816,24 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: ((x+y)^(x+y)).match(w0^w0)
|
|
||||||
{$0: x + y}
|
|
||||||
sage: t = ((a+b)*(a+c)).match((a+w0)*(a+w1))
|
|
||||||
- sage: t[w0], t[w1]
|
|
||||||
- (c, b)
|
|
||||||
+ sage: set([t[w0], t[w1]]) == set([b, c])
|
|
||||||
+ True
|
|
||||||
sage: ((a+b)*(a+c)).match((w0+b)*(w0+c))
|
|
||||||
{$0: a}
|
|
||||||
sage: t = ((a+b)*(a+c)).match((w0+w1)*(w0+w2))
|
|
||||||
- sage: t[w0], t[w1], t[w2]
|
|
||||||
- (a, c, b)
|
|
||||||
- sage: print(((a+b)*(a+c)).match((w0+w1)*(w1+w2)))
|
|
||||||
- None
|
|
||||||
+ sage: t[w0]
|
|
||||||
+ a
|
|
||||||
+ sage: set([t[w1], t[w2]]) == set([b, c])
|
|
||||||
+ True
|
|
||||||
+ sage: t = ((a+b)*(a+c)).match((w0+w1)*(w1+w2))
|
|
||||||
+ sage: t[w1]
|
|
||||||
+ a
|
|
||||||
+ sage: set([t[w0], t[w2]]) == set([b, c])
|
|
||||||
+ True
|
|
||||||
sage: t = (a*(x+y)+a*z+b).match(a*w0+w1)
|
|
||||||
- sage: t[w0], t[w1]
|
|
||||||
- (x + y, a*z + b)
|
|
||||||
+ sage: s = set([t[w0], t[w1]])
|
|
||||||
+ sage: s == set([x+y, a*z+b]) or s == set([z, a*(x+y)+b])
|
|
||||||
+ True
|
|
||||||
sage: print((a+b+c+d+f+g).match(c))
|
|
||||||
None
|
|
||||||
sage: (a+b+c+d+f+g).has(c)
|
|
||||||
@@ -4836,7 +4842,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
{$0: a + b + d + f + g}
|
|
||||||
sage: (a+b+c+d+f+g).match(c+g+w0)
|
|
||||||
{$0: a + b + d + f}
|
|
||||||
- sage: (a+b).match(a+b+w0)
|
|
||||||
+ sage: (a+b).match(a+b+w0) # known bug
|
|
||||||
{$0: 0}
|
|
||||||
sage: print((a*b^2).match(a^w0*b^w1))
|
|
||||||
None
|
|
||||||
@@ -5009,7 +5015,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
a^3 + b^3 + (x + y)^3
|
|
||||||
|
|
||||||
sage: t.subs(w0 == w0^2)
|
|
||||||
- (x^2 + y^2)^18 + a^16 + b^16
|
|
||||||
+ a^8 + b^8 + (x^2 + y^2)^6
|
|
||||||
|
|
||||||
sage: t.subs(a == b, b == c)
|
|
||||||
(x + y)^3 + b^2 + c^2
|
|
||||||
@@ -8392,9 +8398,13 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: SR(I).arctan2(1)
|
|
||||||
arctan2(I, 1)
|
|
||||||
sage: SR(CDF(0,1)).arctan2(1)
|
|
||||||
- NaN + +infinity*I
|
|
||||||
- sage: SR(1).arctan2(CDF(0,1)) # known bug
|
|
||||||
- 0.7853981633974484 - 19.012501686914433*I
|
|
||||||
+ Traceback (most recent call last):
|
|
||||||
+ ...
|
|
||||||
+ ValueError: power::eval(): division by zero
|
|
||||||
+ sage: SR(1).arctan2(CDF(0,1))
|
|
||||||
+ Traceback (most recent call last):
|
|
||||||
+ ...
|
|
||||||
+ ValueError: power::eval(): division by zero
|
|
||||||
|
|
||||||
sage: arctan2(0,oo)
|
|
||||||
0
|
|
||||||
@@ -8656,7 +8666,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
1/2*I*pi
|
|
||||||
sage: SR(1/2).arccosh()
|
|
||||||
arccosh(1/2)
|
|
||||||
- sage: SR(CDF(1/2)).arccosh() # rel tol 1e-15
|
|
||||||
+ sage: SR(CDF(1/2)).arccosh() # rel tol 1e-15
|
|
||||||
1.0471975511965976*I
|
|
||||||
sage: maxima('acosh(0.5)')
|
|
||||||
1.04719755119659...*%i
|
|
||||||
@@ -11687,7 +11697,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: a.solve(t)
|
|
||||||
[]
|
|
||||||
sage: b = a.canonicalize_radical(); b
|
|
||||||
- -23040.0*(-2.0*e^(1800*t) + 25.0*e^(900*t) - 32.0)*e^(-2400*t)
|
|
||||||
+ (46080.0*e^(1800*t) - 576000.0*e^(900*t) + 737280.0)*e^(-2400*t)
|
|
||||||
sage: b.solve(t)
|
|
||||||
[]
|
|
||||||
sage: b.solve(t, to_poly_solve=True)
|
|
||||||
@@ -12163,14 +12173,14 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
|
|
||||||
sage: (n,k,j)=var('n,k,j')
|
|
||||||
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n)
|
|
||||||
- -(-1)^(-j)*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n)
|
|
||||||
+ -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n)
|
|
||||||
sage: assume(j>-1)
|
|
||||||
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n)
|
|
||||||
1
|
|
||||||
sage: forget()
|
|
||||||
sage: assume(n>=j)
|
|
||||||
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n)
|
|
||||||
- -(-1)^(-j)*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n)
|
|
||||||
+ -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n)
|
|
||||||
sage: forget()
|
|
||||||
sage: assume(j==-1)
|
|
||||||
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n)
|
|
||||||
@@ -12178,7 +12188,7 @@ cdef class Expression(CommutativeRingElement):
|
|
||||||
sage: forget()
|
|
||||||
sage: assume(j<-1)
|
|
||||||
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n)
|
|
||||||
- -(-1)^(-j)*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n)
|
|
||||||
+ -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n)
|
|
||||||
sage: forget()
|
|
||||||
|
|
||||||
Check that :trac:`16176` is fixed::
|
|
||||||
diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py
|
|
||||||
index da6f0eef42..4bd65ef572 100644
|
|
||||||
--- a/src/sage/symbolic/relation.py
|
|
||||||
+++ b/src/sage/symbolic/relation.py
|
|
||||||
@@ -895,7 +895,7 @@ def solve(f, *args, **kwds):
|
|
||||||
sage: (r[0][x], r[0][y])
|
|
||||||
(2*lambert_w(1/2), 1)
|
|
||||||
sage: solve(-2*x**3 + 4*x**2 - 2*x + 6 > 0, x, algorithm='sympy')
|
|
||||||
- [x < (1/6*sqrt(77) + 79/54)^(1/3) + 1/9/(1/6*sqrt(77) + 79/54)^(1/3) + 2/3]
|
|
||||||
+ [x < 1/3*(1/2)^(1/3)*(9*sqrt(77) + 79)^(1/3) + 2/3*(1/2)^(2/3)/(9*sqrt(77) + 79)^(1/3) + 2/3]
|
|
||||||
sage: solve(sqrt(2*x^2 - 7) - (3 - x),x,algorithm='sympy')
|
|
||||||
[x == -8, x == 2]
|
|
||||||
sage: solve(sqrt(2*x + 9) - sqrt(x + 1) - sqrt(x + 4),x,algorithm='sympy')
|
|
@ -1,40 +0,0 @@
|
|||||||
diff --git a/src/sage/tests/py3_syntax.py b/src/sage/tests/py3_syntax.py
|
|
||||||
index e564860b48..86ab3725f9 100644
|
|
||||||
--- a/src/sage/tests/py3_syntax.py
|
|
||||||
+++ b/src/sage/tests/py3_syntax.py
|
|
||||||
@@ -179,15 +179,30 @@ class Python3SyntaxTest(SortedDirectoryWalkerABC):
|
|
||||||
sage: py3_syntax = Python3SyntaxTest()
|
|
||||||
sage: py3_syntax.test(src.name)
|
|
||||||
Invalid Python 3 syntax found:
|
|
||||||
- File "...py", line 1
|
|
||||||
- print "invalid print statement"
|
|
||||||
- ^
|
|
||||||
- SyntaxError: Missing parentheses in call to 'print'
|
|
||||||
+ Missing parentheses in call to 'print'...
|
|
||||||
sage: os.unlink(src.name)
|
|
||||||
"""
|
|
||||||
+
|
|
||||||
+ # compile all given files in memory, printing all errors
|
|
||||||
+ # inspired by the py_compile module (but without writing to file)
|
|
||||||
+ script = """
|
|
||||||
+import sys
|
|
||||||
+import importlib.machinery
|
|
||||||
+rv = 0
|
|
||||||
+for file in sys.argv[1:]:
|
|
||||||
+ loader = importlib.machinery.SourceFileLoader('<sage_test>', file)
|
|
||||||
+ source_bytes = loader.get_data(file)
|
|
||||||
+ try:
|
|
||||||
+ code = loader.source_to_code(source_bytes, file)
|
|
||||||
+ except Exception as err:
|
|
||||||
+ print(err)
|
|
||||||
+ rv = 1
|
|
||||||
+sys.exit(rv)
|
|
||||||
+"""
|
|
||||||
cmd = [
|
|
||||||
'python3',
|
|
||||||
- '-m', 'py_compile'
|
|
||||||
+ '-c',
|
|
||||||
+ script,
|
|
||||||
] + list(filenames)
|
|
||||||
process = subprocess.Popen(
|
|
||||||
cmd,
|
|
@ -1,31 +0,0 @@
|
|||||||
From 7419e0246230594ebfd5e7a2fe6b80d67abfc98a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeroen Demeyer <jdemeyer@cage.ugent.be>
|
|
||||||
Date: Tue, 20 Mar 2018 10:40:41 +0100
|
|
||||||
Subject: Fix sphinxify doctests
|
|
||||||
|
|
||||||
---
|
|
||||||
sagenb/misc/sphinxify.py | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sagenb/misc/sphinxify.py b/sagenb/misc/sphinxify.py
|
|
||||||
index 4f76d41..15623d9 100644
|
|
||||||
--- a/sagenb/misc/sphinxify.py
|
|
||||||
+++ b/sagenb/misc/sphinxify.py
|
|
||||||
@@ -47,11 +47,11 @@ def sphinxify(docstring, format='html'):
|
|
||||||
|
|
||||||
sage: from sage.misc.sphinxify import sphinxify
|
|
||||||
sage: sphinxify('A test')
|
|
||||||
- '...<div class="docstring">\n \n <p>A test</p>\n\n\n</div>'
|
|
||||||
+ '<div class="docstring">\n \n <p>A test</p>\n\n\n</div>'
|
|
||||||
sage: sphinxify('**Testing**\n`monospace`')
|
|
||||||
- '...<div class="docstring"...<strong>Testing</strong>\n<span class="math"...</p>\n\n\n</div>'
|
|
||||||
+ '<div class="docstring"...<strong>Testing</strong>\n<span class="math notranslate"...</p>\n\n\n</div>'
|
|
||||||
sage: sphinxify('`x=y`')
|
|
||||||
- '...<div class="docstring">\n \n <p><span class="math">x=y</span></p>\n\n\n</div>'
|
|
||||||
+ '<div class="docstring">\n \n <p><span class="math notranslate">x=y</span></p>\n\n\n</div>'
|
|
||||||
sage: sphinxify('`x=y`', format='text')
|
|
||||||
'x=y\n'
|
|
||||||
sage: sphinxify(':math:`x=y`', format='text')
|
|
||||||
--
|
|
||||||
cgit v1.0-1-gd88e
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
diff --git a/src/bin/sage b/src/bin/sage
|
|
||||||
index 397f30cbed..3fc473c343 100755
|
|
||||||
--- a/src/bin/sage
|
|
||||||
+++ b/src/bin/sage
|
|
||||||
@@ -980,8 +980,11 @@ if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then
|
|
||||||
+ # Redirect stdin from /dev/null. This helps with running TeX which
|
|
||||||
+ # tends to ask interactive questions if something goes wrong. These
|
|
||||||
+ # cause the build to hang. If stdin is /dev/null, TeX just aborts.
|
|
||||||
shift
|
|
||||||
- exec sage-python23 -m "sage_setup.docbuild" "$@"
|
|
||||||
+ exec sage-python23 -m sage_setup.docbuild "$@" </dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then
|
|
||||||
diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py
|
|
||||||
index 25f94f7b7d..3f07474d9b 100644
|
|
||||||
--- a/src/doc/common/conf.py
|
|
||||||
+++ b/src/doc/common/conf.py
|
|
||||||
@@ -627,7 +627,7 @@ def call_intersphinx(app, env, node, contnode):
|
|
||||||
sage: for line in open(thematic_index).readlines():
|
|
||||||
....: if "padics" in line:
|
|
||||||
....: sys.stdout.write(line)
|
|
||||||
- <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage Reference Manual: p-Adics ...)"><span>Introduction to the -adics</span></a></li>
|
|
||||||
+ <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage Reference Manual: p-Adics v...)"><span>Introduction to the -adics</span></a></li>
|
|
||||||
"""
|
|
||||||
debug_inf(app, "???? Trying intersphinx for %s"%node['reftarget'])
|
|
||||||
builder = app.builder
|
|
||||||
diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py
|
|
||||||
index 4f76d4113a..8f426b5989 100644
|
|
||||||
--- a/src/sage/misc/sphinxify.py
|
|
||||||
+++ b/src/sage/misc/sphinxify.py
|
|
||||||
@@ -47,11 +47,11 @@ def sphinxify(docstring, format='html'):
|
|
||||||
|
|
||||||
sage: from sage.misc.sphinxify import sphinxify
|
|
||||||
sage: sphinxify('A test')
|
|
||||||
- '...<div class="docstring">\n \n <p>A test</p>\n\n\n</div>'
|
|
||||||
+ '<div class="docstring">\n \n <p>A test</p>\n\n\n</div>'
|
|
||||||
sage: sphinxify('**Testing**\n`monospace`')
|
|
||||||
- '...<div class="docstring"...<strong>Testing</strong>\n<span class="math"...</p>\n\n\n</div>'
|
|
||||||
+ '<div class="docstring"...<strong>Testing</strong>\n<span class="math...</p>\n\n\n</div>'
|
|
||||||
sage: sphinxify('`x=y`')
|
|
||||||
- '...<div class="docstring">\n \n <p><span class="math">x=y</span></p>\n\n\n</div>'
|
|
||||||
+ '<div class="docstring">\n \n <p><span class="math notranslate nohighlight">x=y</span></p>\n\n\n</div>'
|
|
||||||
sage: sphinxify('`x=y`', format='text')
|
|
||||||
'x=y\n'
|
|
||||||
sage: sphinxify(':math:`x=y`', format='text')
|
|
||||||
diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
|
|
||||||
index fda76a4174..d3413239dd 100644
|
|
||||||
--- a/src/sage_setup/docbuild/sphinxbuild.py
|
|
||||||
+++ b/src/sage_setup/docbuild/sphinxbuild.py
|
|
||||||
@@ -207,7 +207,7 @@ def runsphinx():
|
|
||||||
try:
|
|
||||||
sys.stdout = SageSphinxLogger(sys.stdout, os.path.basename(output_dir))
|
|
||||||
sys.stderr = SageSphinxLogger(sys.stderr, os.path.basename(output_dir))
|
|
||||||
- sphinx.cmdline.main(sys.argv)
|
|
||||||
+ sphinx.cmdline.main(sys.argv[1:])
|
|
||||||
finally:
|
|
||||||
sys.stdout = saved_stdout
|
|
||||||
sys.stderr = saved_stderr
|
|
@ -0,0 +1,46 @@
|
|||||||
|
commit f02714d4aea80e17cb8df62bab75d7c1a1b61a8e
|
||||||
|
Author: Timo Kaufmann <timokau@zoho.com>
|
||||||
|
Date: Mon Jul 9 18:26:18 2018 +0200
|
||||||
|
|
||||||
|
Don't attempt to create dirs when showing pkg info
|
||||||
|
|
||||||
|
The script dir cannot be assumed to be writeable after installation.
|
||||||
|
|
||||||
|
diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg
|
||||||
|
index f3e02aeae5..190d558ad1 100755
|
||||||
|
--- a/build/bin/sage-spkg
|
||||||
|
+++ b/build/bin/sage-spkg
|
||||||
|
@@ -167,14 +167,6 @@ if [ -z "$SAGE_BUILD_DIR" ]; then
|
||||||
|
export SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build"
|
||||||
|
fi
|
||||||
|
|
||||||
|
-for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS"; do
|
||||||
|
- mkdir -p "$dir"
|
||||||
|
- if [ $? -ne 0 ]; then
|
||||||
|
- error_msg "Error creating directory $dir"
|
||||||
|
- exit 1
|
||||||
|
- fi
|
||||||
|
-done
|
||||||
|
-
|
||||||
|
|
||||||
|
# Remove '.' from PYTHONPATH, which may also come from SAGE_PATH, to avoid
|
||||||
|
# trouble with setuptools / easy_install (cf. #10192, #10176):
|
||||||
|
@@ -563,11 +555,13 @@ fi
|
||||||
|
# Setup directories
|
||||||
|
##################################################################
|
||||||
|
|
||||||
|
-mkdir -p "$SAGE_BUILD_DIR"
|
||||||
|
-if [ $? -ne 0 ]; then
|
||||||
|
- error_msg "Error creating directory $SAGE_BUILD_DIR"
|
||||||
|
- exit 1
|
||||||
|
-fi
|
||||||
|
+for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS" "$SAGE_BUILD_DIR"; do
|
||||||
|
+ mkdir -p "$dir"
|
||||||
|
+ if [ $? -ne 0 ]; then
|
||||||
|
+ error_msg "Error creating directory $dir"
|
||||||
|
+ exit 1
|
||||||
|
+ fi
|
||||||
|
+done
|
||||||
|
|
||||||
|
# Trac #5852: check write permissions
|
||||||
|
if [ ! -w "$SAGE_BUILD_DIR" ]; then
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py
|
|
||||||
index 7ff4f21675..1d72168833 100644
|
|
||||||
--- a/src/sage/misc/package.py
|
|
||||||
+++ b/src/sage/misc/package.py
|
|
||||||
@@ -350,7 +350,7 @@ def package_versions(package_type, local=False):
|
|
||||||
sage: 'gap' in std
|
|
||||||
True
|
|
||||||
sage: std['zn_poly']
|
|
||||||
- ('0.9.p11', '0.9.p11')
|
|
||||||
+ ('0.9', '0.9.p11')
|
|
||||||
"""
|
|
||||||
return {pkg['name']: (pkg['installed_version'], pkg['remote_version']) for pkg in list_packages(package_type, local=local).values()}
|
|
||||||
|
|
@ -3,17 +3,20 @@
|
|||||||
, fetchpatch
|
, fetchpatch
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "8.2";
|
version = "8.3";
|
||||||
name = "sage-src-${version}";
|
name = "sage-src-${version}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sagemath";
|
owner = "sagemath";
|
||||||
repo = "sage";
|
repo = "sage";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0d7vc16s7dj23an2cb8v5bhbnc6nsw20qhnnxr0xh8qg629027b8";
|
sha256 = "0mbm99m5xry21xpi4q3q96gx392liwbifywf5awvl0j85a7rkfyx";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixPatches = [
|
nixPatches = [
|
||||||
|
# https://trac.sagemath.org/ticket/25809
|
||||||
|
./patches/spkg-scripts.patch
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25309
|
# https://trac.sagemath.org/ticket/25309
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
name = "spkg-paths.patch";
|
name = "spkg-paths.patch";
|
||||||
@ -26,14 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "14s50yg3hpw9cp3v581dx7zfmpm2j972im7x30iwki8k45mjvk3i";
|
sha256 = "14s50yg3hpw9cp3v581dx7zfmpm2j972im7x30iwki8k45mjvk3i";
|
||||||
})
|
})
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25328
|
|
||||||
# https://trac.sagemath.org/ticket/25546
|
|
||||||
# https://trac.sagemath.org/ticket/25722
|
# https://trac.sagemath.org/ticket/25722
|
||||||
(fetchpatch {
|
|
||||||
name = "install-jupyter-kernel-in-correct-prefix.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch?id=72167b98e3f64326df6b2c78785df25539472fcc";
|
|
||||||
sha256 = "0pscnjhm7r2yr2rxnv4kkkq626vwaja720lixa3m3w9rwlxll5a7";
|
|
||||||
})
|
|
||||||
./patches/test-in-tmpdir.patch
|
./patches/test-in-tmpdir.patch
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25358
|
# https://trac.sagemath.org/ticket/25358
|
||||||
@ -43,27 +39,13 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1hhannz7xzprijakn2w2d0rhd5zv2zikik9p51i87bas3nc658f7";
|
sha256 = "1hhannz7xzprijakn2w2d0rhd5zv2zikik9p51i87bas3nc658f7";
|
||||||
})
|
})
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25357 rebased on 8.2
|
# Unfortunately inclusion in upstream sage was rejected. Instead the bug was
|
||||||
./patches/python3-syntax-without-write.patch
|
# fixed in python, but of course not backported to 2.7. So we'll probably
|
||||||
|
# have to keep this around until 2.7 is deprecated.
|
||||||
# https://trac.sagemath.org/ticket/25314
|
|
||||||
(fetchpatch {
|
|
||||||
name = "make-qepcad-test-optional.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch/?h=fe294c58bd035ef427e268901d54a6faa0058138";
|
|
||||||
sha256 = "003d5baf5c0n5rfg010ijwkwz8kg0s414cxwczs2vhdayxdixbix";
|
|
||||||
})
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25316
|
# https://trac.sagemath.org/ticket/25316
|
||||||
|
# https://github.com/python/cpython/pull/7476
|
||||||
./patches/python-5755-hotpatch.patch
|
./patches/python-5755-hotpatch.patch
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25354
|
|
||||||
# https://trac.sagemath.org/ticket/25531
|
|
||||||
(fetchpatch {
|
|
||||||
name = "cysignals-include.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch/?h=28778bd25a37c80884d2b24e0683fb2989300cef";
|
|
||||||
sha256 = "0fiiiw91pgs8avm9ggj8hb64bhqzl6jcw094d94nhirmh8w2jmc5";
|
|
||||||
})
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25315
|
# https://trac.sagemath.org/ticket/25315
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
name = "find-libraries-in-dyld-library-path.patch";
|
name = "find-libraries-in-dyld-library-path.patch";
|
||||||
@ -75,9 +57,6 @@ stdenv.mkDerivation rec {
|
|||||||
# https://trac.sagemath.org/ticket/25312
|
# https://trac.sagemath.org/ticket/25312
|
||||||
./patches/pari-stackwarn.patch
|
./patches/pari-stackwarn.patch
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25311
|
|
||||||
./patches/zn_poly_version.patch
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25345
|
# https://trac.sagemath.org/ticket/25345
|
||||||
# (upstream patch doesn't apply on 8.2 source)
|
# (upstream patch doesn't apply on 8.2 source)
|
||||||
./patches/dochtml-optional.patch
|
./patches/dochtml-optional.patch
|
||||||
@ -106,27 +85,6 @@ stdenv.mkDerivation rec {
|
|||||||
# the last version.
|
# the last version.
|
||||||
./patches/eclib-regulator-precision.patch
|
./patches/eclib-regulator-precision.patch
|
||||||
|
|
||||||
# sphinx 1.6 -> 1.7 upgrade
|
|
||||||
# https://trac.sagemath.org/ticket/24935
|
|
||||||
./patches/sphinx-1.7.patch
|
|
||||||
|
|
||||||
# Adapt hashes to new boost version
|
|
||||||
# https://trac.sagemath.org/ticket/22243
|
|
||||||
# (this ticket doesn't only upgrade boost but also avoids this problem in the future)
|
|
||||||
(fetchpatch {
|
|
||||||
name = "boost-upgrade.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch?id=a24a9c6b30b93957333a3116196214a931325b69";
|
|
||||||
sha256 = "0z3870g2ms2a81vnw08dc2i4k7jr62w8fggvcdwaavgd1wvdxwfl";
|
|
||||||
})
|
|
||||||
|
|
||||||
# gfan 0.6.2
|
|
||||||
# https://trac.sagemath.org/ticket/23353
|
|
||||||
(fetchpatch {
|
|
||||||
name = "gfan-update.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch/?h=420215fc469cde733ec7a339e59b78ad6eec804c&id=112498a293ea2bf563e41aed35f1aa608f01b349";
|
|
||||||
sha256 = "0ga3hkx8cr23dpc919lgvpi5lmy0d728jkq9z6kf0fl9s8g31mxb";
|
|
||||||
})
|
|
||||||
|
|
||||||
# New glpk version has new warnings, filter those out until upstream sage has found a solution
|
# New glpk version has new warnings, filter those out until upstream sage has found a solution
|
||||||
# https://trac.sagemath.org/ticket/24824
|
# https://trac.sagemath.org/ticket/24824
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
@ -135,58 +93,14 @@ stdenv.mkDerivation rec {
|
|||||||
stripLen = 1;
|
stripLen = 1;
|
||||||
})
|
})
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25329
|
|
||||||
(fetchpatch {
|
|
||||||
name = "dont-check-exact-glpk-version.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch?id2=8bdc326ba57d1bb9664f63cf165a9e9920cc1afc&id=89d068d8d77316bfffa6bf8e9ebf70b3b3b88e5c";
|
|
||||||
sha256 = "00knwxs6fmymfgfl0q5kcavmxm9sf90a4r76y35n5s55gj8pl918";
|
|
||||||
})
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25355
|
|
||||||
(fetchpatch {
|
|
||||||
name = "maxima-5.41.0.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch/?id=87328023c4739abdf24108038201e3fa9bdfc739";
|
|
||||||
sha256 = "0hxi7qr5mfx1bc32r8j7iba4gzd7c6v63asylyf5cbyp86azpb7i";
|
|
||||||
})
|
|
||||||
|
|
||||||
# Update cddlib from 0.94g to 0.94h.
|
|
||||||
# https://trac.sagemath.org/ticket/25341 (doesn't apply to 8.2 sources)
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/u2-version-cddlib-094h.patch";
|
|
||||||
sha256 = "0fmw7pzbaxs2dshky6iw9pr8i23p9ih2y2lw661qypdrxh5xw03k";
|
|
||||||
stripLen = 1;
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
name = "revert-cddlib-doctest-changes.patch";
|
|
||||||
url = "https://git.sagemath.org/sage.git/patch/?id=269c1e1551285566b8ba7a2b890989e5590e9f11";
|
|
||||||
sha256 = "12bcjhq7hm2pmmj2bgjvcffjyls2x7q61ivlnaj5v5bsvhc183iy";
|
|
||||||
revert = true;
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
# Only formatting changes.
|
# Only formatting changes.
|
||||||
# https://trac.sagemath.org/ticket/25260
|
# https://trac.sagemath.org/ticket/25260
|
||||||
./patches/numpy-1.14.3.patch
|
./patches/numpy-1.14.3.patch
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/24374
|
|
||||||
(fetchpatch {
|
|
||||||
name = "networkx-2.1.patch";
|
|
||||||
url = "https://salsa.debian.org/science-team/sagemath/raw/487df9ae48ca1d93d9b1cb3af8745d31e30fb741/debian/patches/u0-version-networkx-2.1.patch";
|
|
||||||
sha256 = "1xxxawygbgxgvlv7b4w8hhzgdnva4rhmgdxaiaa3pwdwln0yc750";
|
|
||||||
stripLen = 1;
|
|
||||||
})
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/24927 rebased
|
|
||||||
./patches/arb-2.13.0.patch
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/24838 rebased
|
|
||||||
./patches/pynac-0.7.22.patch
|
|
||||||
|
|
||||||
# https://trac.sagemath.org/ticket/25862
|
|
||||||
./patches/eclib-20180710.patch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = nixPatches ++ packageUpgradePatches;
|
patches = nixPatches ++ packageUpgradePatches ++ [
|
||||||
|
./patches/known-padics-bug.patch
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# make sure shebangs etc are fixed, but sage-python23 still works
|
# make sure shebangs etc are fixed, but sage-python23 still works
|
||||||
|
Loading…
Reference in New Issue
Block a user