Merge pull request #43281 from timokau/sage-8.3

sage: 8.2 -> 8.3

authored by Michael Raskin and committed by GitHub b79dbfe4 20f1388c

+411 -1232
+8 -36
pkgs/applications/science/math/sage/default.nix
··· 24 24 pybrial = self.callPackage ./pybrial.nix {}; 25 25 26 26 sagelib = self.callPackage ./sagelib.nix { 27 - inherit flint ecl pari eclib ntl arb; 27 + inherit flint ecl pari eclib arb; 28 28 inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular; 29 29 linbox = nixpkgs.linbox.override { withSage = true; }; 30 30 }; ··· 45 45 }; 46 46 47 47 sage-env = self.callPackage ./sage-env.nix { 48 - inherit sage-src python rWrapper openblas-cblas-pc ecl singular eclib pari palp flint pynac pythonEnv giac ntl; 48 + inherit sage-src python rWrapper openblas-cblas-pc ecl singular eclib pari palp flint pynac pythonEnv; 49 49 pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig 50 50 }; 51 51 52 52 sage-with-env = self.callPackage ./sage-with-env.nix { 53 - inherit pari eclib pythonEnv ntl; 54 - inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular giac; 53 + inherit pari eclib pythonEnv; 54 + inherit sage-src openblas-blas-pc openblas-cblas-pc openblas-lapack-pc pynac singular; 55 55 pkg-config = nixpkgs.pkgconfig; # not to confuse with pythonPackages.pkgconfig 56 56 three = nodePackages_8_x.three; 57 57 }; ··· 106 106 }); 107 107 }; 108 108 109 - # https://trac.sagemath.org/ticket/25532 110 - ntl = nixpkgs.ntl.overrideAttrs (oldAttrs: rec { 111 - name = "ntl-10.5.0"; 112 - sourceRoot = "${name}/src"; 113 - src = fetchurl { 114 - url = "http://www.shoup.net/ntl/${name}.tar.gz"; 115 - sha256 = "1lmldaldgfr2b2a6585m3np5ds8bq1bis2s1ajycjm49vp4kc2xr"; 116 - }; 117 - }); 118 - 119 - giac = nixpkgs.giac.override { inherit ntl; }; 120 109 arb = nixpkgs.arb.override { inherit flint; }; 121 110 122 - # update causes issues 123 - # https://groups.google.com/forum/#!topic/sage-packaging/cS3v05Q0zso 124 - # https://trac.sagemath.org/ticket/24735 125 - singular = (nixpkgs.singular.override { inherit ntl flint; }).overrideAttrs (oldAttrs: { 126 - name = "singular-4.1.0p3"; 127 - src = fetchurl { 128 - url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/4-1-0/singular-4.1.0p3.tar.gz"; 129 - sha256 = "105zs3zk46b1cps403ap9423rl48824ap5gyrdgmg8fma34680a4"; 130 - }; 131 - }); 111 + singular = nixpkgs.singular.override { inherit flint; }; 132 112 133 113 # *not* to confuse with the python package "pynac" 134 - # https://trac.sagemath.org/ticket/24838 (depends on arb update) 135 114 pynac = nixpkgs.pynac.override { inherit singular flint; }; 136 115 137 - eclib = nixpkgs.eclib.override { inherit pari ntl; }; 116 + eclib = nixpkgs.eclib.override { inherit pari; }; 138 117 139 118 # With openblas (64 bit), the tests fail the same way as when sage is build with 140 119 # openblas instead of openblasCompat. Apparently other packages somehow use flints 141 120 # blas when it is available. Alternative would be to override flint to use 142 121 # openblasCompat. 143 - flint = nixpkgs.flint.override { withBlas = false; inherit ntl; }; 122 + flint = nixpkgs.flint.override { withBlas = false; }; 144 123 145 124 # Multiple palp dimensions need to be available and sage expects them all to be 146 125 # in the same folder. ··· 166 145 # https://trac.sagemath.org/ticket/22191 167 146 ecl = nixpkgs.ecl_16_1_2; 168 147 169 - # sage currently uses an unreleased version of pari 170 - pari = (nixpkgs.pari.override { withThread = false; }).overrideAttrs (attrs: rec { 171 - version = "2.10-1280-g88fb5b3"; # on update remove pari-stackwarn patch from `sage-src.nix` 172 - src = fetchurl { 173 - url = "mirror://sageupstream/pari/pari-${version}.tar.gz"; 174 - sha256 = "19gbsm8jqq3hraanbmsvzkbh88iwlqbckzbnga3y76r7k42akn7m"; 175 - }; 176 - }); 148 + pari = nixpkgs.pari.override { withThread = false; }; 177 149 in 178 150 python.pkgs.sage-wrapper // { 179 151 doc = python.pkgs.sagedoc;
-427
pkgs/applications/science/math/sage/patches/arb-2.13.0.patch
··· 1 - commit c885927e25b29bd23869e02379c2918da430323e 2 - Author: Timo Kaufmann <timokau@zoho.com> 3 - Date: Sat Jun 30 02:26:15 2018 +0200 4 - 5 - diff --git a/build/pkgs/arb/checksums.ini b/build/pkgs/arb/checksums.ini 6 - index 1924ee03c3..9323b97391 100644 7 - --- a/build/pkgs/arb/checksums.ini 8 - +++ b/build/pkgs/arb/checksums.ini 9 - @@ -1,4 +1,4 @@ 10 - tarball=arb-VERSION.tar.gz 11 - -sha1=27476d0529e48a07d92da90bd0fb80dd18f443e3 12 - -md5=733285d9705d10b8024e551ffa81952f 13 - -cksum=2391183744 14 - +sha1=44eda7bf8eaa666c45b1fc2c1b5bd08756d94b58 15 - +md5=fa24de9fffe4394fb6a7a6792e2ecc5f 16 - +cksum=3689220688 17 - diff --git a/build/pkgs/arb/package-version.txt b/build/pkgs/arb/package-version.txt 18 - index c8810e9bdb..fb2c0766b7 100644 19 - --- a/build/pkgs/arb/package-version.txt 20 - +++ b/build/pkgs/arb/package-version.txt 21 - @@ -1 +1 @@ 22 - -2.12.0.p0 23 - +2.13.0 24 - diff --git a/build/pkgs/arb/patches/arb-pie-hardening-conflict.patch b/build/pkgs/arb/patches/arb-pie-hardening-conflict.patch 25 - deleted file mode 100644 26 - index 3e5c0e708b..0000000000 27 - --- a/build/pkgs/arb/patches/arb-pie-hardening-conflict.patch 28 - +++ /dev/null 29 - @@ -1,17 +0,0 @@ 30 - -In newer binutils, ld options -r and -pie conflict. 31 - -Patch due to Jörg-Volker Peetz 32 - -(source : https://groups.google.com/d/msg/sage-devel/TduebNoZuBE/sEULolL0BQAJ), 33 - -packaged by Emmanuel Charpentier 34 - - 35 - -diff -ru arb-2.8.1-orig/Makefile.subdirs arb-2.8.1-new/Makefile.subdirs 36 - ---- arb-2.8.1-orig/Makefile.subdirs 2015-12-31 17:30:01.000000000 +0100 37 - -+++ arb-2.8.1-new/Makefile.subdirs 2016-11-07 18:50:34.540051779 +0100 38 - -@@ -52,7 +52,7 @@ 39 - - $(QUIET_CC) $(CC) $(CFLAGS) $(INCS) -c $< -o $@ -MMD -MP -MF "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$(BUILD_DIR)/$(MOD_DIR)_$*.d" -MT "$@" 40 - - 41 - - $(MOD_LOBJ): $(LOBJS) 42 - -- $(QUIET_CC) $(CC) $(ABI_FLAG) -Wl,-r $^ -o $@ -nostdlib 43 - -+ $(QUIET_CC) $(CC) $(ABI_FLAG) -r $^ -o $@ -nostdlib 44 - - 45 - - -include $(LOBJS:.lo=.d) 46 - - 47 - diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx 48 - index 70d51e655a..00e7caea2c 100644 49 - --- a/src/sage/rings/complex_arb.pyx 50 - +++ b/src/sage/rings/complex_arb.pyx 51 - @@ -857,14 +857,14 @@ class ComplexBallField(UniqueRepresentation, Field): 52 - [0.500000000000000 +/- 2.09e-16] 53 - 54 - sage: CBF.integral(lambda x, _: x.gamma(), 1 - CBF(i), 1 + CBF(i)) 55 - - [+/- 3.95e-15] + [1.5723926694981 +/- 4.53e-14]*I 56 - + [+/- 4...e-15] + [1.5723926694981 +/- 4...e-14]*I 57 - 58 - sage: C = ComplexBallField(100) 59 - sage: C.integral(lambda x, _: x.cos() * x.sin(), 0, 1) 60 - [0.35403670913678559674939205737 +/- 8.89e-30] 61 - 62 - sage: CBF.integral(lambda x, _: (x + x.exp()).sin(), 0, 8) 63 - - [0.34740017266 +/- 6.36e-12] 64 - + [0.34740017266 +/- 6...e-12] 65 - 66 - sage: C = ComplexBallField(2000) 67 - sage: C.integral(lambda x, _: (x + x.exp()).sin(), 0, 8) # long time 68 - @@ -879,14 +879,14 @@ class ComplexBallField(UniqueRepresentation, Field): 69 - ....: else: 70 - ....: return z.sqrt() 71 - sage: CBF.integral(my_sqrt, -1 + CBF(i), -1 - CBF(i)) 72 - - [+/- 1.14e-14] + [-0.4752076627926 +/- 5.18e-14]*I 73 - + [+/- 1.14e-14] + [-0.4752076627926 +/- 5...e-14]*I 74 - 75 - Note, though, that proper handling of the ``analytic`` flag is required 76 - even when the path does not touch the branch cut:: 77 - 78 - sage: correct = CBF.integral(my_sqrt, 1, 2); correct 79 - [1.21895141649746 +/- 3.73e-15] 80 - - sage: RBF(integral(sqrt(x), x, 1, 2)) 81 - + sage: RBF(integral(sqrt(x), x, 1, 2)) # long time 82 - [1.21895141649746 +/- 1.79e-15] 83 - sage: wrong = CBF.integral(lambda z, _: z.sqrt(), 1, 2) # WRONG! 84 - sage: correct - wrong 85 - @@ -915,9 +915,9 @@ class ComplexBallField(UniqueRepresentation, Field): 86 - the integrand is unbounded:: 87 - 88 - sage: CBF.integral(lambda x, _: 1/x, -1, 1) 89 - - [+/- inf] + [+/- inf]*I 90 - + nan + nan*I 91 - sage: CBF.integral(lambda x, _: 1/x, 10^-1000, 1) 92 - - [+/- inf] + [+/- inf]*I 93 - + nan + nan*I 94 - sage: CBF.integral(lambda x, _: 1/x, 10^-1000, 1, abs_tol=1e-10) 95 - [2302.5850930 +/- 1.26e-8] 96 - 97 - @@ -928,14 +928,15 @@ class ComplexBallField(UniqueRepresentation, Field): 98 - sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, abs_tol=1e-450) 99 - [2.304377150950e-439 +/- 9.74e-452] 100 - sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, abs_tol=0) 101 - - [2.304377150949e-439 +/- 7.53e-452] 102 - - sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, rel_tol=1e-4, abs_tol=0) 103 - - [2.30438e-439 +/- 3.90e-445] 104 - + [2.304377150950e-439 +/- 7...e-452] 105 - + sage: CBF.integral(lambda x, _: x.exp(), -1020, -1010, rel_tol=1e-2, abs_tol=0) 106 - + [2.30438e-439 +/- 5.94e-445] 107 - 108 - - sage: CBF.integral(lambda x, _: x*(1/x).sin(), 0, 1) 109 - - [+/- 0.644] 110 - - sage: CBF.integral(lambda x, _: x*(1/x).sin(), 0, 1, use_heap=True) 111 - - [0.3785300 +/- 4.32e-8] 112 - + sage: epsi = CBF(1e-10) 113 - + sage: CBF.integral(lambda x, _: x*(1/x).sin(), epsi, 1) 114 - + [0.38 +/- 8.54e-3] 115 - + sage: CBF.integral(lambda x, _: x*(1/x).sin(), epsi, 1, use_heap=True) 116 - + [0.37853002 +/- 8.73e-9] 117 - 118 - ALGORITHM: 119 - 120 - @@ -951,12 +952,12 @@ class ComplexBallField(UniqueRepresentation, Field): 121 - 122 - sage: i = QuadraticField(-1).gen() 123 - sage: CBF.integral(lambda x, _: (1 + i*x).gamma(), -1, 1) 124 - - [1.5723926694981 +/- 4.53e-14] + [+/- 3.95e-15]*I 125 - + [1.5723926694981 +/- 4...e-14] + [+/- 4...e-15]*I 126 - 127 - - sage: ComplexBallField(10000).integral(lambda x, _: x.sin(), 0, 1, rel_tol=1e-400) 128 - - [0.459... +/- ...e-4...] 129 - + sage: ComplexBallField(10000).integral(lambda x, _: x.sin(), 0, 1, rel_tol=1e-300) 130 - + [0.459... +/- ...e-3...] 131 - sage: CBF.integral(lambda x, _: x.sin(), 0, 100, rel_tol=10) 132 - - [+/- 7.61] 133 - + [0.138 +/- 5.53e-4] 134 - 135 - sage: ComplexBallField(10000).integral(lambda x, _: x.sin(), 0, 1, abs_tol=1e-400) 136 - [0.459697... +/- ...e-4...] 137 - @@ -2389,9 +2390,9 @@ cdef class ComplexBall(RingElement): 138 - sage: ~CBF(i/3) 139 - [-3.00000000000000 +/- 9.44e-16]*I 140 - sage: ~CBF(0) 141 - - [+/- inf] 142 - + nan 143 - sage: ~CBF(RIF(10,11)) 144 - - [0.1 +/- 9.53e-3] 145 - + [0.1 +/- 9.10e-3] 146 - """ 147 - cdef ComplexBall res = self._new() 148 - if _do_sig(prec(self)): sig_on() 149 - @@ -2512,9 +2513,9 @@ cdef class ComplexBall(RingElement): 150 - sage: CBF(-2, 1)/CBF(1, 1/3) 151 - [-1.500000000000000 +/- 8.83e-16] + [1.500000000000000 +/- 5.64e-16]*I 152 - sage: CBF(2+I)/CBF(0) 153 - - [+/- inf] + [+/- inf]*I 154 - + nan + nan*I 155 - sage: CBF(1)/CBF(0) 156 - - [+/- inf] 157 - + nan 158 - sage: CBF(1)/CBF(RBF(0, 1.)) 159 - nan 160 - """ 161 - @@ -2543,9 +2544,9 @@ cdef class ComplexBall(RingElement): 162 - sage: CBF(0)^(1/3) 163 - 0 164 - sage: CBF(0)^(-1) 165 - - [+/- inf] 166 - + nan 167 - sage: CBF(0)^(-2) 168 - - [+/- inf] + [+/- inf]*I 169 - + nan + nan*I 170 - 171 - TESTS:: 172 - 173 - @@ -2656,12 +2657,12 @@ cdef class ComplexBall(RingElement): 174 - sage: CBF(1).rising_factorial(5) 175 - 120.0000000000000 176 - sage: CBF(1/3, 1/2).rising_factorial(300) 177 - - [-3.87949484514e+612 +/- 5.23e+600] + [-3.52042209763e+612 +/- 5.55e+600]*I 178 - + [-3.87949484514e+612 +/- 5...e+600] + [-3.52042209763e+612 +/- 5...e+600]*I 179 - 180 - sage: CBF(1).rising_factorial(-1) 181 - nan 182 - sage: CBF(1).rising_factorial(2**64) 183 - - [+/- 2.30e+347382171305201370464] 184 - + [+/- 2.30e+347382171326740403407] 185 - sage: ComplexBallField(128)(1).rising_factorial(2**64) 186 - [2.343691126796861348e+347382171305201285713 +/- 4.71e+347382171305201285694] 187 - sage: CBF(1/2).rising_factorial(CBF(2,3)) 188 - @@ -2700,7 +2701,7 @@ cdef class ComplexBall(RingElement): 189 - [1.000000000000000 +/- 2.83e-16] + [-0.441271200305303 +/- 2.82e-16]*I 190 - 191 - sage: CBF('inf').log() 192 - - nan + nan*I 193 - + [+/- inf] 194 - sage: CBF(2).log(0) 195 - nan + nan*I 196 - """ 197 - @@ -2808,7 +2809,7 @@ cdef class ComplexBall(RingElement): 198 - sage: CBF(pi/2, 1/10).tan() 199 - [+/- 2.87e-14] + [10.0333111322540 +/- 2.36e-14]*I 200 - sage: CBF(pi/2).tan() 201 - - [+/- inf] 202 - + nan 203 - """ 204 - cdef ComplexBall res = self._new() 205 - if _do_sig(prec(self)): sig_on() 206 - @@ -2825,7 +2826,7 @@ cdef class ComplexBall(RingElement): 207 - sage: CBF(pi, 1/10).cot() 208 - [+/- 5.74e-14] + [-10.0333111322540 +/- 2.81e-14]*I 209 - sage: CBF(pi).cot() 210 - - [+/- inf] 211 - + nan 212 - """ 213 - cdef ComplexBall res = self._new() 214 - if _do_sig(prec(self)): sig_on() 215 - @@ -3211,9 +3212,9 @@ cdef class ComplexBall(RingElement): 216 - 1.000000000000000*I 217 - 218 - sage: CBF(2+3*I).hypergeometric([1/4,1/3],[1/2]) 219 - - [0.7871684267473 +/- 7.34e-14] + [0.2749254173721 +/- 9.23e-14]*I 220 - + [0.7871684267473 +/- 7...e-14] + [0.2749254173721 +/- 9...e-14]*I 221 - sage: CBF(2+3*I).hypergeometric([1/4,1/3],[1/2],regularized=True) 222 - - [0.4441122268685 +/- 3.96e-14] + [0.1551100567338 +/- 5.75e-14]*I 223 - + [0.4441122268685 +/- 3...e-14] + [0.1551100567338 +/- 5...e-14]*I 224 - 225 - sage: CBF(5).hypergeometric([2,3], [-5]) 226 - nan + nan*I 227 - @@ -4041,9 +4042,9 @@ cdef class ComplexBall(RingElement): 228 - 229 - sage: phi = CBF(1,1) 230 - sage: (CBF.pi()/2).elliptic_e_inc(phi) 231 - - [1.283840957898 +/- 3.23e-13] + [-0.5317843366915 +/- 7.79e-14]*I 232 - + [1.283840957898 +/- 3...e-13] + [-0.5317843366915 +/- 7...e-14]*I 233 - sage: phi.elliptic_e() 234 - - [1.2838409578982 +/- 5.90e-14] + [-0.5317843366915 +/- 3.35e-14]*I 235 - + [1.2838409578982 +/- 5...e-14] + [-0.5317843366915 +/- 3...e-14]*I 236 - 237 - sage: phi = CBF(2, 3/7) 238 - sage: (CBF.pi()/2).elliptic_e_inc(phi) 239 - @@ -4312,8 +4313,7 @@ cdef class ComplexBall(RingElement): 240 - sage: CBF(10).laguerre_L(3, 2) 241 - [-6.666666666667 +/- 4.15e-13] 242 - sage: CBF(5,7).laguerre_L(CBF(2,3), CBF(1,-2)) 243 - - [5515.315030271 +/- 4.37e-10] + [-12386.942845271 +/- 5.47e-10]*I 244 - - 245 - + [5515.315030271 +/- 4...e-10] + [-12386.942845271 +/- 5...e-10]*I 246 - """ 247 - cdef ComplexBall my_n = self._parent.coerce(n) 248 - cdef ComplexBall my_m = self._parent.coerce(m) 249 - @@ -4357,9 +4357,9 @@ cdef class ComplexBall(RingElement): 250 - EXAMPLES:: 251 - 252 - sage: CBF(1/2).legendre_P(5) 253 - - [0.08984375000000000 +/- 4.5...e-18] 254 - + [0.0898437500000000 +/- 7...e-17] 255 - sage: CBF(1,2).legendre_P(CBF(2,3), CBF(0,1)) 256 - - [0.10996180744364 +/- 7.45e-15] + [0.14312767804055 +/- 8.38e-15]*I 257 - + [0.10996180744364 +/- 7.12e-15] + [0.14312767804055 +/- 8.07e-15]*I 258 - sage: CBF(-10).legendre_P(5, 325/100) 259 - [-22104403.487377 +/- 6.81e-7] + [53364750.687392 +/- 7.25e-7]*I 260 - sage: CBF(-10).legendre_P(5, 325/100, type=3) 261 - @@ -4393,9 +4393,9 @@ cdef class ComplexBall(RingElement): 262 - sage: CBF(1/2).legendre_Q(5) 263 - [0.55508089057168 +/- 2.79e-15] 264 - sage: CBF(1,2).legendre_Q(CBF(2,3), CBF(0,1)) 265 - - [0.167678710 +/- 4.60e-10] + [-0.161558598 +/- 7.47e-10]*I 266 - + [0.167678710 +/- 3.91e-10] + [-0.161558598 +/- 6.77e-10]*I 267 - sage: CBF(-10).legendre_Q(5, 325/100) 268 - - [-83825154.36008 +/- 4.94e-6] + [-34721515.80396 +/- 5.40e-6]*I 269 - + [-83825154.36008 +/- 5.02e-6] + [-34721515.80396 +/- 5.42e-6]*I 270 - sage: CBF(-10).legendre_Q(5, 325/100, type=3) 271 - [-4.797306921692e-6 +/- 6.82e-19] + [-4.797306921692e-6 +/- 6.57e-19]*I 272 - 273 - diff --git a/src/sage/rings/polynomial/polynomial_complex_arb.pyx b/src/sage/rings/polynomial/polynomial_complex_arb.pyx 274 - index c436d4705b..ef611a566b 100644 275 - --- a/src/sage/rings/polynomial/polynomial_complex_arb.pyx 276 - +++ b/src/sage/rings/polynomial/polynomial_complex_arb.pyx 277 - @@ -543,7 +543,7 @@ cdef class Polynomial_complex_arb(Polynomial): 278 - sage: (1 - x/3).inverse_series_trunc(3) 279 - ([0.1111111111111111 +/- 5.99e-17])*x^2 + ([0.3333333333333333 +/- 7.04e-17])*x + 1.000000000000000 280 - sage: x.inverse_series_trunc(1) 281 - - [+/- inf] 282 - + nan 283 - sage: Pol(0).inverse_series_trunc(2) 284 - (nan + nan*I)*x + nan + nan*I 285 - 286 - @@ -671,7 +671,7 @@ cdef class Polynomial_complex_arb(Polynomial): 287 - sage: pol._sqrt_series(2) 288 - ([+/- 7.51e-3] + [+/- 0.501]*I)*x + [+/- 5.01e-3] + [+/- 1.01]*I 289 - sage: x._sqrt_series(2) 290 - - ([+/- inf] + [+/- inf]*I)*x 291 - + (nan + nan*I)*x 292 - """ 293 - cdef Polynomial_complex_arb res = self._new() 294 - if n < 0: 295 - diff --git a/src/sage/rings/real_arb.pyx b/src/sage/rings/real_arb.pyx 296 - index c9f68e38d7..76e3037a9a 100644 297 - --- a/src/sage/rings/real_arb.pyx 298 - +++ b/src/sage/rings/real_arb.pyx 299 - @@ -161,7 +161,7 @@ values and should be preferred:: 300 - 301 - sage: RBF(NaN) < RBF(infinity) 302 - False 303 - - sage: 1/RBF(0) <= RBF(infinity) 304 - + sage: RBF(0).add_error(infinity) <= RBF(infinity) 305 - True 306 - 307 - TESTS:: 308 - @@ -252,6 +252,8 @@ cdef void mpfi_to_arb(arb_t target, const mpfi_t source, const long precision): 309 - (+infinity, +infinity) 310 - sage: RBF(RIF(-infinity)).endpoints() 311 - (-infinity, -infinity) 312 - + sage: RBF(RIF(-infinity, infinity)).endpoints() 313 - + (-infinity, +infinity) 314 - sage: RIF(RBF(infinity)).endpoints() 315 - (+infinity, +infinity) 316 - sage: RIF(RBF(-infinity)).endpoints() 317 - @@ -266,10 +268,11 @@ cdef void mpfi_to_arb(arb_t target, const mpfi_t source, const long precision): 318 - if _do_sig(precision): sig_on() 319 - mpfi_get_left(left, source) 320 - mpfi_get_right(right, source) 321 - - arb_set_interval_mpfr(target, left, right, precision) 322 - - # Work around weakness of arb_set_interval_mpfr(tgt, inf, inf) 323 - - if mpfr_equal_p(left, right): 324 - - mag_zero(arb_radref(target)) 325 - + if mpfr_inf_p(left) and mpfr_inf_p(right) and mpfr_sgn(left) < 0 < mpfr_sgn(right): 326 - + # Work around a weakness of arb_set_interval_mpfr(tgt, -inf, inf) 327 - + arb_zero_pm_inf(target) 328 - + else: 329 - + arb_set_interval_mpfr(target, left, right, precision) 330 - if _do_sig(precision): sig_off() 331 - 332 - mpfr_clear(left) 333 - @@ -649,17 +652,15 @@ class RealBallField(UniqueRepresentation, Field): 334 - EXAMPLES:: 335 - 336 - sage: RBF.some_elements() 337 - - [1.000000000000000, 338 - - [0.3333333333333333 +/- 7.04e-17], 339 - + [0, 1.000000000000000, [0.3333333333333333 +/- 7.04e-17], 340 - [-4.733045976388941e+363922934236666733021124 +/- 3.46e+363922934236666733021108], 341 - - [+/- inf], 342 - - [+/- inf], 343 - - nan] 344 - + [+/- inf], [+/- inf], [+/- inf], nan] 345 - """ 346 - import sage.symbolic.constants 347 - - return [self(1), self(1)/3, 348 - + inf = self(sage.rings.infinity.Infinity) 349 - + return [self(0), self(1), self(1)/3, 350 - -self(2)**(Integer(2)**80), 351 - - self(sage.rings.infinity.Infinity), ~self(0), 352 - + inf, -inf, self.zero().add_error(inf), 353 - self.element_class(self, sage.symbolic.constants.NotANumber())] 354 - 355 - def _sum_of_products(self, terms): 356 - @@ -881,7 +882,7 @@ class RealBallField(UniqueRepresentation, Field): 357 - sage: RBF.gamma(5) 358 - 24.00000000000000 359 - sage: RBF.gamma(10**20) 360 - - [+/- 5.92e+1956570551809674821757] 361 - + [+/- 5.50e+1956570552410610660600] 362 - sage: RBF.gamma(1/3) 363 - [2.678938534707747 +/- 8.99e-16] 364 - sage: RBF.gamma(-5) 365 - @@ -2247,7 +2248,7 @@ cdef class RealBall(RingElement): 366 - sage: inf = RBF(+infinity) 367 - sage: other_inf = RBF(+infinity, 42.r) 368 - sage: neg_inf = RBF(-infinity) 369 - - sage: extended_line = 1/RBF(0) 370 - + sage: extended_line = RBF(0).add_error(infinity) 371 - sage: exact_nan = inf - inf 372 - sage: exact_nan.mid(), exact_nan.rad() 373 - (NaN, 0.00000000) 374 - @@ -2659,7 +2660,7 @@ cdef class RealBall(RingElement): 375 - sage: ~RBF(5) 376 - [0.2000000000000000 +/- 4.45e-17] 377 - sage: ~RBF(0) 378 - - [+/- inf] 379 - + nan 380 - sage: RBF(RIF(-0.1,0.1)) 381 - [+/- 0.101] 382 - 383 - @@ -2739,7 +2740,7 @@ cdef class RealBall(RingElement): 384 - sage: RBF(pi)/RBF(e) 385 - [1.155727349790922 +/- 8.43e-16] 386 - sage: RBF(2)/RBF(0) 387 - - [+/- inf] 388 - + nan 389 - """ 390 - cdef RealBall res = self._new() 391 - if _do_sig(prec(self)): sig_on() 392 - @@ -2765,7 +2766,7 @@ cdef class RealBall(RingElement): 393 - sage: RBF(-1)^(1/3) 394 - nan 395 - sage: RBF(0)^(-1) 396 - - [+/- inf] 397 - + nan 398 - sage: RBF(-e)**RBF(pi) 399 - nan 400 - 401 - @@ -3129,7 +3130,7 @@ cdef class RealBall(RingElement): 402 - sage: RBF(1).tan() 403 - [1.557407724654902 +/- 3.26e-16] 404 - sage: RBF(pi/2).tan() 405 - - [+/- inf] 406 - + nan 407 - """ 408 - cdef RealBall res = self._new() 409 - if _do_sig(prec(self)): sig_on() 410 - @@ -3146,7 +3147,7 @@ cdef class RealBall(RingElement): 411 - sage: RBF(1).cot() 412 - [0.642092615934331 +/- 4.79e-16] 413 - sage: RBF(pi).cot() 414 - - [+/- inf] 415 - + nan 416 - """ 417 - cdef RealBall res = self._new() 418 - if _do_sig(prec(self)): sig_on() 419 - @@ -3257,7 +3258,7 @@ cdef class RealBall(RingElement): 420 - sage: RBF(1).coth() 421 - [1.313035285499331 +/- 4.97e-16] 422 - sage: RBF(0).coth() 423 - - [+/- inf] 424 - + nan 425 - """ 426 - cdef RealBall res = self._new() 427 - if _do_sig(prec(self)): sig_on()
+15
pkgs/applications/science/math/sage/patches/known-padics-bug.patch
··· 1 + diff --git a/build/pkgs/openblas/package-version.txt b/build/pkgs/openblas/package-version.txt 2 + index 3bc45c25d4..7c7c224887 100644 3 + --- a/src/sage/schemes/elliptic_curves/padics.py 4 + +++ b/src/sage/schemes/elliptic_curves/padics.py 5 + @@ -292,8 +292,8 @@ def padic_regulator(self, p, prec=20, height=None, check_hypotheses=True): 6 + 7 + sage: max_prec = 30 # make sure we get past p^2 # long time 8 + sage: full = E.padic_regulator(5, max_prec) # long time 9 + - sage: for prec in range(1, max_prec): # long time 10 + - ....: assert E.padic_regulator(5, prec) == full # long time 11 + + sage: for prec in range(1, max_prec): # known bug (#25969) # long time 12 + + ....: assert E.padic_regulator(5, prec) == full # known bug (#25969) # long time 13 + 14 + A case where the generator belongs to the formal group already 15 + (:trac:`3632`)::
-48
pkgs/applications/science/math/sage/patches/maxima-5.41.0-doctests.patch
··· 1 - diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py 2 - index 961c20aaac..3d601d8939 100644 3 - --- a/src/sage/interfaces/maxima_abstract.py 4 - +++ b/src/sage/interfaces/maxima_abstract.py 5 - @@ -1743,7 +1743,7 @@ class MaximaAbstractElement(ExtraTabCompletion, InterfaceElement): 6 - sage: y,d = var('y,d') 7 - sage: f = function('f') 8 - sage: latex(maxima(derivative(f(x*y), x))) 9 - - \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} 10 - + \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} 11 - sage: latex(maxima(derivative(f(x,y,d), d,x,x,y))) 12 - {{{\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) 13 - sage: latex(maxima(d/(d-2))) 14 - diff --git a/src/sage/manifolds/differentiable/metric.py b/src/sage/manifolds/differentiable/metric.py 15 - index 3cd6ad3235..1e18af1a6b 100644 16 - --- a/src/sage/manifolds/differentiable/metric.py 17 - +++ b/src/sage/manifolds/differentiable/metric.py 18 - @@ -993,7 +993,7 @@ class PseudoRiemannianMetric(TensorField): 19 - 2-dimensional differentiable manifold S^2 20 - sage: g.riemann()[:] 21 - [[[[0, 0], [0, 0]], [[0, sin(th)^2], [-sin(th)^2, 0]]], 22 - - [[[0, (cos(th)^2 - 1)/sin(th)^2], [1, 0]], [[0, 0], [0, 0]]]] 23 - + [[[0, -1], [1, 0]], [[0, 0], [0, 0]]]] 24 - 25 - In dimension 2, the Riemann tensor can be expressed entirely in terms of 26 - the Ricci scalar `r`: 27 - diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx 28 - index dfb8751467..27402e54ab 100644 29 - --- a/src/sage/symbolic/expression.pyx 30 - +++ b/src/sage/symbolic/expression.pyx 31 - @@ -7154,7 +7154,7 @@ cdef class Expression(CommutativeRingElement): 32 - sage: ex = lcm(sin(x)^2 - 1, sin(x)^2 + sin(x)); ex 33 - (sin(x)^2 + sin(x))*(sin(x)^2 - 1)/(sin(x) + 1) 34 - sage: ex.simplify_full() 35 - - -cos(x)^2*sin(x) 36 - + sin(x)^3 - sin(x) 37 - 38 - TESTS: 39 - 40 - @@ -10004,7 +10004,7 @@ cdef class Expression(CommutativeRingElement): 41 - 42 - sage: f=tan(3*x) 43 - sage: f.simplify_trig() 44 - - (4*cos(x)^2 - 1)*sin(x)/(4*cos(x)^3 - 3*cos(x)) 45 - + -(4*cos(x)^2 - 1)*sin(x)/(4*cos(x)*sin(x)^2 - cos(x)) 46 - sage: f.simplify_trig(False) 47 - sin(3*x)/cos(3*x) 48 -
-479
pkgs/applications/science/math/sage/patches/pynac-0.7.22.patch
··· 1 - diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py 2 - index 3a417d9d5c..fadaadbaf6 100644 3 - --- a/src/sage/calculus/calculus.py 4 - +++ b/src/sage/calculus/calculus.py 5 - @@ -231,7 +231,7 @@ Another example:: 6 - sage: f(x=3) 7 - arcsinh(1) 8 - sage: f.derivative(x) 9 - - 1/3/sqrt(1/9*x^2 + 1) 10 - + 1/sqrt(x^2 + 9) 11 - 12 - We compute the length of the parabola from 0 to 2:: 13 - 14 - @@ -1509,8 +1509,8 @@ def laplace(ex, t, s, algorithm='maxima'): 15 - Testing SymPy:: 16 - 17 - sage: laplace(t^n, t, s, algorithm='sympy') 18 - - (s^(-n)*gamma(n + 1)/s, 0, -re(n) < 1) 19 - - 20 - + (gamma(n + 1)/(s*s^n), 0, -re(n) < 1) 21 - + 22 - Testing Maxima:: 23 - 24 - sage: laplace(t^n, t, s, algorithm='maxima') 25 - diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py 26 - index 1fc2db5c94..f3e49b9cdb 100644 27 - --- a/src/sage/functions/hypergeometric.py 28 - +++ b/src/sage/functions/hypergeometric.py 29 - @@ -34,7 +34,7 @@ Simplification (note that ``simplify_full`` does not yet call 30 - sage: a.simplify_hypergeometric() 31 - 1/((-e^x + 1)^e^x) 32 - sage: a.simplify_hypergeometric(algorithm='sage') 33 - - (-e^x + 1)^(-e^x) 34 - + 1/((-e^x + 1)^e^x) 35 - 36 - Equality testing:: 37 - 38 - @@ -145,7 +145,7 @@ Series expansions of confluent hypergeometric functions:: 39 - 40 - sage: hypergeometric_M(2, 2, x).series(x, 3) 41 - 1 + 1*x + 1/2*x^2 + Order(x^3) 42 - - sage: hypergeometric_U(2, 2, x).series(x == 3, 100).subs(x=1).n() 43 - + sage: hypergeometric_U(2, 2, x).series(x == 3, 100).subs(x=1).n() # known bug (see :trac:`25688`) 44 - 0.403652637676806 45 - sage: hypergeometric_U(2, 2, 1).n() 46 - 0.403652637676806 47 - @@ -773,7 +773,7 @@ def closed_form(hyp): 48 - sage: closed_form(hypergeometric([], [], z)) 49 - e^z 50 - sage: closed_form(hypergeometric([a], [], z)) 51 - - (-z + 1)^(-a) 52 - + 1/((-z + 1)^a) 53 - sage: closed_form(hypergeometric([1, 1, 2], [1, 1], z)) 54 - (z - 1)^(-2) 55 - sage: closed_form(hypergeometric([2, 3], [1], x)) 56 - @@ -1121,7 +1121,7 @@ class Hypergeometric_U(BuiltinFunction): 57 - sage: var('a b z') 58 - (a, b, z) 59 - sage: hypergeometric_U(a, b, z).generalized() 60 - - z^(-a)*hypergeometric((a, a - b + 1), (), -1/z) 61 - + hypergeometric((a, a - b + 1), (), -1/z)/z^a 62 - sage: hypergeometric_U(1, 3, 1/2).generalized() 63 - 2*hypergeometric((1, -1), (), -2) 64 - sage: hypergeometric_U(3, I, 2).generalized() 65 - diff --git a/src/sage/functions/log.py b/src/sage/functions/log.py 66 - index 75d1bf8060..61968582af 100644 67 - --- a/src/sage/functions/log.py 68 - +++ b/src/sage/functions/log.py 69 - @@ -518,17 +518,17 @@ class Function_polylog(GinacFunction): 70 - 71 - sage: BF = RealBallField(100) 72 - sage: polylog(2, BF(1/3)) 73 - - [0.36621322997706348761674629766 +/- 4.51e-30] 74 - + [0.36621322997706348761674629766... +/- ...] 75 - sage: polylog(2, BF(4/3)) 76 - - nan 77 - + [2.27001825336107090380391448586 +/- 5.64e-30] + [-0.90377988538400159956755721265 +/- 8.39e-30]*I 78 - sage: parent(_) 79 - - Real ball field with 100 bits of precision 80 - + Complex ball field with 100 bits of precision 81 - sage: polylog(2, CBF(1/3)) 82 - - [0.366213229977063 +/- 5.85e-16] 83 - + [0.366213229977063 +/- ...] 84 - sage: parent(_) 85 - Complex ball field with 53 bits of precision 86 - sage: polylog(2, CBF(1)) 87 - - [1.644934066848226 +/- 6.59e-16] 88 - + [1.644934066848226 +/- ...] 89 - sage: parent(_) 90 - Complex ball field with 53 bits of precision 91 - """ 92 - diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py 93 - index e7e7a311cd..1f2926d6c9 100644 94 - --- a/src/sage/functions/trig.py 95 - +++ b/src/sage/functions/trig.py 96 - @@ -529,13 +529,8 @@ class Function_arcsin(GinacFunction): 97 - arcsin 98 - sage: asin(complex(1,1)) 99 - (0.6662394324925152+1.0612750619050357j) 100 - - 101 - - Check that :trac:`22823` is fixed:: 102 - - 103 - - sage: bool(asin(SR(2.1)) == NaN) 104 - - True 105 - - sage: asin(SR(2.1)).is_real() 106 - - False 107 - + sage: asin(SR(2.1)) 108 - + 1.57079632679490 - 1.37285914424258*I 109 - """ 110 - GinacFunction.__init__(self, 'arcsin', latex_name=r"\arcsin", 111 - conversions=dict(maxima='asin', sympy='asin', fricas="asin", giac="asin")) 112 - @@ -595,13 +590,8 @@ class Function_arccos(GinacFunction): 113 - arccos 114 - sage: acos(complex(1,1)) 115 - (0.9045568943023814-1.0612750619050357j) 116 - - 117 - - Check that :trac:`22823` is fixed:: 118 - - 119 - - sage: bool(acos(SR(2.1)) == NaN) 120 - - True 121 - - sage: acos(SR(2.1)).is_real() 122 - - False 123 - + sage: acos(SR(2.1)) 124 - + 1.37285914424258*I 125 - """ 126 - GinacFunction.__init__(self, 'arccos', latex_name=r"\arccos", 127 - conversions=dict(maxima='acos', sympy='acos', fricas='acos', giac='acos')) 128 - @@ -807,7 +797,7 @@ class Function_arcsec(GinacFunction): 129 - sage: arcsec(2).n(100) 130 - 1.0471975511965977461542144611 131 - sage: arcsec(1/2).n(100) 132 - - NaN 133 - + 1.3169578969248167086250463473*I 134 - sage: RDF(arcsec(2)) # abs tol 1e-15 135 - 1.0471975511965976 136 - sage: arcsec(1 + I) 137 - @@ -958,7 +948,9 @@ class Function_arctan2(GinacFunction): 138 - sage: atan2(0,0,hold=True) 139 - arctan2(0, 0) 140 - sage: atan2(0,0,hold=True).n() 141 - - NaN 142 - + Traceback (most recent call last): 143 - + ... 144 - + RuntimeError: atan2(): division by zero 145 - 146 - Check if :trac:`10062` is fixed, this was caused by 147 - ``(I*I).is_positive()`` returning ``True``:: 148 - diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py 149 - index 3b5c8d1729..1c6b73a16c 100644 150 - --- a/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py 151 - +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_geodesic.py 152 - @@ -1422,8 +1422,10 @@ class HyperbolicGeodesicUHP(HyperbolicGeodesic): 153 - expressions do not generate runtime errors. :: 154 - 155 - sage: g=HyperbolicPlane().UHP().get_geodesic(-1+I,1+I) 156 - - sage: g.midpoint() 157 - - 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) 158 - + sage: point = g.midpoint(); point 159 - + Point in UHP -1/2*(sqrt(2)*... 160 - + sage: QQbar(point.coordinates()).radical_expression() 161 - + I*sqrt(2) 162 - 163 - Check that floating points remain floating points 164 - in :meth:`midpoint` :: 165 - diff --git a/src/sage/interfaces/fricas.py b/src/sage/interfaces/fricas.py 166 - index 82aae78e37..8501ea2a18 100644 167 - --- a/src/sage/interfaces/fricas.py 168 - +++ b/src/sage/interfaces/fricas.py 169 - @@ -1084,14 +1084,14 @@ class FriCASElement(ExpectElement): 170 - 0.451026811796262, 171 - 0.732815101786507, 172 - 0.837981225008390, 173 - - NaN, 174 - - NaN, 175 - + 1.57079632679490 - 0.467145308103262*I, 176 - + 0.467145308103262*I, 177 - 1.11976951499863, 178 - 0.451026811796262, 179 - 0.732815101786507, 180 - 0.837981225008390, 181 - - NaN, 182 - - NaN] 183 - + 1.57079632679490 - 0.467145308103262*I, 184 - + 0.467145308103262*I] 185 - sage: l = [tanh, sinh, cosh, coth, sech, csch, asinh, acosh, atanh, acoth, asech, acsch, arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch] 186 - sage: [f(x)._fricas_().sage().subs(x=0.9) for f in l] # optional - fricas 187 - [0.716297870199024, 188 - diff --git a/src/sage/libs/pynac/pynac.pyx b/src/sage/libs/pynac/pynac.pyx 189 - index 9e9d8f664b..e3406f007e 100644 190 - --- a/src/sage/libs/pynac/pynac.pyx 191 - +++ b/src/sage/libs/pynac/pynac.pyx 192 - @@ -1824,7 +1824,7 @@ cdef py_atan2(x, y): 193 - sage: atan2(CC(I), CC(I+1)) 194 - 0.553574358897045 + 0.402359478108525*I 195 - sage: atan2(CBF(I), CBF(I+1)) 196 - - [0.55357435889705 +/- 5.58e-15] + [0.402359478108525 +/- 7.11e-16]*I 197 - + [0.55357435889705 +/- ...] + [0.402359478108525 +/- ...]*I 198 - 199 - Check that :trac:`23776` is fixed and RDF input gives real output:: 200 - 201 - diff --git a/src/sage/matrix/matrix_symbolic_dense.pyx b/src/sage/matrix/matrix_symbolic_dense.pyx 202 - index 46a15e53eb..7a0beb437b 100644 203 - --- a/src/sage/matrix/matrix_symbolic_dense.pyx 204 - +++ b/src/sage/matrix/matrix_symbolic_dense.pyx 205 - @@ -200,7 +200,7 @@ cdef class Matrix_symbolic_dense(Matrix_generic_dense): 206 - sage: eval, [evec], mult = es[0] 207 - sage: delta = eval*evec - evec*A 208 - sage: abs(abs(delta)) < 1e-10 209 - - 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) 210 - + 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) 211 - sage: abs(abs(delta)).n() < 1e-10 212 - True 213 - 214 - diff --git a/src/sage/modules/matrix_morphism.py b/src/sage/modules/matrix_morphism.py 215 - index 17a1d6e290..03892ceec0 100644 216 - --- a/src/sage/modules/matrix_morphism.py 217 - +++ b/src/sage/modules/matrix_morphism.py 218 - @@ -214,9 +214,9 @@ class MatrixMorphism_abstract(sage.categories.morphism.Morphism): 219 - sage: f((1, 0)) 220 - Traceback (most recent call last): 221 - ... 222 - - TypeError: Unable to coerce entries (=[1.00000000000000*I, 0.000000000000000]) to coefficients in Real Field with 53 bits of precision 223 - + TypeError: Unable to coerce entries (=[1.00000000000000*I, 0]) to coefficients in Real Field with 53 bits of precision 224 - sage: f((1, 0), coerce=False) 225 - - (1.00000000000000*I, 0.000000000000000) 226 - + (1.00000000000000*I, 0) 227 - 228 - """ 229 - if self.domain().is_ambient(): 230 - diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py 231 - index 77cdeb8c46..e501e74036 100644 232 - --- a/src/sage/plot/plot.py 233 - +++ b/src/sage/plot/plot.py 234 - @@ -2061,7 +2061,7 @@ def _plot(funcs, xrange, parametric=False, 235 - plot properly (:trac:`13246`):: 236 - 237 - sage: parametric_plot((x, arcsec(x)), (x, -2, 2)) 238 - - Graphics object consisting of 1 graphics primitive 239 - + Graphics object consisting of 2 graphics primitives 240 - 241 - """ 242 - from sage.plot.colors import Color 243 - diff --git a/src/sage/repl/display/formatter.py b/src/sage/repl/display/formatter.py 244 - index 8ce2e839d7..948207c95e 100644 245 - --- a/src/sage/repl/display/formatter.py 246 - +++ b/src/sage/repl/display/formatter.py 247 - @@ -25,11 +25,11 @@ generally, all sage expression as an ASCII art object:: 248 - sage: shell = get_test_shell() 249 - sage: shell.run_cell('%display ascii_art') 250 - sage: shell.run_cell('integral(x^2/pi^x, x)') 251 - - / 2 2 \ -x*log(pi) 252 - - -\x *log (pi) + 2*x*log(pi) + 2/*e 253 - - --------------------------------------------- 254 - - 3 255 - - log (pi) 256 - + -x / 2 2 \ 257 - + -pi *\x *log (pi) + 2*x*log(pi) + 2/ 258 - + -------------------------------------- 259 - + 3 260 - + log (pi) 261 - sage: shell.run_cell("i = var('i')") 262 - sage: shell.run_cell('sum(i*x^i, i, 0, 10)') 263 - 10 9 8 7 6 5 4 3 2 264 - diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 265 - index d8ebbf4f76..8c60f65e99 100644 266 - --- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 267 - +++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py 268 - @@ -151,8 +151,8 @@ A multiple point example (Example 6.5 of [RaWi2012]_):: 269 - [(x + 2*y - 1, 1), (2*x + y - 1, 1)]) 270 - sage: F1 = decomp[1] 271 - sage: F1.asymptotics(p, alpha, 2) 272 - - (-3*((2*a^2 - 5*a*b + 2*b^2)*r^2 + (a + b)*r + 3)*((1/3)^(-a)*(1/3)^(-b))^r, 273 - - (1/3)^(-a)*(1/3)^(-b), -3*(2*a^2 - 5*a*b + 2*b^2)*r^2 - 3*(a + b)*r - 9) 274 - + (-3*((2*a^2 - 5*a*b + 2*b^2)*r^2 + (a + b)*r + 3)*(1/((1/3)^a*(1/3)^b))^r, 275 - + 1/((1/3)^a*(1/3)^b), -3*(2*a^2 - 5*a*b + 2*b^2)*r^2 - 3*(a + b)*r - 9) 276 - sage: alpha = [4, 3] 277 - sage: decomp = F.asymptotic_decomposition(alpha) 278 - sage: F1 = decomp[1] 279 - @@ -2159,7 +2159,7 @@ class FractionWithFactoredDenominator(RingElement): 280 - sage: p = {x: 1/3, y: 1/3} 281 - sage: alpha = (var('a'), var('b')) 282 - sage: F.asymptotics_multiple(p, alpha, 2, var('r')) # long time 283 - - (3*((1/3)^(-a)*(1/3)^(-b))^r*e^(2/3), (1/3)^(-a)*(1/3)^(-b), 3*e^(2/3)) 284 - + (3*(1/((1/3)^a*(1/3)^b))^r*e^(2/3), 1/((1/3)^a*(1/3)^b), 3*e^(2/3)) 285 - """ 286 - from itertools import product 287 - from sage.calculus.functions import jacobian 288 - diff --git a/src/sage/stats/basic_stats.py b/src/sage/stats/basic_stats.py 289 - index 16a268a02c..5fd244e93b 100644 290 - --- a/src/sage/stats/basic_stats.py 291 - +++ b/src/sage/stats/basic_stats.py 292 - @@ -183,7 +183,7 @@ def std(v, bias=False): 293 - sage: std([]) 294 - NaN 295 - sage: std([I, sqrt(2), 3/5]) 296 - - 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) 297 - + 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) 298 - sage: std([RIF(1.0103, 1.0103), RIF(2)]) 299 - 0.6998235813403261? 300 - sage: import numpy 301 - diff --git a/src/sage/symbolic/expression.pyx b/src/sage/symbolic/expression.pyx 302 - index ab4c05de3a..60f0dc549a 100644 303 - --- a/src/sage/symbolic/expression.pyx 304 - +++ b/src/sage/symbolic/expression.pyx 305 - @@ -622,7 +622,7 @@ cdef class Expression(CommutativeRingElement): 306 - sage: x^(-5) 307 - x^(-5) 308 - sage: x^(-y) 309 - - x^(-y) 310 - + 1/(x^y) 311 - sage: 2*x^(-1) 312 - 2/x 313 - sage: i*x 314 - @@ -3621,14 +3621,14 @@ cdef class Expression(CommutativeRingElement): 315 - sage: repl_dict = {b_0: b_0, b_3: b_1, b_2: b_3, b_1: b_2} 316 - sage: P = precomp.substitute(repl_dict) 317 - sage: P.expand() 318 - - -2^(-b_0)*2^(-b_2)*2^b_3 - 2^b_0*2^(-b_2)*2^b_3 - 319 - - 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) 320 - - - 2*2^b_0*2^(-b_2) - 2*2^(-b_0)*2^b_2 + 2*2^b_0*2^b_2 + 321 - - 2^(-b_0)*2^b_3 + 2^b_0*2^b_3 + 2^(-b_2)*2^b_3 + 2^b_2*2^b_3 + 322 - - 2*2^(-b_0) + 2*2^b_0 + 2*2^(-b_2) + 2*2^b_2 - 9*2^b_3 - 323 - - 2^(-b_0)*2^(-b_2)/2^b_3 - 2^b_0*2^(-b_2)/2^b_3 - 324 - - 2^(-b_0)*2^b_2/2^b_3 + 2^b_0*2^b_2/2^b_3 + 2^(-b_0)/2^b_3 + 325 - - 2^b_0/2^b_3 + 2^(-b_2)/2^b_3 + 2^b_2/2^b_3 - 9/2^b_3 - 18 326 - + 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 + 327 - + 2*2^b_0 + 2*2^b_2 - 9*2^b_3 + 2^b_0*2^b_2/2^b_3 - 328 - + 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 - 329 - + 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 + 330 - + 2^b_3/2^b_2 + 2/2^b_0 + 2/2^b_2 - 2^b_0/(2^b_2*2^b_3) - 331 - + 2^b_2/(2^b_0*2^b_3) - 9/2^b_3 - 2^b_3/(2^b_0*2^b_2) - 332 - + 2/(2^b_0*2^b_2) + 1/(2^b_0*2^b_3) + 1/(2^b_2*2^b_3) - 333 - + 1/(2^b_0*2^b_2*2^b_3) - 18 334 - 335 - sage: _0,b_1,b_2=var('b_0,b_1,b_2') 336 - sage: f = 1/27*b_2^2/(2^b_2)^2 + 1/27*b_1^2/(2^b_1)^2 + \ 337 - @@ -3809,7 +3809,7 @@ cdef class Expression(CommutativeRingElement): 338 - 339 - sage: x = SR.symbol('x', domain='real') 340 - sage: (x^3)^(1/3) 341 - - (x^3)^(1/3) 342 - + x 343 - sage: (x^4)^(1/4) 344 - abs(x) 345 - sage: (x^8)^(1/4) 346 - @@ -3872,7 +3872,7 @@ cdef class Expression(CommutativeRingElement): 347 - sage: 2^(x/log(2)) 348 - e^x 349 - sage: 2^(-x^2/2/log(2)) 350 - - e^(-1/2*x^2) 351 - + 1/e^(1/2*x^2) 352 - sage: x^(x/log(x)) 353 - x^(x/log(x)) 354 - sage: assume(x > 0) 355 - @@ -4816,18 +4816,24 @@ cdef class Expression(CommutativeRingElement): 356 - sage: ((x+y)^(x+y)).match(w0^w0) 357 - {$0: x + y} 358 - sage: t = ((a+b)*(a+c)).match((a+w0)*(a+w1)) 359 - - sage: t[w0], t[w1] 360 - - (c, b) 361 - + sage: set([t[w0], t[w1]]) == set([b, c]) 362 - + True 363 - sage: ((a+b)*(a+c)).match((w0+b)*(w0+c)) 364 - {$0: a} 365 - sage: t = ((a+b)*(a+c)).match((w0+w1)*(w0+w2)) 366 - - sage: t[w0], t[w1], t[w2] 367 - - (a, c, b) 368 - - sage: print(((a+b)*(a+c)).match((w0+w1)*(w1+w2))) 369 - - None 370 - + sage: t[w0] 371 - + a 372 - + sage: set([t[w1], t[w2]]) == set([b, c]) 373 - + True 374 - + sage: t = ((a+b)*(a+c)).match((w0+w1)*(w1+w2)) 375 - + sage: t[w1] 376 - + a 377 - + sage: set([t[w0], t[w2]]) == set([b, c]) 378 - + True 379 - sage: t = (a*(x+y)+a*z+b).match(a*w0+w1) 380 - - sage: t[w0], t[w1] 381 - - (x + y, a*z + b) 382 - + sage: s = set([t[w0], t[w1]]) 383 - + sage: s == set([x+y, a*z+b]) or s == set([z, a*(x+y)+b]) 384 - + True 385 - sage: print((a+b+c+d+f+g).match(c)) 386 - None 387 - sage: (a+b+c+d+f+g).has(c) 388 - @@ -4836,7 +4842,7 @@ cdef class Expression(CommutativeRingElement): 389 - {$0: a + b + d + f + g} 390 - sage: (a+b+c+d+f+g).match(c+g+w0) 391 - {$0: a + b + d + f} 392 - - sage: (a+b).match(a+b+w0) 393 - + sage: (a+b).match(a+b+w0) # known bug 394 - {$0: 0} 395 - sage: print((a*b^2).match(a^w0*b^w1)) 396 - None 397 - @@ -5009,7 +5015,7 @@ cdef class Expression(CommutativeRingElement): 398 - a^3 + b^3 + (x + y)^3 399 - 400 - sage: t.subs(w0 == w0^2) 401 - - (x^2 + y^2)^18 + a^16 + b^16 402 - + a^8 + b^8 + (x^2 + y^2)^6 403 - 404 - sage: t.subs(a == b, b == c) 405 - (x + y)^3 + b^2 + c^2 406 - @@ -8392,9 +8398,13 @@ cdef class Expression(CommutativeRingElement): 407 - sage: SR(I).arctan2(1) 408 - arctan2(I, 1) 409 - sage: SR(CDF(0,1)).arctan2(1) 410 - - NaN + +infinity*I 411 - - sage: SR(1).arctan2(CDF(0,1)) # known bug 412 - - 0.7853981633974484 - 19.012501686914433*I 413 - + Traceback (most recent call last): 414 - + ... 415 - + ValueError: power::eval(): division by zero 416 - + sage: SR(1).arctan2(CDF(0,1)) 417 - + Traceback (most recent call last): 418 - + ... 419 - + ValueError: power::eval(): division by zero 420 - 421 - sage: arctan2(0,oo) 422 - 0 423 - @@ -8656,7 +8666,7 @@ cdef class Expression(CommutativeRingElement): 424 - 1/2*I*pi 425 - sage: SR(1/2).arccosh() 426 - arccosh(1/2) 427 - - sage: SR(CDF(1/2)).arccosh() # rel tol 1e-15 428 - + sage: SR(CDF(1/2)).arccosh() # rel tol 1e-15 429 - 1.0471975511965976*I 430 - sage: maxima('acosh(0.5)') 431 - 1.04719755119659...*%i 432 - @@ -11687,7 +11697,7 @@ cdef class Expression(CommutativeRingElement): 433 - sage: a.solve(t) 434 - [] 435 - sage: b = a.canonicalize_radical(); b 436 - - -23040.0*(-2.0*e^(1800*t) + 25.0*e^(900*t) - 32.0)*e^(-2400*t) 437 - + (46080.0*e^(1800*t) - 576000.0*e^(900*t) + 737280.0)*e^(-2400*t) 438 - sage: b.solve(t) 439 - [] 440 - sage: b.solve(t, to_poly_solve=True) 441 - @@ -12163,14 +12173,14 @@ cdef class Expression(CommutativeRingElement): 442 - 443 - sage: (n,k,j)=var('n,k,j') 444 - sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) 445 - - -(-1)^(-j)*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) 446 - + -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) 447 - sage: assume(j>-1) 448 - sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) 449 - 1 450 - sage: forget() 451 - sage: assume(n>=j) 452 - sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) 453 - - -(-1)^(-j)*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) 454 - + -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) 455 - sage: forget() 456 - sage: assume(j==-1) 457 - sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) 458 - @@ -12178,7 +12188,7 @@ cdef class Expression(CommutativeRingElement): 459 - sage: forget() 460 - sage: assume(j<-1) 461 - sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n) 462 - - -(-1)^(-j)*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) 463 - + -(-1)^j*sum((-1)^k*binomial(k - 1, j)*binomial(n, k), k, j + 1, n) 464 - sage: forget() 465 - 466 - Check that :trac:`16176` is fixed:: 467 - diff --git a/src/sage/symbolic/relation.py b/src/sage/symbolic/relation.py 468 - index da6f0eef42..4bd65ef572 100644 469 - --- a/src/sage/symbolic/relation.py 470 - +++ b/src/sage/symbolic/relation.py 471 - @@ -895,7 +895,7 @@ def solve(f, *args, **kwds): 472 - sage: (r[0][x], r[0][y]) 473 - (2*lambert_w(1/2), 1) 474 - sage: solve(-2*x**3 + 4*x**2 - 2*x + 6 > 0, x, algorithm='sympy') 475 - - [x < (1/6*sqrt(77) + 79/54)^(1/3) + 1/9/(1/6*sqrt(77) + 79/54)^(1/3) + 2/3] 476 - + [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] 477 - sage: solve(sqrt(2*x^2 - 7) - (3 - x),x,algorithm='sympy') 478 - [x == -8, x == 2] 479 - sage: solve(sqrt(2*x + 9) - sqrt(x + 1) - sqrt(x + 4),x,algorithm='sympy')
-40
pkgs/applications/science/math/sage/patches/python3-syntax-without-write.patch
··· 1 - diff --git a/src/sage/tests/py3_syntax.py b/src/sage/tests/py3_syntax.py 2 - index e564860b48..86ab3725f9 100644 3 - --- a/src/sage/tests/py3_syntax.py 4 - +++ b/src/sage/tests/py3_syntax.py 5 - @@ -179,15 +179,30 @@ class Python3SyntaxTest(SortedDirectoryWalkerABC): 6 - sage: py3_syntax = Python3SyntaxTest() 7 - sage: py3_syntax.test(src.name) 8 - Invalid Python 3 syntax found: 9 - - File "...py", line 1 10 - - print "invalid print statement" 11 - - ^ 12 - - SyntaxError: Missing parentheses in call to 'print' 13 - + Missing parentheses in call to 'print'... 14 - sage: os.unlink(src.name) 15 - """ 16 - + 17 - + # compile all given files in memory, printing all errors 18 - + # inspired by the py_compile module (but without writing to file) 19 - + script = """ 20 - +import sys 21 - +import importlib.machinery 22 - +rv = 0 23 - +for file in sys.argv[1:]: 24 - + loader = importlib.machinery.SourceFileLoader('<sage_test>', file) 25 - + source_bytes = loader.get_data(file) 26 - + try: 27 - + code = loader.source_to_code(source_bytes, file) 28 - + except Exception as err: 29 - + print(err) 30 - + rv = 1 31 - +sys.exit(rv) 32 - +""" 33 - cmd = [ 34 - 'python3', 35 - - '-m', 'py_compile' 36 - + '-c', 37 - + script, 38 - ] + list(filenames) 39 - process = subprocess.Popen( 40 - cmd,
-31
pkgs/applications/science/math/sage/patches/sagenb-sphinx-1.7.patch
··· 1 - From 7419e0246230594ebfd5e7a2fe6b80d67abfc98a Mon Sep 17 00:00:00 2001 2 - From: Jeroen Demeyer <jdemeyer@cage.ugent.be> 3 - Date: Tue, 20 Mar 2018 10:40:41 +0100 4 - Subject: Fix sphinxify doctests 5 - 6 - --- 7 - sagenb/misc/sphinxify.py | 6 +++--- 8 - 1 file changed, 3 insertions(+), 3 deletions(-) 9 - 10 - diff --git a/sagenb/misc/sphinxify.py b/sagenb/misc/sphinxify.py 11 - index 4f76d41..15623d9 100644 12 - --- a/sagenb/misc/sphinxify.py 13 - +++ b/sagenb/misc/sphinxify.py 14 - @@ -47,11 +47,11 @@ def sphinxify(docstring, format='html'): 15 - 16 - sage: from sage.misc.sphinxify import sphinxify 17 - sage: sphinxify('A test') 18 - - '...<div class="docstring">\n \n <p>A test</p>\n\n\n</div>' 19 - + '<div class="docstring">\n \n <p>A test</p>\n\n\n</div>' 20 - sage: sphinxify('**Testing**\n`monospace`') 21 - - '...<div class="docstring"...<strong>Testing</strong>\n<span class="math"...</p>\n\n\n</div>' 22 - + '<div class="docstring"...<strong>Testing</strong>\n<span class="math notranslate"...</p>\n\n\n</div>' 23 - sage: sphinxify('`x=y`') 24 - - '...<div class="docstring">\n \n <p><span class="math">x=y</span></p>\n\n\n</div>' 25 - + '<div class="docstring">\n \n <p><span class="math notranslate">x=y</span></p>\n\n\n</div>' 26 - sage: sphinxify('`x=y`', format='text') 27 - 'x=y\n' 28 - sage: sphinxify(':math:`x=y`', format='text') 29 - -- 30 - cgit v1.0-1-gd88e 31 -
+274
pkgs/applications/science/math/sage/patches/singular-4.1.1p2.patch
··· 1 + diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py 2 + index 9d65c9fa6c..a028bbe719 100644 3 + --- a/src/sage/interfaces/singular.py 4 + +++ b/src/sage/interfaces/singular.py 5 + @@ -654,7 +654,7 @@ class Singular(ExtraTabCompletion, Expect): 6 + 7 + s = Expect.eval(self, x, **kwds) 8 + 9 + - if s.find("error") != -1 or s.find("Segment fault") != -1: 10 + + if s.find("error occurred") != -1 or s.find("Segment fault") != -1: 11 + raise SingularError('Singular error:\n%s'%s) 12 + 13 + if get_verbose() > 0: 14 + @@ -1079,7 +1079,7 @@ class Singular(ExtraTabCompletion, Expect): 15 + sage: S = singular.ring('real', '(a,b)', 'lp') 16 + sage: singular.current_ring() 17 + polynomial ring, over a field, global ordering 18 + - // coefficients: float 19 + + // coefficients: Float() 20 + // number of vars : 2 21 + // block 1 : ordering lp 22 + // : names a b 23 + @@ -1157,7 +1157,7 @@ class Singular(ExtraTabCompletion, Expect): 24 + sage: singular._tab_completion() 25 + ['exteriorPower', 26 + ... 27 + - 'flintZ'] 28 + + 'crossprod'] 29 + """ 30 + p = re.compile("// *([a-z0-9A-Z_]*).*") #compiles regular expression 31 + proclist = self.eval("listvar(proc)").splitlines() 32 + @@ -1183,7 +1183,7 @@ class Singular(ExtraTabCompletion, Expect): 33 + EXAMPLES:: 34 + 35 + sage: singular.version() 36 + - "Singular ... version 4.1.0 ... 37 + + "Singular ... version 4... 38 + """ 39 + return singular_version() 40 + 41 + @@ -1562,7 +1562,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): 42 + elif charstr[0] in ['0', 'QQ']: 43 + from sage.all import QQ 44 + br = QQ 45 + - elif charstr[0]=='real': 46 + + elif charstr[0].startswith('Float'): 47 + from sage.all import RealField, ceil, log 48 + prec = singular.eval('ringlist(basering)[1][2][1]') 49 + br = RealField(ceil((ZZ(prec)+1)/log(2,10))) 50 + @@ -1750,7 +1750,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): 51 + 52 + # Singular 4 puts parentheses around floats and sign outside them 53 + charstr = self.parent().eval('charstr(basering)').split(',',1) 54 + - if charstr[0] in ['real', 'complex']: 55 + + if charstr[0]=='complex' or charstr[0].startswith('Float'): 56 + for i in range(coeff_start, 2 * coeff_start): 57 + singular_poly_list[i] = singular_poly_list[i].replace('(','').replace(')','') 58 + 59 + @@ -1992,7 +1992,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): 60 + sage: S = singular.ring('real', '(a,b)', 'lp') 61 + sage: singular.current_ring() 62 + polynomial ring, over a field, global ordering 63 + - // coefficients: float 64 + + // coefficients: Float() 65 + // number of vars : 2 66 + // block 1 : ordering lp 67 + // : names a b 68 + @@ -2072,7 +2072,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): 69 + sage: R._tab_completion() 70 + ['exteriorPower', 71 + ... 72 + - 'flintZ'] 73 + + 'crossprod'] 74 + """ 75 + return self.parent()._tab_completion() 76 + 77 + @@ -2358,7 +2358,7 @@ def singular_version(): 78 + EXAMPLES:: 79 + 80 + sage: singular.version() 81 + - "Singular ... version 4.1.0 ... 82 + + "Singular ... version 4... 83 + """ 84 + return singular.eval('system("--version");') 85 + 86 + diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd 87 + index 4b658c4807..d863740419 100644 88 + --- a/src/sage/libs/singular/decl.pxd 89 + +++ b/src/sage/libs/singular/decl.pxd 90 + @@ -170,7 +170,7 @@ cdef extern from "singular/Singular/libsingular.h": 91 + 92 + int n_NumberOfParameters(const n_Procs_s* r) 93 + 94 + - ctypedef struct poly "polyrec": 95 + + ctypedef struct poly "spolyrec": 96 + poly *next 97 + number *coef 98 + unsigned long exp[1] 99 + @@ -630,9 +630,13 @@ cdef extern from "singular/Singular/libsingular.h": 100 + # return p*q, destroys p and q 101 + poly *p_Mult_q(poly *p, poly *q, ring *r) 102 + 103 + + # polynomial division, ignoring the rest 104 + + # via singclap_pdivide resp. idLift, destroys p,q 105 + + poly *p_Divide(poly *p, poly *q, ring *r) 106 + + 107 + # divide monomial p by monomial q, p,q const 108 + 109 + - poly *pDivide(poly *p,poly *q) 110 + + poly *pMDivide(poly *p,poly *q) 111 + 112 + # return the i-th power of p; p destroyed, requires global ring 113 + 114 + diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 115 + index 2a8d9ae021..aeff53af6c 100644 116 + --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 117 + +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx 118 + @@ -190,8 +190,8 @@ from sage.libs.singular.decl cimport ( 119 + n_IsUnit, n_Invers, 120 + p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q, 121 + p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup, 122 + - omFree, pDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy, 123 + - pDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy, 124 + + omFree, pMDivide, p_Divide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy, 125 + + pMDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy, 126 + p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete, 127 + p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize, 128 + idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD, 129 + @@ -1693,8 +1693,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): 130 + if not g._poly: 131 + raise ZeroDivisionError 132 + 133 + - if r!=currRing: rChangeCurrRing(r) # pDivide 134 + - res = pDivide(f._poly, g._poly) 135 + + if r!=currRing: rChangeCurrRing(r) # pMDivide 136 + + res = pMDivide(f._poly, g._poly) 137 + if coeff: 138 + if r.cf.type == n_unknown or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): 139 + n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) 140 + @@ -1853,8 +1853,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): 141 + and (<MPolynomial_libsingular>g) \ 142 + and g.parent() is self \ 143 + and p_LmDivisibleBy((<MPolynomial_libsingular>g)._poly, m, r): 144 + - if r!=currRing: rChangeCurrRing(r) # pDivide 145 + - flt = pDivide(f._poly, (<MPolynomial_libsingular>g)._poly) 146 + + if r!=currRing: rChangeCurrRing(r) # pMDivide 147 + + flt = pMDivide(f._poly, (<MPolynomial_libsingular>g)._poly) 148 + #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<MPolynomial_libsingular>g)._poly, r), r), r) 149 + p_SetCoeff(flt, n_Init(1, r), r) 150 + return new_MP(self,flt), g 151 + @@ -4023,16 +4023,6 @@ cdef class MPolynomial_libsingular(MPolynomial): 152 + Traceback (most recent call last): 153 + ... 154 + NotImplementedError: Division of multivariate polynomials over non fields by non-monomials not implemented. 155 + - 156 + - TESTS:: 157 + - 158 + - sage: P.<x,y> = ZZ[] 159 + - sage: p = 3*(-x^8*y^2 - x*y^9 + 6*x^8*y + 17*x^2*y^6 - x^3*y^2) 160 + - sage: q = 7*(x^2 + x*y + y^2 + 1) 161 + - sage: p*q//q == p 162 + - True 163 + - sage: p*q//p == q 164 + - True 165 + """ 166 + cdef MPolynomialRing_libsingular parent = self._parent 167 + cdef ring *r = self._parent_ring 168 + @@ -4052,13 +4042,18 @@ cdef class MPolynomial_libsingular(MPolynomial): 169 + _right = <MPolynomial_libsingular>right 170 + 171 + if r.cf.type != n_unknown: 172 + + if r.cf.type == n_Z: 173 + + P = parent.change_ring(RationalField()) 174 + + f = P(self)//P(right) 175 + + CM = list(f) 176 + + return parent(sum([c.floor()*m for c,m in CM])) 177 + if _right.is_monomial(): 178 + p = _self._poly 179 + quo = p_ISet(0,r) 180 + - if r != currRing: rChangeCurrRing(r) # pDivide 181 + + if r != currRing: rChangeCurrRing(r) # pMDivide 182 + while p: 183 + if p_DivisibleBy(_right._poly, p, r): 184 + - temp = pDivide(p, _right._poly) 185 + + temp = pMDivide(p, _right._poly) 186 + p_SetCoeff0(temp, n_Copy(p_GetCoeff(p, r), r), r) 187 + quo = p_Add_q(quo, temp, r) 188 + p = pNext(p) 189 + @@ -4794,6 +4789,8 @@ cdef class MPolynomial_libsingular(MPolynomial): 190 + sage: p = -x*y + x*z + 54*x - 2 191 + sage: (5*p^2).lcm(3*p) == 15*p^2 192 + True 193 + + sage: lcm(2*x,2*x*y) 194 + + 2*x*y 195 + """ 196 + cdef ring *_ring = self._parent_ring 197 + cdef poly *ret 198 + @@ -4821,9 +4818,7 @@ cdef class MPolynomial_libsingular(MPolynomial): 199 + if _ring!=currRing: rChangeCurrRing(_ring) # singclap_gcd 200 + gcd = singclap_gcd(p_Copy(self._poly, _ring), p_Copy(_g._poly, _ring), _ring ) 201 + prod = pp_Mult_qq(self._poly, _g._poly, _ring) 202 + - ret = singclap_pdivide(prod , gcd , _ring) 203 + - p_Delete(&prod, _ring) 204 + - p_Delete(&gcd, _ring) 205 + + ret = p_Divide(prod, gcd, _ring) 206 + if count >= 20: 207 + sig_off() 208 + return new_MP(self._parent, ret) 209 + @@ -4866,7 +4861,7 @@ cdef class MPolynomial_libsingular(MPolynomial): 210 + sage: f.quo_rem(y) 211 + (2*x^2, x + 1) 212 + sage: f.quo_rem(3*x) 213 + - (2*x*y + 1, -4*x^2*y - 2*x + 1) 214 + + (0, 2*x^2*y + x + 1) 215 + 216 + TESTS:: 217 + 218 + @@ -4888,7 +4883,7 @@ cdef class MPolynomial_libsingular(MPolynomial): 219 + if right.is_zero(): 220 + raise ZeroDivisionError 221 + 222 + - if not self._parent._base.is_field() and not is_IntegerRing(self._parent._base): 223 + + if not self._parent._base.is_field(): 224 + py_quo = self//right 225 + py_rem = self - right*py_quo 226 + return py_quo, py_rem 227 + diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx 228 + index d5439f7f08..ad20ebcca0 100644 229 + --- a/src/sage/rings/polynomial/plural.pyx 230 + +++ b/src/sage/rings/polynomial/plural.pyx 231 + @@ -998,7 +998,7 @@ cdef class NCPolynomialRing_plural(Ring): 232 + if not g._poly: 233 + raise ZeroDivisionError 234 + 235 + - res = pDivide(f._poly,g._poly) 236 + + res = pMDivide(f._poly,g._poly) 237 + if coeff: 238 + if (r.cf.type == n_unknown) or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): 239 + n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) 240 + @@ -1193,7 +1193,7 @@ cdef class NCPolynomialRing_plural(Ring): 241 + if isinstance(g, NCPolynomial_plural) \ 242 + and (<NCPolynomial_plural>g) \ 243 + and p_LmDivisibleBy((<NCPolynomial_plural>g)._poly, m, r): 244 + - flt = pDivide(f._poly, (<NCPolynomial_plural>g)._poly) 245 + + flt = pMDivide(f._poly, (<NCPolynomial_plural>g)._poly) 246 + #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((<NCPolynomial_plural>g)._poly, r), r), r) 247 + p_SetCoeff(flt, n_Init(1, r), r) 248 + return new_NCP(self,flt), g 249 + diff --git a/src/sage/rings/polynomial/polynomial_singular_interface.py b/src/sage/rings/polynomial/polynomial_singular_interface.py 250 + index 9331169f8b..f753610fd3 100644 251 + --- a/src/sage/rings/polynomial/polynomial_singular_interface.py 252 + +++ b/src/sage/rings/polynomial/polynomial_singular_interface.py 253 + @@ -81,8 +81,8 @@ class PolynomialRing_singular_repr: 254 + sage: R.<x,y> = PolynomialRing(CC) 255 + sage: singular(R) 256 + polynomial ring, over a field, global ordering 257 + - // coefficients: float[I](complex:15 digits, additional 0 digits)/(I^2+1) 258 + - // number of vars : 2 259 + + // coefficients: real[I](complex:15 digits, additional 0 digits)/(I^2+1) 260 + + // number of vars : 2 261 + // block 1 : ordering dp 262 + // : names x y 263 + // block 2 : ordering C 264 + @@ -90,8 +90,8 @@ class PolynomialRing_singular_repr: 265 + sage: R.<x,y> = PolynomialRing(RealField(100)) 266 + sage: singular(R) 267 + polynomial ring, over a field, global ordering 268 + - // coefficients: float 269 + - // number of vars : 2 270 + + // coefficients: Float() 271 + + // number of vars : 2 272 + // block 1 : ordering dp 273 + // : names x y 274 + // block 2 : ordering C
-62
pkgs/applications/science/math/sage/patches/sphinx-1.7.patch
··· 1 - diff --git a/src/bin/sage b/src/bin/sage 2 - index 397f30cbed..3fc473c343 100755 3 - --- a/src/bin/sage 4 - +++ b/src/bin/sage 5 - @@ -980,8 +980,11 @@ if [ "$1" = '-rsyncdist' -o "$1" = "--rsyncdist" ]; then 6 - fi 7 - 8 - if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then 9 - + # Redirect stdin from /dev/null. This helps with running TeX which 10 - + # tends to ask interactive questions if something goes wrong. These 11 - + # cause the build to hang. If stdin is /dev/null, TeX just aborts. 12 - shift 13 - - exec sage-python23 -m "sage_setup.docbuild" "$@" 14 - + exec sage-python23 -m sage_setup.docbuild "$@" </dev/null 15 - fi 16 - 17 - if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then 18 - diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py 19 - index 25f94f7b7d..3f07474d9b 100644 20 - --- a/src/doc/common/conf.py 21 - +++ b/src/doc/common/conf.py 22 - @@ -627,7 +627,7 @@ def call_intersphinx(app, env, node, contnode): 23 - sage: for line in open(thematic_index).readlines(): 24 - ....: if "padics" in line: 25 - ....: sys.stdout.write(line) 26 - - <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> 27 - + <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> 28 - """ 29 - debug_inf(app, "???? Trying intersphinx for %s"%node['reftarget']) 30 - builder = app.builder 31 - diff --git a/src/sage/misc/sphinxify.py b/src/sage/misc/sphinxify.py 32 - index 4f76d4113a..8f426b5989 100644 33 - --- a/src/sage/misc/sphinxify.py 34 - +++ b/src/sage/misc/sphinxify.py 35 - @@ -47,11 +47,11 @@ def sphinxify(docstring, format='html'): 36 - 37 - sage: from sage.misc.sphinxify import sphinxify 38 - sage: sphinxify('A test') 39 - - '...<div class="docstring">\n \n <p>A test</p>\n\n\n</div>' 40 - + '<div class="docstring">\n \n <p>A test</p>\n\n\n</div>' 41 - sage: sphinxify('**Testing**\n`monospace`') 42 - - '...<div class="docstring"...<strong>Testing</strong>\n<span class="math"...</p>\n\n\n</div>' 43 - + '<div class="docstring"...<strong>Testing</strong>\n<span class="math...</p>\n\n\n</div>' 44 - sage: sphinxify('`x=y`') 45 - - '...<div class="docstring">\n \n <p><span class="math">x=y</span></p>\n\n\n</div>' 46 - + '<div class="docstring">\n \n <p><span class="math notranslate nohighlight">x=y</span></p>\n\n\n</div>' 47 - sage: sphinxify('`x=y`', format='text') 48 - 'x=y\n' 49 - sage: sphinxify(':math:`x=y`', format='text') 50 - diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py 51 - index fda76a4174..d3413239dd 100644 52 - --- a/src/sage_setup/docbuild/sphinxbuild.py 53 - +++ b/src/sage_setup/docbuild/sphinxbuild.py 54 - @@ -207,7 +207,7 @@ def runsphinx(): 55 - try: 56 - sys.stdout = SageSphinxLogger(sys.stdout, os.path.basename(output_dir)) 57 - sys.stderr = SageSphinxLogger(sys.stderr, os.path.basename(output_dir)) 58 - - sphinx.cmdline.main(sys.argv) 59 - + sphinx.cmdline.main(sys.argv[1:]) 60 - finally: 61 - sys.stdout = saved_stdout 62 - sys.stderr = saved_stderr
+46
pkgs/applications/science/math/sage/patches/spkg-scripts.patch
··· 1 + commit f02714d4aea80e17cb8df62bab75d7c1a1b61a8e 2 + Author: Timo Kaufmann <timokau@zoho.com> 3 + Date: Mon Jul 9 18:26:18 2018 +0200 4 + 5 + Don't attempt to create dirs when showing pkg info 6 + 7 + The script dir cannot be assumed to be writeable after installation. 8 + 9 + diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg 10 + index f3e02aeae5..190d558ad1 100755 11 + --- a/build/bin/sage-spkg 12 + +++ b/build/bin/sage-spkg 13 + @@ -167,14 +167,6 @@ if [ -z "$SAGE_BUILD_DIR" ]; then 14 + export SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build" 15 + fi 16 + 17 + -for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS"; do 18 + - mkdir -p "$dir" 19 + - if [ $? -ne 0 ]; then 20 + - error_msg "Error creating directory $dir" 21 + - exit 1 22 + - fi 23 + -done 24 + - 25 + 26 + # Remove '.' from PYTHONPATH, which may also come from SAGE_PATH, to avoid 27 + # trouble with setuptools / easy_install (cf. #10192, #10176): 28 + @@ -563,11 +555,13 @@ fi 29 + # Setup directories 30 + ################################################################## 31 + 32 + -mkdir -p "$SAGE_BUILD_DIR" 33 + -if [ $? -ne 0 ]; then 34 + - error_msg "Error creating directory $SAGE_BUILD_DIR" 35 + - exit 1 36 + -fi 37 + +for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS" "$SAGE_BUILD_DIR"; do 38 + + mkdir -p "$dir" 39 + + if [ $? -ne 0 ]; then 40 + + error_msg "Error creating directory $dir" 41 + + exit 1 42 + + fi 43 + +done 44 + 45 + # Trac #5852: check write permissions 46 + if [ ! -w "$SAGE_BUILD_DIR" ]; then
-13
pkgs/applications/science/math/sage/patches/zn_poly_version.patch
··· 1 - diff --git a/src/sage/misc/package.py b/src/sage/misc/package.py 2 - index 7ff4f21675..1d72168833 100644 3 - --- a/src/sage/misc/package.py 4 - +++ b/src/sage/misc/package.py 5 - @@ -350,7 +350,7 @@ def package_versions(package_type, local=False): 6 - sage: 'gap' in std 7 - True 8 - sage: std['zn_poly'] 9 - - ('0.9.p11', '0.9.p11') 10 - + ('0.9', '0.9.p11') 11 - """ 12 - return {pkg['name']: (pkg['installed_version'], pkg['remote_version']) for pkg in list_packages(package_type, local=local).values()} 13 -
+32 -96
pkgs/applications/science/math/sage/sage-src.nix
··· 3 3 , fetchpatch 4 4 }: 5 5 stdenv.mkDerivation rec { 6 - version = "8.2"; 6 + version = "8.3"; 7 7 name = "sage-src-${version}"; 8 8 9 9 src = fetchFromGitHub { 10 10 owner = "sagemath"; 11 11 repo = "sage"; 12 12 rev = version; 13 - sha256 = "0d7vc16s7dj23an2cb8v5bhbnc6nsw20qhnnxr0xh8qg629027b8"; 13 + sha256 = "0mbm99m5xry21xpi4q3q96gx392liwbifywf5awvl0j85a7rkfyx"; 14 14 }; 15 15 16 16 nixPatches = [ 17 + # https://trac.sagemath.org/ticket/25809 18 + ./patches/spkg-scripts.patch 19 + 17 20 # https://trac.sagemath.org/ticket/25309 18 21 (fetchpatch { 19 22 name = "spkg-paths.patch"; ··· 26 29 sha256 = "14s50yg3hpw9cp3v581dx7zfmpm2j972im7x30iwki8k45mjvk3i"; 27 30 }) 28 31 29 - # https://trac.sagemath.org/ticket/25328 30 - # https://trac.sagemath.org/ticket/25546 31 32 # https://trac.sagemath.org/ticket/25722 32 - (fetchpatch { 33 - name = "install-jupyter-kernel-in-correct-prefix.patch"; 34 - url = "https://git.sagemath.org/sage.git/patch?id=72167b98e3f64326df6b2c78785df25539472fcc"; 35 - sha256 = "0pscnjhm7r2yr2rxnv4kkkq626vwaja720lixa3m3w9rwlxll5a7"; 36 - }) 37 33 ./patches/test-in-tmpdir.patch 38 34 39 35 # https://trac.sagemath.org/ticket/25358 ··· 43 39 sha256 = "1hhannz7xzprijakn2w2d0rhd5zv2zikik9p51i87bas3nc658f7"; 44 40 }) 45 41 46 - # https://trac.sagemath.org/ticket/25357 rebased on 8.2 47 - ./patches/python3-syntax-without-write.patch 48 - 49 - # https://trac.sagemath.org/ticket/25314 50 - (fetchpatch { 51 - name = "make-qepcad-test-optional.patch"; 52 - url = "https://git.sagemath.org/sage.git/patch/?h=fe294c58bd035ef427e268901d54a6faa0058138"; 53 - sha256 = "003d5baf5c0n5rfg010ijwkwz8kg0s414cxwczs2vhdayxdixbix"; 54 - }) 55 - 42 + # Unfortunately inclusion in upstream sage was rejected. Instead the bug was 43 + # fixed in python, but of course not backported to 2.7. So we'll probably 44 + # have to keep this around until 2.7 is deprecated. 56 45 # https://trac.sagemath.org/ticket/25316 46 + # https://github.com/python/cpython/pull/7476 57 47 ./patches/python-5755-hotpatch.patch 58 48 59 - # https://trac.sagemath.org/ticket/25354 60 - # https://trac.sagemath.org/ticket/25531 61 - (fetchpatch { 62 - name = "cysignals-include.patch"; 63 - url = "https://git.sagemath.org/sage.git/patch/?h=28778bd25a37c80884d2b24e0683fb2989300cef"; 64 - sha256 = "0fiiiw91pgs8avm9ggj8hb64bhqzl6jcw094d94nhirmh8w2jmc5"; 65 - }) 66 - 67 49 # https://trac.sagemath.org/ticket/25315 68 50 (fetchpatch { 69 51 name = "find-libraries-in-dyld-library-path.patch"; 70 52 url = "https://git.sagemath.org/sage.git/patch/?h=20d4593876ce9c6004eac2ab6fd61786d0d96a06"; 71 53 sha256 = "1k3afq3qlzmgqwx6rzs5wv153vv9dsf5rk8pi61g57l3r3npbjmc"; 72 54 }) 73 - 74 - # Pari upstream has since accepted a patch, so this patch won't be necessary once sage updates pari. 75 - # https://trac.sagemath.org/ticket/25312 76 - ./patches/pari-stackwarn.patch 77 - 78 - # https://trac.sagemath.org/ticket/25311 79 - ./patches/zn_poly_version.patch 80 55 81 56 # https://trac.sagemath.org/ticket/25345 82 57 # (upstream patch doesn't apply on 8.2 source) ··· 105 80 # page, but not marked as "latest release" and the homepage still links to 106 81 # the last version. 107 82 ./patches/eclib-regulator-precision.patch 108 - 109 - # sphinx 1.6 -> 1.7 upgrade 110 - # https://trac.sagemath.org/ticket/24935 111 - ./patches/sphinx-1.7.patch 112 - 113 - # Adapt hashes to new boost version 114 - # https://trac.sagemath.org/ticket/22243 115 - # (this ticket doesn't only upgrade boost but also avoids this problem in the future) 116 - (fetchpatch { 117 - name = "boost-upgrade.patch"; 118 - url = "https://git.sagemath.org/sage.git/patch?id=a24a9c6b30b93957333a3116196214a931325b69"; 119 - sha256 = "0z3870g2ms2a81vnw08dc2i4k7jr62w8fggvcdwaavgd1wvdxwfl"; 120 - }) 121 - 122 - # gfan 0.6.2 123 - # https://trac.sagemath.org/ticket/23353 124 - (fetchpatch { 125 - name = "gfan-update.patch"; 126 - url = "https://git.sagemath.org/sage.git/patch/?h=420215fc469cde733ec7a339e59b78ad6eec804c&id=112498a293ea2bf563e41aed35f1aa608f01b349"; 127 - sha256 = "0ga3hkx8cr23dpc919lgvpi5lmy0d728jkq9z6kf0fl9s8g31mxb"; 128 - }) 129 83 130 84 # New glpk version has new warnings, filter those out until upstream sage has found a solution 131 85 # https://trac.sagemath.org/ticket/24824 86 + ./patches/pari-stackwarn.patch # not actually necessary since tha pari upgrade, but necessary for the glpk patch to apply 132 87 (fetchpatch { 133 88 url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/dt-version-glpk-4.65-ignore-warnings.patch"; 134 89 sha256 = "0b9293v73wb4x13wv5zwyjgclc01zn16msccfzzi6znswklgvddp"; 135 90 stripLen = 1; 136 91 }) 137 92 138 - # https://trac.sagemath.org/ticket/25329 139 - (fetchpatch { 140 - name = "dont-check-exact-glpk-version.patch"; 141 - url = "https://git.sagemath.org/sage.git/patch?id2=8bdc326ba57d1bb9664f63cf165a9e9920cc1afc&id=89d068d8d77316bfffa6bf8e9ebf70b3b3b88e5c"; 142 - sha256 = "00knwxs6fmymfgfl0q5kcavmxm9sf90a4r76y35n5s55gj8pl918"; 143 - }) 93 + # Only formatting changes. 94 + # https://trac.sagemath.org/ticket/25260 95 + ./patches/numpy-1.14.3.patch 144 96 145 - # https://trac.sagemath.org/ticket/25355 146 - (fetchpatch { 147 - name = "maxima-5.41.0.patch"; 148 - url = "https://git.sagemath.org/sage.git/patch/?id=87328023c4739abdf24108038201e3fa9bdfc739"; 149 - sha256 = "0hxi7qr5mfx1bc32r8j7iba4gzd7c6v63asylyf5cbyp86azpb7i"; 150 - }) 97 + # https://trac.sagemath.org/ticket/25862 98 + ./patches/eclib-20180710.patch 151 99 152 - # Update cddlib from 0.94g to 0.94h. 153 - # https://trac.sagemath.org/ticket/25341 (doesn't apply to 8.2 sources) 100 + # https://trac.sagemath.org/ticket/24735 101 + ./patches/singular-4.1.1p2.patch 102 + 103 + # https://trac.sagemath.org/ticket/25567 and dependency #25635 154 104 (fetchpatch { 155 - url = "https://salsa.debian.org/science-team/sagemath/raw/58bbba93a807ca2933ca317501d093a1bb4b84db/debian/patches/u2-version-cddlib-094h.patch"; 156 - sha256 = "0fmw7pzbaxs2dshky6iw9pr8i23p9ih2y2lw661qypdrxh5xw03k"; 157 - stripLen = 1; 105 + name = "pari-upgrade-dependency.patch"; 106 + url = "https://git.sagemath.org/sage.git/patch/?id=6995e7cae1b3476ad0145f8dfc897cf91f0c3c4d"; 107 + sha256 = "1dvhabl1c9pwd9xkjvbjjg15mvb14b24p1f3cby1mlqk34d4lrs6"; 158 108 }) 159 109 (fetchpatch { 160 - name = "revert-cddlib-doctest-changes.patch"; 161 - url = "https://git.sagemath.org/sage.git/patch/?id=269c1e1551285566b8ba7a2b890989e5590e9f11"; 162 - sha256 = "12bcjhq7hm2pmmj2bgjvcffjyls2x7q61ivlnaj5v5bsvhc183iy"; 163 - revert = true; 110 + name = "pari-2.11.0.patch"; 111 + url = "https://git.sagemath.org/sage.git/patch/?id=7af4748cab37d651eaa88be501db88f4a5ffc584"; 112 + sha256 = "13f740ly3c19gcmhjngiycvmc3mcfj61y00i6jv0wmfgpm2z3ank"; 164 113 }) 165 114 166 - 167 - # Only formatting changes. 168 - # https://trac.sagemath.org/ticket/25260 169 - ./patches/numpy-1.14.3.patch 170 - 171 - # https://trac.sagemath.org/ticket/24374 115 + # ntl upgrade 172 116 (fetchpatch { 173 - name = "networkx-2.1.patch"; 174 - url = "https://salsa.debian.org/science-team/sagemath/raw/487df9ae48ca1d93d9b1cb3af8745d31e30fb741/debian/patches/u0-version-networkx-2.1.patch"; 175 - sha256 = "1xxxawygbgxgvlv7b4w8hhzgdnva4rhmgdxaiaa3pwdwln0yc750"; 176 - stripLen = 1; 117 + name = "lcalc-c++11.patch"; 118 + url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa"; 119 + sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb"; 177 120 }) 178 - 179 - # https://trac.sagemath.org/ticket/24927 rebased 180 - ./patches/arb-2.13.0.patch 181 - 182 - # https://trac.sagemath.org/ticket/24838 rebased 183 - ./patches/pynac-0.7.22.patch 184 - 185 - # https://trac.sagemath.org/ticket/25862 186 - ./patches/eclib-20180710.patch 187 121 ]; 188 122 189 - patches = nixPatches ++ packageUpgradePatches; 123 + patches = nixPatches ++ packageUpgradePatches ++ [ 124 + ./patches/known-padics-bug.patch 125 + ]; 190 126 191 127 postPatch = '' 192 128 # make sure shebangs etc are fixed, but sage-python23 still works
+13
pkgs/applications/science/math/singular/default.nix
··· 1 1 { stdenv, fetchurl, gmp, bison, perl, ncurses, readline, coreutils, pkgconfig 2 2 , lib 3 + , fetchpatch 3 4 , autoreconfHook 4 5 , file 5 6 , flint ··· 35 36 postUnpack = '' 36 37 patchShebangs . 37 38 ''; 39 + 40 + patches = [ 41 + # NTL error handler was introduced in the library part, preventing users of 42 + # the library from implementing their own error handling 43 + # https://www.singular.uni-kl.de/forum/viewtopic.php?t=2769 44 + (fetchpatch { 45 + name = "move_error_handler_out_of_libsingular.patch"; 46 + # rebased version of https://github.com/Singular/Sources/commit/502cf86d0bb2a96715be6764774b64a69c1ca34c.patch 47 + url = "https://git.sagemath.org/sage.git/plain/build/pkgs/singular/patches/singular-ntl-error-handler.patch?h=50b9ae2fd233c30860e1cbb3e63a26f2cc10560a"; 48 + sha256 = "0vgh4m9zn1kjl0br68n04j4nmn5i1igfn28cph0chnwf7dvr9194"; 49 + }) 50 + ]; 38 51 39 52 # For reference (last checked on commit 75f460d): 40 53 # https://github.com/Singular/Sources/blob/spielwiese/doc/Building-Singular-from-source.md
+12
pkgs/development/libraries/science/math/lcalc/default.nix
··· 57 57 58 58 # based on gentoos makefile patch -- fix paths, adhere to flags 59 59 ./makefile.patch 60 + 61 + # (fetchpatch { 62 + # name = "default-double.patch"; 63 + # url = "https://github.com/dimpase/lcalc/pull/1/commits/0500c67b6aa1f492715591669f6647c8f7a3ea59.patch"; 64 + # sha256 = "0dqwmxpm9wb53qbypsyfkgsvk2f8nf67sydphd4dkc2vw4yz6vla"; 65 + # }) 66 + 67 + (fetchpatch { 68 + name = "c++11.patch"; 69 + url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/lcalc-c++11.patch?h=packages/lcalc&id=3607b97df5a8c231191115b0cb5c62426b339e71"; 70 + sha256 = "1ccrl61lv2vvx8ggldq54m5d0n1iy6mym7qz0i8nj6yj0dshnpk3"; 71 + }) 60 72 ]; 61 73 62 74 installFlags = [
+11
pkgs/development/python-modules/ipython/5.nix
··· 2 2 , stdenv 3 3 , buildPythonPackage 4 4 , fetchPypi 5 + , fetchpatch 5 6 # Build dependencies 6 7 , glibcLocales 7 8 # Test dependencies ··· 35 36 prePatch = stdenv.lib.optionalString stdenv.isDarwin '' 36 37 substituteInPlace setup.py --replace "'gnureadline'" " " 37 38 ''; 39 + 40 + patches = [ 41 + # improve cython support, needed by sage, accepted upstream 42 + # https://github.com/ipython/ipython/pull/11139 43 + (fetchpatch { 44 + name = "signature-use-inspect.patch"; 45 + url = "https://github.com/ipython/ipython/commit/8d399b98d3ed5c765835594100c4d36fb2f739dc.patch"; 46 + sha256 = "1r7v9clwwbskmj4y160vcj6g0vzqbvnj4y1bm2n4bskafapm42g0"; 47 + }) 48 + ]; 38 49 39 50 buildInputs = [ glibcLocales ]; 40 51