diff --git a/.gitignore b/.gitignore index 7ecb53f..941e8c6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /sage-5.13.tar /sage-6.1.1.tar.gz /sage-6.2.tar.gz +/sage-6.3.tar.gz diff --git a/sagemath-cbc.patch b/sagemath-cbc.patch index 27353e5..4d3b132 100644 --- a/sagemath-cbc.patch +++ b/sagemath-cbc.patch @@ -1,6 +1,7 @@ ---- src/module_list.py.orig 2014-05-10 16:02:43.371125667 -0300 -+++ src/module_list.py 2014-05-10 16:02:58.362124591 -0300 -@@ -2115,7 +2115,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h" +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2014-08-12 14:22:43.914983839 -0300 ++++ src/module_list.py 2014-08-12 14:22:55.283984274 -0300 +@@ -2148,7 +2148,7 @@ if (os.path.isfile(SAGE_INC + "/cplex.h" libraries = ["stdc++", "cplex"]) ) diff --git a/sagemath-cremona.patch b/sagemath-cremona.patch index 5ca9b85..6548aa1 100644 --- a/sagemath-cremona.patch +++ b/sagemath-cremona.patch @@ -1,7 +1,7 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py ---- src/sage/databases/cremona.py.orig 2014-02-07 12:35:15.971835685 -0200 -+++ src/sage/databases/cremona.py 2014-02-07 12:35:25.242836040 -0200 -@@ -886,14 +886,9 @@ class MiniCremonaDatabase(SQLDatabase): +--- src/sage/databases/cremona.py.orig 2014-08-12 14:17:40.563972222 -0300 ++++ src/sage/databases/cremona.py 2014-08-12 14:17:51.891972656 -0300 +@@ -814,14 +814,9 @@ class MiniCremonaDatabase(SQLDatabase): if N < self.largest_conductor(): message = "There is no elliptic curve with label " + label \ + " in the database" @@ -15,9 +15,9 @@ diff -up src/sage/databases/cremona.py.orig src/sage/databases/cremona.py - + "contains the complete Cremona database" + + label + " in the default database" raise ValueError(message) - - def iter(self, conductors): -@@ -1591,10 +1586,12 @@ def CremonaDatabase(name=None,mini=None, + ainvs = eval(c[0]) + data = {'cremona_label': label, +@@ -1656,10 +1651,12 @@ def CremonaDatabase(name=None,mini=None, if name is None and not set_global: return _db if set_global and name is None: diff --git a/sagemath-cryptominisat.patch b/sagemath-cryptominisat.patch index 6133d8a..e937762 100644 --- a/sagemath-cryptominisat.patch +++ b/sagemath-cryptominisat.patch @@ -1,6 +1,7 @@ ---- src/module_list.py.orig 2014-05-10 15:59:50.979138032 -0300 -+++ src/module_list.py 2014-05-10 16:00:00.142137375 -0300 -@@ -2125,7 +2125,7 @@ if is_package_installed('cbc'): +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2014-08-12 14:24:04.771986935 -0300 ++++ src/module_list.py 2014-08-12 14:24:13.962987287 -0300 +@@ -2158,7 +2158,7 @@ if 1: ) diff --git a/sagemath-extensions.patch b/sagemath-extensions.patch index f394699..5d6e824 100644 --- a/sagemath-extensions.patch +++ b/sagemath-extensions.patch @@ -1,7 +1,7 @@ diff -up src/module_list.py.orig src/module_list.py ---- src/module_list.py.orig 2014-05-26 13:34:05.597783829 -0300 -+++ src/module_list.py 2014-05-26 13:34:15.908784224 -0300 -@@ -2070,7 +2070,8 @@ ext_modules = [ +--- src/module_list.py.orig 2014-08-12 14:02:16.914936853 -0300 ++++ src/module_list.py 2014-08-12 14:02:26.626937225 -0300 +@@ -2103,7 +2103,8 @@ ext_modules = [ # These extensions are to be compiled only if the # corresponding packages have been installed diff --git a/sagemath-fes.patch b/sagemath-fes.patch index 559d784..870cb18 100644 --- a/sagemath-fes.patch +++ b/sagemath-fes.patch @@ -1,6 +1,7 @@ ---- src/module_list.py.orig 2014-05-10 15:58:00.155145981 -0300 -+++ src/module_list.py 2014-05-10 15:58:09.742145293 -0300 -@@ -2074,7 +2074,7 @@ ext_modules = [ +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2014-08-12 14:23:31.642985666 -0300 ++++ src/module_list.py 2014-08-12 14:23:39.051985950 -0300 +@@ -2107,7 +2107,7 @@ ext_modules = [ def is_package_installed(name): return False diff --git a/sagemath-gap-hap.patch b/sagemath-gap-hap.patch index 95a545b..778bedd 100644 --- a/sagemath-gap-hap.patch +++ b/sagemath-gap-hap.patch @@ -1,5 +1,6 @@ ---- src/sage/groups/perm_gps/permgroup.py.orig 2014-05-10 15:53:23.284165840 -0300 -+++ src/sage/groups/perm_gps/permgroup.py 2014-05-10 15:54:59.829158915 -0300 +diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py +--- src/sage/groups/perm_gps/permgroup.py.orig 2014-08-12 14:19:36.779976673 -0300 ++++ src/sage/groups/perm_gps/permgroup.py 2014-08-12 14:19:44.435976966 -0300 @@ -180,8 +180,7 @@ def hap_decorator(f): """ @wraps(f) @@ -10,7 +11,7 @@ load_hap() from sage.rings.arith import is_prime if not (p == 0 or is_prime(p)): -@@ -3933,8 +3932,7 @@ class PermutationGroup_generic(group.Gro +@@ -3934,8 +3933,7 @@ class PermutationGroup_generic(group.Gro - David Joyner and Graham Ellis """ diff --git a/sagemath-jmol.patch b/sagemath-jmol.patch index c35ab2e..ea2fc32 100644 --- a/sagemath-jmol.patch +++ b/sagemath-jmol.patch @@ -1,16 +1,7 @@ diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py ---- src/sage/interfaces/jmoldata.py.orig 2014-02-07 12:31:50.599827821 -0200 -+++ src/sage/interfaces/jmoldata.py 2014-02-07 12:34:31.334833976 -0200 -@@ -64,7 +64,7 @@ class JmolData(SageObject): - sage_makedirs(jmolscratch) - scratchout = os.path.join(jmolscratch,"jmolout.txt") - jout=open(scratchout,'w') -- testjavapath = os.path.join(SAGE_LOCAL, "share", "jmol", "testjava.sh") -+ testjavapath = os.path.join(SAGE_LOCAL, "bin", "testjava.sh") - result = subprocess.call([testjavapath],stdout=jout) - jout.close() - if (result == 0): -@@ -144,8 +144,6 @@ class JmolData(SageObject): +--- src/sage/interfaces/jmoldata.py.orig 2014-08-12 14:13:57.189963669 -0300 ++++ src/sage/interfaces/jmoldata.py 2014-08-12 14:16:21.359969189 -0300 +@@ -139,8 +139,6 @@ class JmolData(SageObject): True """ @@ -19,7 +10,7 @@ diff -up src/sage/interfaces/jmoldata.py.orig src/sage/interfaces/jmoldata.py launchscript = "" if (datafile_cmd!='script'): launchscript = "load " -@@ -157,9 +155,8 @@ class JmolData(SageObject): +@@ -152,9 +150,8 @@ class JmolData(SageObject): scratchout = tmp_filename(ext=".txt") with open(scratchout, 'w') as jout: # Now call the java application and write the file. diff --git a/sagemath-lrcalc.patch b/sagemath-lrcalc.patch index c6df0b9..2e0c369 100644 --- a/sagemath-lrcalc.patch +++ b/sagemath-lrcalc.patch @@ -1,6 +1,7 @@ ---- src/module_list.py.orig 2014-05-10 15:57:18.343148980 -0300 -+++ src/module_list.py 2014-05-10 15:57:28.082148282 -0300 -@@ -2150,7 +2150,7 @@ if UNAME[0] == "Darwin" and not UNAME[2] +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2014-08-12 14:22:06.954982423 -0300 ++++ src/module_list.py 2014-08-12 14:22:15.018982732 -0300 +@@ -2191,7 +2191,7 @@ if UNAME[0] == "Darwin" and not UNAME[2] ) diff --git a/sagemath-lrslib.patch b/sagemath-lrslib.patch index a4c9d98..988d923 100644 --- a/sagemath-lrslib.patch +++ b/sagemath-lrslib.patch @@ -1,7 +1,7 @@ diff -up src/sage/geometry/polyhedron/base.py.orig src/sage/geometry/polyhedron/base.py ---- src/sage/geometry/polyhedron/base.py.orig 2014-02-07 12:36:06.514837620 -0200 -+++ src/sage/geometry/polyhedron/base.py 2014-02-07 12:36:16.918838019 -0200 -@@ -3406,11 +3406,6 @@ class Polyhedron_base(Element): +--- src/sage/geometry/polyhedron/base.py.orig 2014-08-12 14:18:21.763973800 -0300 ++++ src/sage/geometry/polyhedron/base.py 2014-08-12 14:18:29.539974098 -0300 +@@ -3494,11 +3494,6 @@ class Polyhedron_base(Element): David Avis's lrs program. """ diff --git a/sagemath-maxima.patch b/sagemath-maxima.patch index 8f51457..04af0ff 100644 --- a/sagemath-maxima.patch +++ b/sagemath-maxima.patch @@ -1,6 +1,6 @@ diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp ---- src/bin/sage-maxima.lisp.orig 2014-02-07 11:52:01.751736343 -0200 -+++ src/bin/sage-maxima.lisp 2014-02-07 11:52:17.429736944 -0200 +--- src/bin/sage-maxima.lisp.orig 2014-08-12 14:11:32.329958121 -0300 ++++ src/bin/sage-maxima.lisp 2014-08-12 14:11:38.922958374 -0300 @@ -3,4 +3,8 @@ ;(setf *general-display-prefix* "") @@ -12,8 +12,8 @@ diff -up src/bin/sage-maxima.lisp.orig src/bin/sage-maxima.lisp + *standard-input* (open "/dev/stdin" :direction :input) + *standard-output* (open "/dev/stdout" :direction :output)) diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py ---- src/sage/interfaces/maxima.py.orig 2014-02-07 11:50:56.989733863 -0200 -+++ src/sage/interfaces/maxima.py 2014-02-07 11:51:45.174735709 -0200 +--- src/sage/interfaces/maxima.py.orig 2014-08-12 14:11:20.722957677 -0300 ++++ src/sage/interfaces/maxima.py 2014-08-12 14:11:38.923958374 -0300 @@ -544,7 +544,7 @@ class Maxima(MaximaAbstract, Expect): Expect.__init__(self, name = 'maxima', @@ -23,7 +23,7 @@ diff -up src/sage/interfaces/maxima.py.orig src/sage/interfaces/maxima.py maxread = 10000, script_subdirectory = script_subdirectory, restart_on_ctrlc = False, -@@ -593,7 +593,8 @@ class Maxima(MaximaAbstract, Expect): +@@ -594,7 +594,8 @@ class Maxima(MaximaAbstract, Expect): # Remove limit on the max heapsize (since otherwise it defaults # to 256MB with ECL). diff --git a/sagemath-nauty.patch b/sagemath-nauty.patch index 593b5a2..76f5350 100644 --- a/sagemath-nauty.patch +++ b/sagemath-nauty.patch @@ -1,6 +1,7 @@ ---- src/sage/graphs/graph_generators.py.orig 2014-05-10 15:51:24.250174378 -0300 -+++ src/sage/graphs/graph_generators.py 2014-05-10 15:51:36.224173519 -0300 -@@ -824,7 +824,7 @@ class GraphGenerators(): +diff -up src/sage/graphs/graph_generators.py.orig src/sage/graphs/graph_generators.py +--- src/sage/graphs/graph_generators.py.orig 2014-08-12 14:19:00.906975299 -0300 ++++ src/sage/graphs/graph_generators.py 2014-08-12 14:19:08.986975608 -0300 +@@ -830,7 +830,7 @@ class GraphGenerators(): """ import subprocess from sage.misc.package import is_package_installed diff --git a/sagemath-pari2.7.patch b/sagemath-pari2.7.patch index 4ed8786..cf3dd9a 100644 --- a/sagemath-pari2.7.patch +++ b/sagemath-pari2.7.patch @@ -1,12 +1,6 @@ -From f26a0a0136b0067e12b05c207e0939ba5654a4ee Mon Sep 17 00:00:00 2001 -From: Jeroen Demeyer -Date: Mon, 05 May 2014 08:27:34 +0000 -Subject: Upgrade to PARI-2.7.1 - -diff --git a/src/doc/de/tutorial/interfaces.rst b/src/doc/de/tutorial/interfaces.rst -index 9ace22d..9f79b8f 100644 ---- a/src/doc/de/tutorial/interfaces.rst -+++ b/src/doc/de/tutorial/interfaces.rst +diff -up src/doc/de/tutorial/interfaces.rst.orig src/doc/de/tutorial/interfaces.rst +--- src/doc/de/tutorial/interfaces.rst.orig 2014-08-13 11:16:54.311162302 -0300 ++++ src/doc/de/tutorial/interfaces.rst 2014-08-13 11:16:57.547162426 -0300 @@ -135,7 +135,7 @@ Dinge mit ihr berechnen. sage: e.elltors() [1, [], []] @@ -16,11 +10,10 @@ index 9ace22d..9f79b8f 100644 sage: f = e.ellchangecurve([1,-1,0,-1]) sage: f[:5] [1, -1, 0, 4, 3] -diff --git a/src/doc/de/tutorial/tour_advanced.rst b/src/doc/de/tutorial/tour_advanced.rst -index b5fff8e..9308ac7 100644 ---- a/src/doc/de/tutorial/tour_advanced.rst -+++ b/src/doc/de/tutorial/tour_advanced.rst -@@ -359,12 +359,12 @@ Nun berechnen wir mehrere Invarianten von ``G``: +diff -up src/doc/de/tutorial/tour_advanced.rst.orig src/doc/de/tutorial/tour_advanced.rst +--- src/doc/de/tutorial/tour_advanced.rst.orig 2014-08-13 11:16:54.313162302 -0300 ++++ src/doc/de/tutorial/tour_advanced.rst 2014-08-13 11:16:57.548162426 -0300 +@@ -359,12 +359,12 @@ Nun berechnen wir mehrere Invarianten vo sage: G.gens() (Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, @@ -35,11 +28,10 @@ index b5fff8e..9308ac7 100644 sage: G.zeta_order() 4 -diff --git a/src/doc/en/bordeaux_2008/nf_galois_groups.rst b/src/doc/en/bordeaux_2008/nf_galois_groups.rst -index c67867b..4061d96 100644 ---- a/src/doc/en/bordeaux_2008/nf_galois_groups.rst -+++ b/src/doc/en/bordeaux_2008/nf_galois_groups.rst -@@ -311,7 +311,7 @@ ideal classes containing :math:`(5,\sqrt{-30})` and +diff -up src/doc/en/bordeaux_2008/nf_galois_groups.rst.orig src/doc/en/bordeaux_2008/nf_galois_groups.rst +--- src/doc/en/bordeaux_2008/nf_galois_groups.rst.orig 2014-08-13 11:16:54.315162302 -0300 ++++ src/doc/en/bordeaux_2008/nf_galois_groups.rst 2014-08-13 11:16:57.548162426 -0300 +@@ -311,7 +311,7 @@ ideal classes containing :math:`(5,\sqrt sage: category(C) Category of groups sage: C.gens() @@ -48,7 +40,7 @@ index c67867b..4061d96 100644 Arithmetic in the class group -@@ -328,17 +328,17 @@ means "the product of the 0th and 1st generators of the class group +@@ -328,17 +328,17 @@ means "the product of the 0th and 1st ge sage: K. = QuadraticField(-30) sage: C = K.class_group() sage: C.0 @@ -70,7 +62,7 @@ index c67867b..4061d96 100644 .. link -@@ -348,7 +348,7 @@ Next we find that the class of the fractional ideal +@@ -348,7 +348,7 @@ Next we find that the class of the fract sage: J = C(A) sage: J Fractional ideal class (2/3, 1/3*a) @@ -79,10 +71,9 @@ index c67867b..4061d96 100644 True -diff --git a/src/doc/en/tutorial/interfaces.rst b/src/doc/en/tutorial/interfaces.rst -index b1dc175..0d3c598 100644 ---- a/src/doc/en/tutorial/interfaces.rst -+++ b/src/doc/en/tutorial/interfaces.rst +diff -up src/doc/en/tutorial/interfaces.rst.orig src/doc/en/tutorial/interfaces.rst +--- src/doc/en/tutorial/interfaces.rst.orig 2014-08-13 11:16:54.317162302 -0300 ++++ src/doc/en/tutorial/interfaces.rst 2014-08-13 11:16:57.549162426 -0300 @@ -132,7 +132,7 @@ things about it. sage: e.elltors() [1, [], []] @@ -92,11 +83,10 @@ index b1dc175..0d3c598 100644 sage: f = e.ellchangecurve([1,-1,0,-1]) sage: f[:5] [1, -1, 0, 4, 3] -diff --git a/src/doc/en/tutorial/tour_advanced.rst b/src/doc/en/tutorial/tour_advanced.rst -index 5069d4b..32717e4 100644 ---- a/src/doc/en/tutorial/tour_advanced.rst -+++ b/src/doc/en/tutorial/tour_advanced.rst -@@ -357,12 +357,12 @@ We next compute several invariants of ``G``: +diff -up src/doc/en/tutorial/tour_advanced.rst.orig src/doc/en/tutorial/tour_advanced.rst +--- src/doc/en/tutorial/tour_advanced.rst.orig 2014-08-13 11:16:54.319162302 -0300 ++++ src/doc/en/tutorial/tour_advanced.rst 2014-08-13 11:16:57.549162426 -0300 +@@ -357,12 +357,12 @@ We next compute several invariants of `` sage: G.gens() (Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, @@ -111,10 +101,9 @@ index 5069d4b..32717e4 100644 sage: G.zeta_order() 4 -diff --git a/src/doc/fr/tutorial/interfaces.rst b/src/doc/fr/tutorial/interfaces.rst -index 147fd49..e420350 100644 ---- a/src/doc/fr/tutorial/interfaces.rst -+++ b/src/doc/fr/tutorial/interfaces.rst +diff -up src/doc/fr/tutorial/interfaces.rst.orig src/doc/fr/tutorial/interfaces.rst +--- src/doc/fr/tutorial/interfaces.rst.orig 2014-08-13 11:16:54.320162302 -0300 ++++ src/doc/fr/tutorial/interfaces.rst 2014-08-13 11:16:57.550162426 -0300 @@ -133,7 +133,7 @@ calculs avec. sage: e.elltors() [1, [], []] @@ -124,11 +113,10 @@ index 147fd49..e420350 100644 sage: f = e.ellchangecurve([1,-1,0,-1]) sage: f[:5] [1, -1, 0, 4, 3] -diff --git a/src/doc/fr/tutorial/tour_advanced.rst b/src/doc/fr/tutorial/tour_advanced.rst -index fbaa3ac..92e300d 100644 ---- a/src/doc/fr/tutorial/tour_advanced.rst -+++ b/src/doc/fr/tutorial/tour_advanced.rst -@@ -357,12 +357,12 @@ Nous calculons ensuite différents invariants de ``G``: +diff -up src/doc/fr/tutorial/tour_advanced.rst.orig src/doc/fr/tutorial/tour_advanced.rst +--- src/doc/fr/tutorial/tour_advanced.rst.orig 2014-08-13 11:16:54.322162302 -0300 ++++ src/doc/fr/tutorial/tour_advanced.rst 2014-08-13 11:16:57.550162426 -0300 +@@ -357,12 +357,12 @@ Nous calculons ensuite différents invar sage: G.gens() (Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, @@ -143,11 +131,10 @@ index fbaa3ac..92e300d 100644 sage: G.zeta_order() 4 -diff --git a/src/doc/ru/tutorial/interfaces.rst b/src/doc/ru/tutorial/interfaces.rst -index 8baa52c..497707b 100644 ---- a/src/doc/ru/tutorial/interfaces.rst -+++ b/src/doc/ru/tutorial/interfaces.rst -@@ -128,7 +128,7 @@ Sage использует С-библиотеку PARI, чтобы поддер +diff -up src/doc/ru/tutorial/interfaces.rst.orig src/doc/ru/tutorial/interfaces.rst +--- src/doc/ru/tutorial/interfaces.rst.orig 2014-08-13 11:16:54.324162302 -0300 ++++ src/doc/ru/tutorial/interfaces.rst 2014-08-13 11:16:57.551162426 -0300 +@@ -128,7 +128,7 @@ что-нибудь. sage: e.elltors() [1, [], []] sage: e.ellglobalred() @@ -156,11 +143,10 @@ index 8baa52c..497707b 100644 sage: f = e.ellchangecurve([1,-1,0,-1]) sage: f[:5] [1, -1, 0, 4, 3] -diff --git a/src/doc/ru/tutorial/tour_advanced.rst b/src/doc/ru/tutorial/tour_advanced.rst -index d9ab2c5..b7a64a7 100644 ---- a/src/doc/ru/tutorial/tour_advanced.rst -+++ b/src/doc/ru/tutorial/tour_advanced.rst -@@ -322,12 +322,12 @@ Sage может вычислить тороидальный идеал непл +diff -up src/doc/ru/tutorial/tour_advanced.rst.orig src/doc/ru/tutorial/tour_advanced.rst +--- src/doc/ru/tutorial/tour_advanced.rst.orig 2014-08-13 11:16:54.326162302 -0300 ++++ src/doc/ru/tutorial/tour_advanced.rst 2014-08-13 11:16:57.551162426 -0300 +@@ -322,12 +322,12 @@ Теперь посчитаем неск sage: G.gens() (Dirichlet character modulo 20 of conductor 4 mapping 11 |--> -1, 17 |--> 1, @@ -175,11 +161,10 @@ index d9ab2c5..b7a64a7 100644 sage: G.zeta_order() 4 -diff --git a/src/ext/pari/dokchitser/computel.gp b/src/ext/pari/dokchitser/computel.gp -index f7f5d66..9768874 100644 ---- a/src/ext/pari/dokchitser/computel.gp -+++ b/src/ext/pari/dokchitser/computel.gp -@@ -169,7 +169,7 @@ errprint(x)=if(type(x)=="t_COMPLEX",x=abs(x)); +diff -up src/ext/pari/dokchitser/computel.gp.orig src/ext/pari/dokchitser/computel.gp +--- src/ext/pari/dokchitser/computel.gp.orig 2014-08-13 11:16:54.327162302 -0300 ++++ src/ext/pari/dokchitser/computel.gp 2014-08-13 11:16:57.552162426 -0300 +@@ -169,7 +169,7 @@ errprint(x)=if(type(x)=="t_COMPLEX",x=ab { gammaseries(z0,terms, @@ -219,7 +204,7 @@ index f7f5d66..9768874 100644 ))))); default(seriesprecision,srprec); res; -@@ -231,10 +231,10 @@ fullgamma(ss) = if(ss!=lastFGs,lastFGs=ss;\ +@@ -231,10 +231,10 @@ fullgamma(ss) = if(ss!=lastFGs,lastFGs=s { fullgammaseries(ss,extraterms, @@ -233,10 +218,19 @@ index f7f5d66..9768874 100644 lastFGSs=ss; lastFGSterms=extraterms; lastFGSval=subst(prod(j=1,length(gammaV),gammaseries((ss+gammaV[j])/2,GSD)),x,S/2); -diff --git a/src/ext/pari/simon/ell.gp b/src/ext/pari/simon/ell.gp -index 0d130f4..acd807c 100644 ---- a/src/ext/pari/simon/ell.gp -+++ b/src/ext/pari/simon/ell.gp +@@ -297,7 +297,8 @@ SeriesToContFrac(vec, + while (1, + res=concat(res,[vec[1]]); + ind=0; +- until(ind==length(vec) || abs(vec[ind+1])>10^-asympdigits,ind++;vec[ind]=0); ++ \\ Sage fix: asympdigits -> asympdigits+1 ++ until(ind==length(vec) || abs(vec[ind+1])>10^-(asympdigits+1),ind++;vec[ind]=0); + if(ind>=length(vec),break); + res=concat(res,[ind]); + vec=Vec(x^ind/Ser(vec)); +diff -up src/ext/pari/simon/ell.gp.orig src/ext/pari/simon/ell.gp +--- src/ext/pari/simon/ell.gp.orig 2014-08-13 11:16:54.329162302 -0300 ++++ src/ext/pari/simon/ell.gp 2014-08-13 11:16:57.553162426 -0300 @@ -84,6 +84,11 @@ */ @@ -249,7 +243,7 @@ index 0d130f4..acd807c 100644 { \\ \\ Usual global variables -@@ -505,7 +510,7 @@ if( DEBUGLEVEL_ell >= 5, print(" end of nfissquaremodp")); +@@ -505,7 +510,7 @@ if( DEBUGLEVEL_ell >= 5, print(" end if( DEBUGLEVEL_ell >= 5, print(" end of nfissquaremodp")); return(0)); if( valap, @@ -258,7 +252,7 @@ index 0d130f4..acd807c 100644 , zlog = ideallog(nf,a,zinit)); for( i = 1, #zinit[2][2], -@@ -533,7 +538,7 @@ if( DEBUGLEVEL_ell >= 5, print(" end of nfissquaremodpq")); +@@ -533,7 +538,7 @@ if( DEBUGLEVEL_ell >= 5, print(" end if( DEBUGLEVEL_ell >= 5, print(" end of nfissquaremodpq")); return(0)); zinit = idealstar(nf,idealpow(nf,p,q-vala),2); @@ -267,7 +261,7 @@ index 0d130f4..acd807c 100644 for( i = 1, #zinit[2][2], if( !(zinit[2][2][i]%2) && (zlog[i]%2), if( DEBUGLEVEL_ell >= 5, print(" end of nfissquaremodpq")); -@@ -556,7 +561,7 @@ if( DEBUGLEVEL_ell >= 5, print(" end of nfsqrtmodpq")); +@@ -556,7 +561,7 @@ if( DEBUGLEVEL_ell >= 5, print(" end return(0)); if( f%2, error("nfsqrtmodpq: a is not a square, odd valuation")); a = nfalgtobasis(nf,a); @@ -276,7 +270,7 @@ index 0d130f4..acd807c 100644 p_hnf = idealhnf(nf,p); p_ini = nfmodprinit(nf,p); if( DEBUGLEVEL_ell >= 5, print(" p_hnf = ",p_hnf)); -@@ -680,7 +685,7 @@ if( DEBUGLEVEL_ell >= 5, print("fin de nflemma7")); +@@ -680,7 +685,7 @@ if( DEBUGLEVEL_ell >= 5, print("fin de n if( q > 2*v, if( DEBUGLEVEL_ell >= 5, print("fin de nflemma7")); return(-1)); @@ -285,7 +279,7 @@ index 0d130f4..acd807c 100644 if( DEBUGLEVEL_ell >= 5, print("fin de nflemma7")); return(1)) , -@@ -694,7 +699,7 @@ if( DEBUGLEVEL_ell >= 5, print("fin de nflemma7")); +@@ -694,7 +699,7 @@ if( DEBUGLEVEL_ell >= 5, print("fin de n if( q > 2*v, if( DEBUGLEVEL_ell >= 5, print("fin de nflemma7")); return(-1)); @@ -294,7 +288,7 @@ index 0d130f4..acd807c 100644 if( DEBUGLEVEL_ell >= 5, print("fin de nflemma7")); return(0)) ); -@@ -772,7 +777,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end of nfqp_solublebig")); +@@ -772,7 +777,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end cont = idealval(nf,polcoeff(pol,0),p); for( i = 1, deg, if( cont, cont = min(cont,idealval(nf,polcoeff(pol,i),p)))); @@ -303,7 +297,7 @@ index 0d130f4..acd807c 100644 if( cont > 1, pol *= pi^(2*(cont\2))); \\ On essaye des valeurs de x au hasard -@@ -984,7 +989,7 @@ if( DEBUGLEVEL_ell >= 2, print(" Algorithm of 2-descent via isogenies")); +@@ -984,7 +989,7 @@ if( DEBUGLEVEL_ell >= 2, print(" Algori if( DEBUGLEVEL_ell >= 3, print(" starting bnfell2descent_viaisog")); if( variable(bnf.pol) != 'y, error("bnfell2descent_viaisog: the variable of the number field must be y")); @@ -312,7 +306,7 @@ index 0d130f4..acd807c 100644 if( ell.disc == 0, error("bnfell2descent_viaisog: singular curve !!")); -@@ -1231,7 +1236,7 @@ if( DEBUGLEVEL_ell >= 4, print(" bbbnf.clgp = ",bbbnf.clgp)); +@@ -1231,7 +1236,7 @@ if( DEBUGLEVEL_ell >= 4, print(" bbbn SL = idealfactor(bbbnf,SL1)[,1]~; sunL = bnfsunit(bbbnf,SL); fondsunL = concat(bbbnf.futu,vector(#sunL[1],i,nfbasistoalg(bbbnf,sunL[1][i]))); @@ -321,7 +315,7 @@ index 0d130f4..acd807c 100644 SK = idealfactor(bnf,idealnorm(bbbnf,SL1))[,1]~; sunK = bnfsunit(bnf,SK); fondsunK = concat(bnf.futu,vector(#sunK[1],i,nfbasistoalg(bnf,sunK[1][i]))); -@@ -1500,7 +1505,7 @@ if( DEBUGLEVEL_ell >= 4, print(" starting bnfell2descent_gen")); +@@ -1500,7 +1505,7 @@ if( DEBUGLEVEL_ell >= 4, print(" star nf = bnf.nf; unnf = Mod(1,nf.pol); ellnf = ell*unnf; @@ -330,7 +324,7 @@ index 0d130f4..acd807c 100644 A = ellnf.a2; if( DEBUGLEVEL_ell >= 2, print(" A = ",A)); B = ellnf.a4; if( DEBUGLEVEL_ell >= 2, print(" B = ",B)); -@@ -1887,7 +1892,8 @@ if( DEBUGLEVEL_ell >= 4, print(" end of bnfell2descent_gen")); +@@ -1887,7 +1892,8 @@ if( DEBUGLEVEL_ell >= 4, print(" end local(urst,urst1,den,factden,eqtheta,rnfeq,bbnf,ext,rang,f); if( DEBUGLEVEL_ell >= 3, print(" starting bnfellrank")); @@ -340,10 +334,9 @@ index 0d130f4..acd807c 100644 \\ removes the coefficients a1 and a3 urst = [1,0,0,0]; -diff --git a/src/ext/pari/simon/ellQ.gp b/src/ext/pari/simon/ellQ.gp -index c114534..6861066 100644 ---- a/src/ext/pari/simon/ellQ.gp -+++ b/src/ext/pari/simon/ellQ.gp +diff -up src/ext/pari/simon/ellQ.gp.orig src/ext/pari/simon/ellQ.gp +--- src/ext/pari/simon/ellQ.gp.orig 2014-08-13 11:16:54.331162303 -0300 ++++ src/ext/pari/simon/ellQ.gp 2014-08-13 11:16:57.555162426 -0300 @@ -117,7 +117,7 @@ Courbes de la forme : k*y^2 = x^3+A*x^2+B*x+C sans 2-torsion, A,B,C entiers. @@ -353,7 +346,7 @@ index c114534..6861066 100644 gp > rank = ell2descent_gen(ell,bnf,k); Courbes avec #E[2](Q) >= 2 : -@@ -833,7 +833,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end of LS2localimage")); +@@ -833,7 +833,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end \\ returns all the points Q on ell such that 2Q = P. my(pol2,ratroots,half,x2,y2,P2); @@ -362,7 +355,7 @@ index c114534..6861066 100644 pol2 = Pol([4,ell.b2,2*ell.b4,ell.b6]); \\ 2-division polynomial -@@ -880,7 +880,7 @@ if( DEBUGLEVEL_ell >= 3, print(" E[2] = ",tors2)); +@@ -880,7 +880,7 @@ if( DEBUGLEVEL_ell >= 3, print(" E[2] my(torseven,P2); if( DEBUGLEVEL_ell >= 4, print(" computing the 2^n-torsion")); @@ -371,7 +364,7 @@ index c114534..6861066 100644 torseven = elltors2(ell); while( torseven[1] != 1, -@@ -976,7 +976,7 @@ if( DEBUGLEVEL_ell >= 5, print(" ell=",ell)); +@@ -976,7 +976,7 @@ if( DEBUGLEVEL_ell >= 5, print(" ell d = #listgen; if( d == 0, return([])); @@ -380,7 +373,7 @@ index c114534..6861066 100644 if( K != 1, if( ell.a1 != 0 || ell.a3 != 0, error(" ellredgen: a1*a3 != 0")); -@@ -1323,7 +1323,7 @@ my(A,B,C,polrel,polprime,ttheta,badprimes,S,LS2,selmer,rootapprox,p,pp,locimage, +@@ -1323,7 +1323,7 @@ my(A,B,C,polrel,polprime,ttheta,badprime if( DEBUGLEVEL_ell >= 4, print(" starting ell2descent_gen")); @@ -389,7 +382,7 @@ index c114534..6861066 100644 if( ell.a1 != 0 || ell.a3 != 0, error(" ell2descent_gen: the curve is not of the form [0,a,0,b,c]")); -@@ -1579,7 +1579,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end of ell2descent_gen")); +@@ -1579,7 +1579,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end my(urst,urst1,den,eqell,tors2,bnf,rang,time1); if( DEBUGLEVEL_ell >= 3, print(" starting ellrank")); @@ -398,7 +391,7 @@ index c114534..6861066 100644 \\ kill the coefficients a1 and a3 urst = [1,0,0,0]; -@@ -1915,7 +1915,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end of ellcount")); +@@ -1915,7 +1915,7 @@ if( DEBUGLEVEL_ell >= 4, print(" end my(P,Pfact,tors,listpointstriv,KS2prod,KS2gen,listpoints,pointgen,n1,n2,certain,apinit,bpinit,np1,np2,listpoints2,aux1,aux2,certainp,rang,strange); if( DEBUGLEVEL_ell >= 2, print(" Algorithm of 2-descent via isogenies")); @@ -407,11 +400,10 @@ index c114534..6861066 100644 if( ell.disc == 0, error(" ell2descent_viaisog: singular curve !!")); -diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py -index bb6660a..b0f24c0 100644 ---- a/src/sage/calculus/calculus.py -+++ b/src/sage/calculus/calculus.py -@@ -732,13 +732,13 @@ def nintegral(ex, x, a, b, +diff -up src/sage/calculus/calculus.py.orig src/sage/calculus/calculus.py +--- src/sage/calculus/calculus.py.orig 2014-08-13 11:16:54.333162303 -0300 ++++ src/sage/calculus/calculus.py 2014-08-13 11:16:57.555162426 -0300 +@@ -767,13 +767,13 @@ def nintegral(ex, x, a, b, to high precision:: sage: gp.eval('intnum(x=17,42,exp(-x^2)*log(x))') @@ -428,10 +420,9 @@ index bb6660a..b0f24c0 100644 Note that the input function above is a string in PARI syntax. """ -diff --git a/src/sage/functions/exp_integral.py b/src/sage/functions/exp_integral.py -index 182e80c..69f0e0d 100644 ---- a/src/sage/functions/exp_integral.py -+++ b/src/sage/functions/exp_integral.py +diff -up src/sage/functions/exp_integral.py.orig src/sage/functions/exp_integral.py +--- src/sage/functions/exp_integral.py.orig 2014-08-13 11:16:54.335162303 -0300 ++++ src/sage/functions/exp_integral.py 2014-08-13 11:16:57.556162426 -0300 @@ -1493,10 +1493,10 @@ def exponential_integral_1(x, n=0): sage: exponential_integral_1(2) @@ -455,11 +446,10 @@ index 182e80c..69f0e0d 100644 x = RealField(inprec)(x)._pari_() return R(x.eint1()) else: -diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py -index ff20df8..cde865e 100644 ---- a/src/sage/groups/generic.py -+++ b/src/sage/groups/generic.py -@@ -420,8 +420,7 @@ def bsgs(a, b, bounds, operation='*', identity=None, inverse=None, op=None): +diff -up src/sage/groups/generic.py.orig src/sage/groups/generic.py +--- src/sage/groups/generic.py.orig 2014-08-13 11:16:54.336162303 -0300 ++++ src/sage/groups/generic.py 2014-08-13 11:16:57.556162426 -0300 +@@ -420,8 +420,7 @@ def bsgs(a, b, bounds, operation='*', id sage: F. = GF(37^5) sage: E = EllipticCurve(F, [1,1]) sage: P = E.lift_x(a); P @@ -469,7 +459,7 @@ index ff20df8..cde865e 100644 This will return a multiple of the order of P:: -@@ -853,8 +852,8 @@ def discrete_log_lambda(a, base, bounds, operation='*', hash_function=hash): +@@ -853,8 +852,8 @@ def discrete_log_lambda(a, base, bounds, sage: F. = GF(37^5) sage: E = EllipticCurve(F, [1,1]) sage: P = E.lift_x(a); P @@ -480,10 +470,9 @@ index ff20df8..cde865e 100644 This will return a multiple of the order of P:: -diff --git a/src/sage/interfaces/gp.py b/src/sage/interfaces/gp.py -index 767c668..6f13f3c 100644 ---- a/src/sage/interfaces/gp.py -+++ b/src/sage/interfaces/gp.py +diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py +--- src/sage/interfaces/gp.py.orig 2014-08-13 11:16:54.339162303 -0300 ++++ src/sage/interfaces/gp.py 2014-08-13 11:16:57.556162426 -0300 @@ -24,7 +24,7 @@ PARI interpreter):: sage: E = gp.ellinit([1,2,3,4,5]) @@ -604,10 +593,9 @@ index 767c668..6f13f3c 100644 The two elliptic curves look the same, but internally the floating point numbers are slightly different. -diff --git a/src/sage/lfunctions/dokchitser.py b/src/sage/lfunctions/dokchitser.py -index da6ae49..12e991f 100644 ---- a/src/sage/lfunctions/dokchitser.py -+++ b/src/sage/lfunctions/dokchitser.py +diff -up src/sage/lfunctions/dokchitser.py.orig src/sage/lfunctions/dokchitser.py +--- src/sage/lfunctions/dokchitser.py.orig 2014-08-13 11:16:54.340162303 -0300 ++++ src/sage/lfunctions/dokchitser.py 2014-08-13 11:16:57.557162426 -0300 @@ -108,7 +108,7 @@ class Dokchitser(SageObject): sage: L.taylor_series(1,4) 0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4) @@ -648,10 +636,9 @@ index da6ae49..12e991f 100644 """ self.__check_init() a = self.__CC(a) -diff --git a/src/sage/libs/pari/decl.pxi b/src/sage/libs/pari/decl.pxi -index 41a8e1a..baa03d5 100644 ---- a/src/sage/libs/pari/decl.pxi -+++ b/src/sage/libs/pari/decl.pxi +diff -up src/sage/libs/pari/decl.pxi.orig src/sage/libs/pari/decl.pxi +--- src/sage/libs/pari/decl.pxi.orig 2014-08-13 11:16:54.343162303 -0300 ++++ src/sage/libs/pari/decl.pxi 2014-08-13 11:18:04.961165007 -0300 @@ -16,16 +16,14 @@ AUTHORS: - Jeroen Demeyer (2010-08-15): big clean up (#9898) @@ -1036,7 +1023,7 @@ index 41a8e1a..baa03d5 100644 GEN Flx_mul(GEN x, GEN y, ulong p) GEN Flx_neg(GEN x, ulong p) GEN Flx_neg_inplace(GEN x, ulong p) -@@ -431,380 +554,1409 @@ cdef extern from 'pari/pari.h': +@@ -431,381 +554,1411 @@ cdef extern from 'pari/pari.h': GEN Flx_renormalize(GEN x, long l) ulong Flx_resultant(GEN a, GEN b, ulong p) GEN Flx_shift(GEN a, long n) @@ -1309,10 +1296,9 @@ index 41a8e1a..baa03d5 100644 + long get_FpX_var(GEN T) + bb_group *get_FpXQ_star(void **E, GEN T, GEN p) + GEN random_FpX(long d, long v, GEN p) - -- # alglin1.c ++ + # FpX_factor.c - ++ + GEN F2x_factor(GEN f) + int F2x_is_irred(GEN f) + void F2xV_to_FlxV_inplace(GEN v) @@ -1780,9 +1766,10 @@ index 41a8e1a..baa03d5 100644 + GEN scalar_ZX(GEN x, long v) + GEN scalar_ZX_shallow(GEN x, long v) + GEN zx_to_ZX(GEN z) -+ + +- # alglin1.c + # alglin1.c -+ + + GEN F2m_F2c_gauss(GEN a, GEN b) + GEN F2m_F2c_invimage(GEN A, GEN y) + GEN F2m_deplin(GEN x) @@ -1925,7 +1912,7 @@ index 41a8e1a..baa03d5 100644 + GEN reducemodlll(GEN x, GEN y) + GEN split_realimag(GEN x, long r1, long r2) GEN suppl(GEN x) -- GEN vconcat(GEN A, GEN B) + GEN vconcat(GEN A, GEN B) # alglin2.c @@ -2210,8 +2197,6 @@ index 41a8e1a..baa03d5 100644 - GEN nucomp(GEN x, GEN y, GEN l) - GEN nudupl(GEN x, GEN l) - GEN nupow(GEN x, GEN n) -+ GEN mulu_interval(ulong a, ulong b) -+ GEN odd_prime_divisors(GEN q) GEN order(GEN x) GEN pnqn(GEN x) - GEN primeform(GEN x, GEN p, long prec) @@ -2221,7 +2206,6 @@ index 41a8e1a..baa03d5 100644 - GEN qfbsolve(GEN Q, GEN n) - GEN qfi(GEN x, GEN y, GEN z) - GEN qfr(GEN x, GEN y, GEN z, GEN d) -+ GEN qfbclassno0(GEN x, long flag) GEN quaddisc(GEN x) - GEN redimag(GEN x) - GEN redreal(GEN x) @@ -2246,6 +2230,7 @@ index 41a8e1a..baa03d5 100644 + GEN znorder(GEN x, GEN o) + GEN znprimroot(GEN m) GEN znstar(GEN x) + GEN sqrtint(GEN x) # arith2.c @@ -2273,7 +2258,7 @@ index 41a8e1a..baa03d5 100644 - GEN Z_factor(GEN n) + GEN digits(GEN N, GEN B) GEN divisors(GEN n) -- GEN factorint(GEN n, long flag) + GEN factorint(GEN n, long flag) - GEN gbigomega(GEN n) - GEN gbitand(GEN x, GEN y) - GEN gbitneg(GEN x, long n) @@ -2334,11 +2319,11 @@ index 41a8e1a..baa03d5 100644 + GEN embed_norm(GEN x, long r1) + void check_ZKmodule(GEN x, char *s) void checkbid(GEN bid) ++ void checkabgrp(GEN v) ++ void checksqmat(GEN x, long N) GEN checkbnf(GEN bnf) void checkbnr(GEN bnr) void checkbnrgen(GEN bnr) -+ void checkabgrp(GEN v) -+ void checksqmat(GEN x, long N) GEN checknf(GEN nf) GEN checknfelt_mod(GEN nf, GEN x, char *s) + void checkprid(GEN bid) @@ -2374,6 +2359,7 @@ index 41a8e1a..baa03d5 100644 + GEN nfisisom(GEN a, GEN b) GEN nfnewprec(GEN nf, long prec) - GEN rootsof1(GEN x) ++ GEN nfnewprec(GEN nf, long prec) + GEN nfnewprec_shallow(GEN nf, long prec) + GEN nfpoleval(GEN nf, GEN pol, GEN a) + long nftyp(GEN x) @@ -2452,10 +2438,11 @@ index 41a8e1a..baa03d5 100644 + GEN rnfequation(GEN nf, GEN pol) + GEN rnfequation0(GEN nf, GEN pol, long flall) GEN rnfequation2(GEN nf, GEN pol) + GEN rnfhnfbasis(GEN bnf, GEN order) + GEN nf_rnfeq(GEN nf, GEN relpol) + GEN nf_rnfeqsimple(GEN nf, GEN relpol) + GEN rnfequationall(GEN A, GEN B, long *pk, GEN *pLPRS) - GEN rnfhnfbasis(GEN bnf, GEN order) ++ GEN rnfhnfbasis(GEN bnf, GEN order) long rnfisfree(GEN bnf, GEN order) - GEN rnflllgram(GEN nf, GEN pol, GEN order,long prec) + GEN rnflllgram(GEN nf, GEN pol, GEN order, long prec) @@ -2628,7 +2615,7 @@ index 41a8e1a..baa03d5 100644 GEN vecdiv(GEN x, GEN y) GEN vecinv(GEN x) GEN vecmul(GEN x, GEN y) -@@ -812,169 +1964,225 @@ cdef extern from 'pari/pari.h': +@@ -813,169 +1966,225 @@ cdef extern from 'pari/pari.h': # base5.c @@ -2952,7 +2939,7 @@ index 41a8e1a..baa03d5 100644 GEN rnfnormgroup(GEN bnr, GEN polrel) GEN subgrouplist0(GEN bnr, GEN indexbound, long all) -@@ -982,146 +2190,312 @@ cdef extern from 'pari/pari.h': +@@ -983,146 +2192,312 @@ cdef extern from 'pari/pari.h': GEN bnfisnorm(GEN bnf, GEN x, long flag) GEN rnfisnorm(GEN S, GEN x, long flag) @@ -3343,7 +3330,7 @@ index 41a8e1a..baa03d5 100644 # FF.c -@@ -1132,12 +2506,22 @@ cdef extern from 'pari/pari.h': +@@ -1133,12 +2508,22 @@ cdef extern from 'pari/pari.h': GEN FF_Z_mul(GEN a, GEN b) GEN FF_add(GEN a, GEN b) GEN FF_charpoly(GEN x) @@ -3369,7 +3356,7 @@ index 41a8e1a..baa03d5 100644 GEN FF_inv(GEN a) long FF_issquare(GEN x) long FF_issquareall(GEN x, GEN *pt) -@@ -1155,15 +2539,27 @@ cdef extern from 'pari/pari.h': +@@ -1156,15 +2541,27 @@ cdef extern from 'pari/pari.h': GEN FF_p_i(GEN x) GEN FF_pow(GEN x, GEN n) GEN FF_primroot(GEN x, GEN *o) @@ -3397,7 +3384,7 @@ index 41a8e1a..baa03d5 100644 GEN FFX_factor(GEN f, GEN x) GEN FFX_roots(GEN f, GEN x) GEN Z_FF_div(GEN a, GEN b) -@@ -1172,11 +2568,19 @@ cdef extern from 'pari/pari.h': +@@ -1173,11 +2570,19 @@ cdef extern from 'pari/pari.h': GEN fforder(GEN x, GEN o) GEN ffprimroot(GEN x, GEN *o) GEN ffrandom(GEN ff) @@ -3418,7 +3405,7 @@ index 41a8e1a..baa03d5 100644 GEN galoisconj0(GEN nf, long flag, GEN d, long prec) GEN galoisexport(GEN gal, long format) GEN galoisfixedfield(GEN gal, GEN v, long flag, long y) -@@ -1191,113 +2595,174 @@ cdef extern from 'pari/pari.h': +@@ -1192,113 +2597,174 @@ cdef extern from 'pari/pari.h': GEN vandermondeinverse(GEN L, GEN T, GEN den, GEN prep) # gen1.c @@ -3619,7 +3606,7 @@ index 41a8e1a..baa03d5 100644 GEN greal(GEN x) GEN grndtoi(GEN x, long *e) GEN ground(GEN x) -@@ -1307,6 +2772,8 @@ cdef extern from 'pari/pari.h': +@@ -1308,6 +2774,8 @@ cdef extern from 'pari/pari.h': GEN gsubstvec(GEN x, GEN v, GEN y) GEN gtocol(GEN x) GEN gtocol0(GEN x, long n) @@ -3628,7 +3615,7 @@ index 41a8e1a..baa03d5 100644 GEN gtopoly(GEN x, long v) GEN gtopolyrev(GEN x, long v) GEN gtoser(GEN x, long v, long precdl) -@@ -1317,106 +2784,288 @@ cdef extern from 'pari/pari.h': +@@ -1318,106 +2786,288 @@ cdef extern from 'pari/pari.h': GEN gtovecsmall(GEN x) GEN gtovecsmall0(GEN x, long n) GEN gtrunc(GEN x) @@ -3954,7 +3941,7 @@ index 41a8e1a..baa03d5 100644 # members.c GEN member_a1(GEN x) -@@ -1429,6 +3078,7 @@ cdef extern from 'pari/pari.h': +@@ -1430,6 +3080,7 @@ cdef extern from 'pari/pari.h': GEN member_b4(GEN x) GEN member_b6(GEN x) GEN member_b8(GEN x) @@ -3962,7 +3949,7 @@ index 41a8e1a..baa03d5 100644 GEN member_bnf(GEN x) GEN member_c4(GEN x) GEN member_c6(GEN x) -@@ -1453,19 +3103,26 @@ cdef extern from 'pari/pari.h': +@@ -1454,19 +3105,26 @@ cdef extern from 'pari/pari.h': GEN member_orders(GEN x) GEN member_p(GEN x) GEN member_pol(GEN x) @@ -3990,7 +3977,7 @@ index 41a8e1a..baa03d5 100644 int absi_cmp(GEN x, GEN y) int absi_equal(GEN x, GEN y) int absr_cmp(GEN x, GEN y) -@@ -1473,35 +3130,44 @@ cdef extern from 'pari/pari.h': +@@ -1474,35 +3132,44 @@ cdef extern from 'pari/pari.h': GEN addir_sign(GEN x, long sx, GEN y, long sy) GEN addrr_sign(GEN x, long sx, GEN y, long sy) GEN addsi_sign(long x, GEN y, long sy) @@ -4041,7 +4028,7 @@ index 41a8e1a..baa03d5 100644 GEN modii(GEN x, GEN y) void modiiz(GEN x, GEN y, GEN z) GEN mulii(GEN x, GEN y) -@@ -1513,29 +3179,58 @@ cdef extern from 'pari/pari.h': +@@ -1514,29 +3181,58 @@ cdef extern from 'pari/pari.h': GEN mului(ulong x, GEN y) GEN mulur(ulong x, GEN y) GEN muluu(ulong x, ulong y) @@ -4108,7 +4095,7 @@ index 41a8e1a..baa03d5 100644 # perm.c -@@ -1556,234 +3251,293 @@ cdef extern from 'pari/pari.h': +@@ -1557,234 +3253,293 @@ cdef extern from 'pari/pari.h': long group_perm_normalize(GEN N, GEN g) GEN group_quotient(GEN G, GEN H) GEN group_rightcoset(GEN G, GEN g) @@ -4449,9 +4436,33 @@ index 41a8e1a..baa03d5 100644 + GEN init_Fq(GEN p, long n, long v) + GEN pol_x_powers(long N, long v) + GEN residual_characteristic(GEN x) -+ + +- # RgX.c + # prime.c -+ + +- int RgX_is_rational(GEN x) +- GEN RgM_to_RgXV(GEN x, long v) +- GEN RgM_to_RgXX(GEN x, long v,long w) +- GEN RgM_zc_mul(GEN x, GEN y) +- GEN RgM_zm_mul(GEN x, GEN y) +- GEN RgV_to_RgX(GEN x, long v) +- GEN RgV_zc_mul(GEN x, GEN y) +- GEN RgV_zm_mul(GEN x, GEN y) +- GEN RgX_divrem(GEN x,GEN y,GEN *r) +- GEN RgX_mul(GEN x,GEN y) +- GEN RgX_mulspec(GEN a, GEN b, long na, long nb) +- GEN RgXQX_divrem(GEN x,GEN y,GEN T,GEN *r) +- GEN RgXQX_mul(GEN x,GEN y,GEN T) +- GEN RgXQX_red(GEN P, GEN T) +- GEN RgXQX_RgXQ_mul(GEN x, GEN y, GEN T) +- GEN RgX_Rg_mul(GEN y, GEN x) +- GEN RgX_shift(GEN x, long n) +- GEN RgX_sqr(GEN x) +- GEN RgX_sqrspec(GEN a, long na) +- GEN RgXV_to_RgM(GEN v, long n) +- GEN RgX_to_RgV(GEN x, long N) +- GEN RgXX_to_RgM(GEN v, long n) +- GEN RgXY_swap(GEN x, long n, long w) + long BPSW_isprime(GEN x) + long BPSW_psp(GEN N) + GEN addprimes(GEN primes) @@ -4478,33 +4489,9 @@ index 41a8e1a..baa03d5 100644 + int uisprime(ulong n) + ulong uprime(long n) + ulong uprimepi(ulong n) - -- # RgX.c ++ + # qfisom.c - -- int RgX_is_rational(GEN x) -- GEN RgM_to_RgXV(GEN x, long v) -- GEN RgM_to_RgXX(GEN x, long v,long w) -- GEN RgM_zc_mul(GEN x, GEN y) -- GEN RgM_zm_mul(GEN x, GEN y) -- GEN RgV_to_RgX(GEN x, long v) -- GEN RgV_zc_mul(GEN x, GEN y) -- GEN RgV_zm_mul(GEN x, GEN y) -- GEN RgX_divrem(GEN x,GEN y,GEN *r) -- GEN RgX_mul(GEN x,GEN y) -- GEN RgX_mulspec(GEN a, GEN b, long na, long nb) -- GEN RgXQX_divrem(GEN x,GEN y,GEN T,GEN *r) -- GEN RgXQX_mul(GEN x,GEN y,GEN T) -- GEN RgXQX_red(GEN P, GEN T) -- GEN RgXQX_RgXQ_mul(GEN x, GEN y, GEN T) -- GEN RgX_Rg_mul(GEN y, GEN x) -- GEN RgX_shift(GEN x, long n) -- GEN RgX_sqr(GEN x) -- GEN RgX_sqrspec(GEN a, long na) -- GEN RgXV_to_RgM(GEN v, long n) -- GEN RgX_to_RgV(GEN x, long N) -- GEN RgXX_to_RgM(GEN v, long n) -- GEN RgXY_swap(GEN x, long n, long w) ++ + GEN qfauto(GEN g, GEN flags) + GEN qfauto0(GEN g, GEN flags) + GEN qfautoexport(GEN g, long flag) @@ -4546,7 +4533,7 @@ index 41a8e1a..baa03d5 100644 # subfield.c -@@ -1792,7 +3546,7 @@ cdef extern from 'pari/pari.h': +@@ -1793,7 +3548,7 @@ cdef extern from 'pari/pari.h': # subgroup.c GEN subgrouplist(GEN cyc, GEN bound) @@ -4555,7 +4542,7 @@ index 41a8e1a..baa03d5 100644 # stark.c -@@ -1802,23 +3556,34 @@ cdef extern from 'pari/pari.h': +@@ -1803,23 +3558,34 @@ cdef extern from 'pari/pari.h': # sumiter.c @@ -4602,7 +4589,7 @@ index 41a8e1a..baa03d5 100644 GEN thue(GEN thueres, GEN rhs, GEN ne) GEN thueinit(GEN pol, long flag, long prec) -@@ -1827,14 +3592,26 @@ cdef extern from 'pari/pari.h': +@@ -1828,14 +3594,26 @@ cdef extern from 'pari/pari.h': GEN Pi2n(long n, long prec) GEN PiI2(long prec) GEN PiI2n(long n, long prec) @@ -4632,7 +4619,7 @@ index 41a8e1a..baa03d5 100644 GEN glog(GEN x, long prec) GEN gpow(GEN x, GEN n, long prec) GEN gpowgs(GEN x, long n) -@@ -1843,72 +3620,100 @@ cdef extern from 'pari/pari.h': +@@ -1844,72 +3622,100 @@ cdef extern from 'pari/pari.h': GEN gsqrt(GEN x, long prec) GEN gsqrtn(GEN x, GEN n, GEN *zetan, long prec) GEN gtan(GEN x, long prec) @@ -4748,7 +4735,7 @@ index 41a8e1a..baa03d5 100644 # gmp/int.h long* int_MSW(GEN x) -@@ -1916,8 +3721,15 @@ cdef extern from 'pari/pari.h': +@@ -1917,8 +3723,15 @@ cdef extern from 'pari/pari.h': long* int_precW(long * xp) long* int_nextW(long * xp) @@ -4766,7 +4753,7 @@ index 41a8e1a..baa03d5 100644 cdef extern from 'stdsage.h': GEN set_gel(GEN x, long n, GEN z) # gel(x,n) = z -@@ -1929,15 +3741,6 @@ cdef extern from 'stdsage.h': +@@ -1930,15 +3743,6 @@ cdef extern from 'stdsage.h': include 'declinl.pxi' @@ -4782,10 +4769,26 @@ index 41a8e1a..baa03d5 100644 cdef extern from 'pari/paripriv.h': int gpd_QUIET, gpd_TEST, gpd_EMACS, gpd_TEXMACS -diff --git a/src/sage/libs/pari/gen.pyx b/src/sage/libs/pari/gen.pyx -index 71b3f14..981bd1f 100644 ---- a/src/sage/libs/pari/gen.pyx -+++ b/src/sage/libs/pari/gen.pyx +diff -up src/sage/libs/pari/gen_py.py.orig src/sage/libs/pari/gen_py.py +--- src/sage/libs/pari/gen_py.py.orig 2014-08-13 11:16:54.345162303 -0300 ++++ src/sage/libs/pari/gen_py.py 2014-08-13 11:16:57.560162426 -0300 +@@ -73,11 +73,11 @@ def pari(x): + + sage: K. = NumberField(x^3 - 2) + sage: pari(K) +- [y^3 - 2, [1, 1], -108, 1, [[1, 1.25992104989487, 1.58740105196820; 1, -0.629960524947437 - 1.09112363597172*I, -0.793700525984100 + 1.37472963699860*I], [1, 1.25992104989487, 1.58740105196820; 1, -1.72108416091916, 0.581029111014503; 1, 0.461163111024285, -2.16843016298270], [1, 1, 2; 1, -2, 1; 1, 0, -2], [3, 0, 0; 0, 0, 6; 0, 6, 0], [6, 0, 0; 0, 6, 0; 0, 0, 3], [2, 0, 0; 0, 0, 1; 0, 1, 0], [2, [0, 0, 2; 1, 0, 0; 0, 1, 0]]], [1.25992104989487, -0.629960524947437 - 1.09112363597172*I], [1, y, y^2], [1, 0, 0; 0, 1, 0; 0, 0, 1], [1, 0, 0, 0, 0, 2, 0, 2, 0; 0, 1, 0, 1, 0, 0, 0, 0, 2; 0, 0, 1, 0, 1, 0, 1, 0, 0]] ++ [y^3 - 2, [1, 1], -108, 1, [[1, 1.25992104989487, 1.58740105196820; 1, -0.629960524947437 + 1.09112363597172*I, -0.793700525984100 - 1.37472963699860*I], [1, 1.25992104989487, 1.58740105196820; 1, 0.461163111024285, -2.16843016298270; 1, -1.72108416091916, 0.581029111014503], [1, 1, 2; 1, 0, -2; 1, -2, 1], [3, 0, 0; 0, 0, 6; 0, 6, 0], [6, 0, 0; 0, 6, 0; 0, 0, 3], [2, 0, 0; 0, 0, 1; 0, 1, 0], [2, [0, 0, 2; 1, 0, 0; 0, 1, 0]], []], [1.25992104989487, -0.629960524947437 + 1.09112363597172*I], [1, y, y^2], [1, 0, 0; 0, 1, 0; 0, 0, 1], [1, 0, 0, 0, 0, 2, 0, 2, 0; 0, 1, 0, 1, 0, 0, 0, 0, 2; 0, 0, 1, 0, 1, 0, 1, 0, 0]] + + sage: E = EllipticCurve('37a1') + sage: pari(E) +- [0, 0, 1, -1, 0, 0, -2, 1, -1, 48, -216, 37, 110592/37, [0.837565435283323, 0.269594436405445, -1.10715987168877]~, 2.99345864623196, -2.45138938198679*I, 0.942638555913623, 1.32703057887968*I, 7.33813274078958] ++ [0, 0, 1, -1, 0, 0, -2, 1, -1, 48, -216, 37, 110592/37, Vecsmall([1]), [Vecsmall([64, 1])], [0, 0, 0, 0, 0, 0, 0, 0]] + + Conversion from basic Python types:: + +diff -up src/sage/libs/pari/gen.pyx.orig src/sage/libs/pari/gen.pyx +--- src/sage/libs/pari/gen.pyx.orig 2014-08-13 11:16:54.347162303 -0300 ++++ src/sage/libs/pari/gen.pyx 2014-08-13 11:16:57.562162426 -0300 @@ -23,6 +23,8 @@ AUTHORS: - Peter Bruin (2013-11-17): move PariInstance to a separate file (#15185) @@ -4795,7 +4798,7 @@ index 71b3f14..981bd1f 100644 """ #***************************************************************************** -@@ -332,7 +334,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -332,7 +334,7 @@ cdef class gen(sage.structure.element.Ri sage: K.getattr("reg") Traceback (most recent call last): ... @@ -4804,7 +4807,7 @@ index 71b3f14..981bd1f 100644 sage: K.getattr("zzz") Traceback (most recent call last): ... -@@ -385,14 +387,15 @@ cdef class gen(sage.structure.element.RingElement): +@@ -385,14 +387,15 @@ cdef class gen(sage.structure.element.Ri sage: bnr.nf_get_pol() x^4 - 4*x^2 + 1 @@ -4825,7 +4828,7 @@ index 71b3f14..981bd1f 100644 TESTS:: -@@ -408,7 +411,8 @@ cdef class gen(sage.structure.element.RingElement): +@@ -408,7 +411,8 @@ cdef class gen(sage.structure.element.Ri sage: pari("[0]").nf_get_pol() Traceback (most recent call last): ... @@ -4835,7 +4838,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(member_pol(self.g)) -@@ -555,7 +559,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -555,7 +559,7 @@ cdef class gen(sage.structure.element.Ri sage: K. = QuadraticField(-1) sage: F = pari(K).idealfactor(K.ideal(5)); F @@ -4844,7 +4847,7 @@ index 71b3f14..981bd1f 100644 sage: F[0,0].pr_get_p() 5 """ -@@ -1152,9 +1156,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -1152,9 +1156,11 @@ cdef class gen(sage.structure.element.Ri -36bb1e3929d1a8fe2802f083 """ cdef GEN x @@ -4858,7 +4861,7 @@ index 71b3f14..981bd1f 100644 cdef char *hexdigits hexdigits = "0123456789abcdef" cdef int i, j -@@ -1379,7 +1385,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -1379,7 +1385,7 @@ cdef class gen(sage.structure.element.Ri sage: complex(g) Traceback (most recent call last): ... @@ -4867,7 +4870,7 @@ index 71b3f14..981bd1f 100644 """ cdef double re, im pari_catch_sig_on() -@@ -1735,7 +1741,9 @@ cdef class gen(sage.structure.element.RingElement): +@@ -1735,7 +1741,9 @@ cdef class gen(sage.structure.element.Ri moebius(x): Moebius function of x. """ pari_catch_sig_on() @@ -4878,7 +4881,7 @@ index 71b3f14..981bd1f 100644 def sign(gen x): """ -@@ -1757,7 +1765,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -1757,7 +1765,7 @@ cdef class gen(sage.structure.element.Ri sage: pari(I).sign() Traceback (most recent call last): ... @@ -4887,7 +4890,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() -@@ -2055,7 +2063,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2055,7 +2063,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('x+y').Pol('y') Traceback (most recent call last): ... @@ -4896,7 +4899,7 @@ index 71b3f14..981bd1f 100644 INPUT: -@@ -2174,7 +2182,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2174,7 +2182,7 @@ cdef class gen(sage.structure.element.Ri sage: pari(3).Qfb(7, 2) # discriminant is 25 Traceback (most recent call last): ... @@ -4905,7 +4908,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(b) cdef gen t1 = objtogen(c) -@@ -2281,17 +2289,17 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2281,17 +2289,17 @@ cdef class gen(sage.structure.element.Ri EXAMPLES:: sage: pari([1,5,2]).Set() @@ -4928,7 +4931,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(gtoset(x.g)) -@@ -2557,9 +2565,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2557,9 +2565,7 @@ cdef class gen(sage.structure.element.Ri sage: pari(1234).Vecsmall() Vecsmall([1234]) sage: pari('x^2 + 2*x + 3').Vecsmall() @@ -4939,7 +4942,7 @@ index 71b3f14..981bd1f 100644 We demonstate the `n` argument:: -@@ -2595,7 +2601,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2595,7 +2601,7 @@ cdef class gen(sage.structure.element.Ri EXAMPLES:: sage: pari(0).binary() @@ -4948,7 +4951,7 @@ index 71b3f14..981bd1f 100644 sage: pari(-5).binary() [1, 0, 1] sage: pari(5).binary() -@@ -2967,7 +2973,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2967,7 +2973,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('x').component(0) Traceback (most recent call last): ... @@ -4957,7 +4960,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(compo(x.g, n)) -@@ -2999,7 +3005,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -2999,7 +3005,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('Mod(x,x^3-3)').conj() Traceback (most recent call last): ... @@ -4966,7 +4969,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(gconj(x.g)) -@@ -3023,7 +3029,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3023,7 +3029,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('Mod(1+x,x^2-2)').conjvec() [-0.414213562373095, 2.41421356237310]~ sage: pari('Mod(x,x^3-3)').conjvec() @@ -4975,7 +4978,7 @@ index 71b3f14..981bd1f 100644 sage: pari('Mod(1+x,x^2-2)').conjvec(precision=192)[0].sage() -0.414213562373095048801688724209698078569671875376948073177 """ -@@ -3098,7 +3104,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3098,7 +3104,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('"hello world"').floor() Traceback (most recent call last): ... @@ -4984,7 +4987,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(gfloor(x.g)) -@@ -3124,7 +3130,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3124,7 +3130,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('sqrt(-2)').frac() Traceback (most recent call last): ... @@ -4993,7 +4996,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(gfrac(x.g)) -@@ -3281,7 +3287,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3281,7 +3287,7 @@ cdef class gen(sage.structure.element.Ri sage: y.padicprec(17) Traceback (most recent call last): ... @@ -5002,7 +5005,7 @@ index 71b3f14..981bd1f 100644 This works for polynomials too:: -@@ -3740,7 +3746,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3740,7 +3746,7 @@ cdef class gen(sage.structure.element.Ri """ cdef gen t0 = objtogen(p) pari_catch_sig_on() @@ -5011,7 +5014,7 @@ index 71b3f14..981bd1f 100644 pari_catch_sig_off() return v -@@ -3881,7 +3887,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3881,7 +3887,7 @@ cdef class gen(sage.structure.element.Ri 0.881373587019543 + 1.57079632679490*I """ pari_catch_sig_on() @@ -5020,7 +5023,7 @@ index 71b3f14..981bd1f 100644 def agm(gen x, y, unsigned long precision=0): r""" -@@ -3972,7 +3978,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -3972,7 +3978,7 @@ cdef class gen(sage.structure.element.Ri 1.52857091948100 + 0.427078586392476*I """ pari_catch_sig_on() @@ -5029,7 +5032,7 @@ index 71b3f14..981bd1f 100644 def atan(gen x, unsigned long precision=0): r""" -@@ -4015,7 +4021,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4015,7 +4021,7 @@ cdef class gen(sage.structure.element.Ri 0.549306144334055 - 1.57079632679490*I """ pari_catch_sig_on() @@ -5038,7 +5041,7 @@ index 71b3f14..981bd1f 100644 def bernfrac(gen x): r""" -@@ -4064,10 +4070,14 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4064,10 +4070,14 @@ cdef class gen(sage.structure.element.Ri EXAMPLES:: sage: pari(8).bernvec() @@ -5053,7 +5056,7 @@ index 71b3f14..981bd1f 100644 pari_catch_sig_on() return P.new_gen(bernvec(x)) -@@ -4152,8 +4162,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4152,8 +4162,7 @@ cdef class gen(sage.structure.element.Ri EXAMPLES:: sage: pari(2).besseljh(3) @@ -5063,7 +5066,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(x) pari_catch_sig_on() -@@ -4291,7 +4300,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4291,7 +4300,7 @@ cdef class gen(sage.structure.element.Ri 1 + 1/2*x^2 + 1/24*x^4 + 1/720*x^6 + O(x^8) """ pari_catch_sig_on() @@ -5072,7 +5075,7 @@ index 71b3f14..981bd1f 100644 def cotan(gen x, unsigned long precision=0): """ -@@ -4470,7 +4479,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4470,7 +4479,7 @@ cdef class gen(sage.structure.element.Ri sage: pari(-1).gamma() Traceback (most recent call last): ... @@ -5081,7 +5084,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(ggamma(s.g, prec_bits_to_words(precision))) -@@ -4495,7 +4504,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4495,7 +4504,7 @@ cdef class gen(sage.structure.element.Ri 0.575315188063452 + 0.0882106775440939*I """ pari_catch_sig_on() @@ -5090,7 +5093,7 @@ index 71b3f14..981bd1f 100644 def hyperu(gen a, b, x, unsigned long precision=0): r""" -@@ -4614,19 +4623,13 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4614,19 +4623,13 @@ cdef class gen(sage.structure.element.Ri def lngamma(gen x, unsigned long precision=0): r""" @@ -5111,7 +5114,7 @@ index 71b3f14..981bd1f 100644 return x.log_gamma(precision) def log_gamma(gen x, unsigned long precision=0): -@@ -4741,7 +4744,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4741,7 +4744,7 @@ cdef class gen(sage.structure.element.Ri 0.634963914784736 + 1.29845758141598*I """ pari_catch_sig_on() @@ -5120,7 +5123,7 @@ index 71b3f14..981bd1f 100644 def sqr(gen x): """ -@@ -4834,11 +4837,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4849,11 +4852,11 @@ cdef class gen(sage.structure.element.Ri sage: s^5 2.00000000000000 sage: z^5 @@ -5136,7 +5139,7 @@ index 71b3f14..981bd1f 100644 """ # TODO: ??? lots of good examples in the PARI docs ??? cdef GEN zetan -@@ -4890,7 +4893,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4905,7 +4908,7 @@ cdef class gen(sage.structure.element.Ri 1.55740772465490 """ pari_catch_sig_on() @@ -5145,7 +5148,7 @@ index 71b3f14..981bd1f 100644 def teichmuller(gen x): r""" -@@ -4964,8 +4967,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -4979,8 +4982,7 @@ cdef class gen(sage.structure.element.Ri sage: C. = ComplexField() sage: pari(i).weber() @@ -5155,7 +5158,7 @@ index 71b3f14..981bd1f 100644 sage: pari(i).weber(1) 1.09050773266526 sage: pari(i).weber(2) -@@ -5246,17 +5248,19 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5261,17 +5263,19 @@ cdef class gen(sage.structure.element.Ri 4 """ pari_catch_sig_on() @@ -5178,7 +5181,7 @@ index 71b3f14..981bd1f 100644 def primepi(gen self): """ -@@ -5390,11 +5394,9 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5405,11 +5409,9 @@ cdef class gen(sage.structure.element.Ri INPUT: @@ -5192,7 +5195,7 @@ index 71b3f14..981bd1f 100644 - ``precision (optional, default: 0)`` - the real precision to be used in the computation of the components of the -@@ -5412,80 +5414,62 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5427,80 +5429,62 @@ cdef class gen(sage.structure.element.Ri OUTPUT: @@ -5240,6 +5243,7 @@ index 71b3f14..981bd1f 100644 - [0, I, 0, 1, 0, 4*I, 2, 0, -1, -64, 352*I, -80, 16384/5] - sage: pari([0,x,0,2*x,1]).ellinit(flag=1) - [0, x, 0, 2*x, 1, 4*x, 4*x, 4, -4*x^2 + 4*x, 16*x^2 - 96*x, -64*x^3 + 576*x^2 - 864, 64*x^4 - 576*x^3 + 576*x^2 - 432, (256*x^6 - 4608*x^5 + 27648*x^4 - 55296*x^3)/(4*x^4 - 36*x^3 + 36*x^2 - 27)] +- """ + sage: pari([0,1/2,0,-3/4,0]).ellinit() + [0, 1/2, 0, -3/4, 0, 2, -3/2, 0, -9/16, 40, -116, 117/4, 256000/117, Vecsmall([1]), [Vecsmall([64, 1])], [0, 0, 0, 0, 0, 0, 0, 0]] + sage: pari([0,0.5,0,-0.75,0]).ellinit() @@ -5248,7 +5252,7 @@ index 71b3f14..981bd1f 100644 + [0, I, 0, 1, 0, 4*I, 2, 0, -1, -64, 352*I, -80, 16384/5, Vecsmall([0]), [Vecsmall([64, 0])], [0, 0, 0, 0]] + sage: pari([0,x,0,2*x,1]).ellinit() + [0, x, 0, 2*x, 1, 4*x, 4*x, 4, -4*x^2 + 4*x, 16*x^2 - 96*x, -64*x^3 + 576*x^2 - 864, 64*x^4 - 576*x^3 + 576*x^2 - 432, (256*x^6 - 4608*x^5 + 27648*x^4 - 55296*x^3)/(4*x^4 - 36*x^3 + 36*x^2 - 27), Vecsmall([0]), [Vecsmall([64, 0])], [0, 0, 0, 0]] - """ ++ """ + if flag: + from sage.misc.superseded import deprecation + deprecation(15767, 'The flag argument to ellinit() is deprecated and not used anymore') @@ -5302,7 +5306,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(ellglobalred(self.g)) -@@ -5507,11 +5491,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5522,11 +5506,11 @@ cdef class gen(sage.structure.element.Ri OUTPUT: point on E @@ -5317,7 +5321,7 @@ index 71b3f14..981bd1f 100644 Next we add two points on the elliptic curve. Notice that the Python lists are automatically converted to PARI objects so you -@@ -5525,7 +5509,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5540,7 +5524,7 @@ cdef class gen(sage.structure.element.Ri cdef gen t0 = objtogen(z0) cdef gen t1 = objtogen(z1) pari_catch_sig_on() @@ -5326,7 +5330,7 @@ index 71b3f14..981bd1f 100644 def ellak(self, n): r""" -@@ -5767,18 +5751,16 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5782,18 +5766,16 @@ cdef class gen(sage.structure.element.Ri INPUT: @@ -5346,7 +5350,7 @@ index 71b3f14..981bd1f 100644 sage: f = e.ellchangecurve([1,-1,0,-1]) sage: f[:5] [1, -1, 0, 4, 3] -@@ -5804,10 +5786,6 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5819,10 +5801,6 @@ cdef class gen(sage.structure.element.Ri 6.28318530717959*I sage: w1*eta2-w2*eta1 == pari(2*pi*I) True @@ -5357,7 +5361,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(elleta(self.g, prec_bits_to_words(precision))) -@@ -5850,7 +5828,8 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5865,7 +5843,8 @@ cdef class gen(sage.structure.element.Ri sage: e.ellheight([1,0], flag=1) 0.476711659343740 sage: e.ellheight([1,0], precision=128).sage() @@ -5367,7 +5371,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(a) pari_catch_sig_on() -@@ -5879,13 +5858,6 @@ cdef class gen(sage.structure.element.RingElement): +@@ -5894,13 +5873,6 @@ cdef class gen(sage.structure.element.Ri sage: e = pari([0,1,1,-2,0]).ellinit().ellminimalmodel()[0] sage: e.ellheightmatrix([[1,0], [-1,1]]) [0.476711659343740, 0.418188984498861; 0.418188984498861, 0.686667083305587] @@ -5381,7 +5385,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(x) pari_catch_sig_on() -@@ -6100,9 +6072,9 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6115,9 +6087,9 @@ cdef class gen(sage.structure.element.Ri sage: e.elllseries(2.1) 0.402838047956645 sage: e.elllseries(1, precision=128) @@ -5393,7 +5397,7 @@ index 71b3f14..981bd1f 100644 sage: e.elllseries(-2) 0 sage: e.elllseries(2.1, A=1.1) -@@ -6217,8 +6189,6 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6232,8 +6204,6 @@ cdef class gen(sage.structure.element.Ri [] sage: e.ellordinate(5.0) [11.3427192823270, -12.3427192823270] @@ -5402,7 +5406,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(x) pari_catch_sig_on() -@@ -6311,26 +6281,19 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6326,26 +6296,19 @@ cdef class gen(sage.structure.element.Ri cdef gen t0 = objtogen(z) cdef gen t1 = objtogen(n) pari_catch_sig_on() @@ -5435,7 +5439,7 @@ index 71b3f14..981bd1f 100644 OUTPUT: 1 or -1 -@@ -6344,9 +6307,19 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6359,9 +6322,19 @@ cdef class gen(sage.structure.element.Ri sage: e.ellrootno(1009) 1 """ @@ -5457,7 +5461,7 @@ index 71b3f14..981bd1f 100644 pari_catch_sig_off() return rootno -@@ -6392,11 +6365,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6407,11 +6380,11 @@ cdef class gen(sage.structure.element.Ri cdef gen t0 = objtogen(z0) cdef gen t1 = objtogen(z1) pari_catch_sig_on() @@ -5472,7 +5476,7 @@ index 71b3f14..981bd1f 100644 def elltors(self, long flag=0): """ -@@ -6438,7 +6411,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6453,7 +6426,7 @@ cdef class gen(sage.structure.element.Ri sage: e = pari([1,0,1,-19,26]).ellinit() sage: e.elltors() @@ -5481,7 +5485,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(elltors0(self.g, flag)) -@@ -6467,8 +6440,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6482,8 +6455,7 @@ cdef class gen(sage.structure.element.Ri sage: e = pari([0,0,0,1,0]).ellinit() sage: e.ellzeta(1) @@ -5491,7 +5495,7 @@ index 71b3f14..981bd1f 100644 sage: C. = ComplexField() sage: e.ellzeta(i-1) -0.350122658523049 - 0.350122658523049*I -@@ -6498,8 +6470,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6513,8 +6485,7 @@ cdef class gen(sage.structure.element.Ri sage: e = pari([0,0,0,1,0]).ellinit() sage: C. = ComplexField() sage: e.ellztopoint(1+i) @@ -5501,7 +5505,7 @@ index 71b3f14..981bd1f 100644 Complex numbers belonging to the period lattice of e are of course sent to the point at infinity on e:: -@@ -6511,7 +6482,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6526,7 +6497,7 @@ cdef class gen(sage.structure.element.Ri pari_catch_sig_on() return P.new_gen(pointell(self.g, t0.g, prec_bits_to_words(precision))) @@ -5510,7 +5514,7 @@ index 71b3f14..981bd1f 100644 """ e.omega(): return basis for the period lattice of the elliptic curve e. -@@ -6520,9 +6491,10 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6535,9 +6506,10 @@ cdef class gen(sage.structure.element.Ri sage: e = pari([0, -1, 1, -10, -20]).ellinit() sage: e.omega() @@ -5523,7 +5527,7 @@ index 71b3f14..981bd1f 100644 def disc(self): """ -@@ -6536,7 +6508,8 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6551,7 +6523,8 @@ cdef class gen(sage.structure.element.Ri sage: _.factor() [-1, 1; 11, 5] """ @@ -5533,7 +5537,7 @@ index 71b3f14..981bd1f 100644 def j(self): """ -@@ -6550,7 +6523,8 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6565,7 +6538,8 @@ cdef class gen(sage.structure.element.Ri sage: _.factor() [-1, 1; 2, 12; 11, -5; 31, 3] """ @@ -5543,7 +5547,7 @@ index 71b3f14..981bd1f 100644 def ellj(self, unsigned long precision=0): """ -@@ -6569,7 +6543,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6584,7 +6558,7 @@ cdef class gen(sage.structure.element.Ri sage: pari(-I).ellj() Traceback (most recent call last): ... @@ -5552,7 +5556,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(jell(self.g, prec_bits_to_words(precision))) -@@ -6867,7 +6841,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6882,7 +6856,7 @@ cdef class gen(sage.structure.element.Ri sage: K. = QuadraticField(-1) sage: F = pari(K).idealprimedec(5); F @@ -5561,7 +5565,7 @@ index 71b3f14..981bd1f 100644 sage: F[0].pr_get_p() 5 """ -@@ -6909,7 +6883,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6924,7 +6898,7 @@ cdef class gen(sage.structure.element.Ri sage: nf = F._pari_() sage: I = pari('[1, -1, 2]~') sage: nf.idealstar(I) @@ -5570,7 +5574,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(I) pari_catch_sig_on() -@@ -6953,18 +6927,30 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6968,18 +6942,30 @@ cdef class gen(sage.structure.element.Ri def nfbasis(self, long flag=0, fa=None): """ @@ -5581,7 +5585,14 @@ index 71b3f14..981bd1f 100644 - Binary digits of ``flag`` mean: + INPUT: -+ + +- - 1: assume that no square of a prime>primelimit divides the +- discriminant of ``x``. +- - 2: use round 2 algorithm instead of round 4. +- +- If present, ``fa`` provides the matrix of a partial factorization of +- the discriminant of ``x``, useful if one wants only an order maximal at +- certain primes only. + - ``flag``: if set to 1 and ``fa`` is not given: assume that no + square of a prime > 500000 divides the discriminant of ``x``. + @@ -5591,26 +5602,20 @@ index 71b3f14..981bd1f 100644 + + - an integer: check all primes up to ``fa`` using trial + division. - -- - 1: assume that no square of a prime>primelimit divides the -- discriminant of ``x``. -- - 2: use round 2 algorithm instead of round 4. ++ + - a vector: a list of primes to check. + + - a matrix: a partial factorization of the discriminant + of ``x``. + + .. NOTE:: - -- If present, ``fa`` provides the matrix of a partial factorization of -- the discriminant of ``x``, useful if one wants only an order maximal at -- certain primes only. ++ + In earlier versions of Sage, other bits in ``flag`` were + defined but these are now simply ignored. EXAMPLES:: -@@ -6981,29 +6967,34 @@ cdef class gen(sage.structure.element.RingElement): +@@ -6996,29 +6982,34 @@ cdef class gen(sage.structure.element.Ri [1, x] sage: pari(f).nfbasis() # Correct result [1, 1/10000000019*x] @@ -5661,7 +5666,7 @@ index 71b3f14..981bd1f 100644 EXAMPLES:: -@@ -7022,15 +7013,23 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7037,15 +7028,23 @@ cdef class gen(sage.structure.element.Ri sage: pari([-2,0,0,1]).Polrev().nfbasis_d() ([1, x, x^2], -108) """ @@ -5691,7 +5696,7 @@ index 71b3f14..981bd1f 100644 D = P.new_gen(disc) return B, D -@@ -7247,18 +7246,13 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7262,18 +7261,13 @@ cdef class gen(sage.structure.element.Ri sage: A = matrix(F,[[1,2,a,3],[3,0,a+2,0],[0,0,a,2],[3+a,a,0,1]]) sage: I = [F.ideal(-2*a+1),F.ideal(7), F.ideal(3),F.ideal(1)] sage: Fp.nfhnf([pari(A),[pari(P) for P in I]]) @@ -5712,7 +5717,7 @@ index 71b3f14..981bd1f 100644 An example where the ring of integers of the number field is not a PID:: -@@ -7267,15 +7261,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7282,15 +7276,11 @@ cdef class gen(sage.structure.element.Ri sage: A = matrix(K,[[1,0,0,5*b],[1,2*b^2,b,57],[0,2,1,b^2-3],[2,0,0,b]]) sage: I = [K.ideal(2),K.ideal(3+b^2),K.ideal(1),K.ideal(1)] sage: Kp.nfhnf([pari(A),[pari(P) for P in I]]) @@ -5730,7 +5735,7 @@ index 71b3f14..981bd1f 100644 AUTHORS: -@@ -7302,41 +7292,19 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7317,41 +7307,19 @@ cdef class gen(sage.structure.element.Ri EXAMPLES:: sage: pari('x^3 - 17').nfinit() @@ -5777,7 +5782,7 @@ index 71b3f14..981bd1f 100644 def nfisisom(self, gen other): """ -@@ -7389,7 +7357,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7404,7 +7372,7 @@ cdef class gen(sage.structure.element.Ri sage: nf = pari('x^2 + 1').nfinit() sage: nf.nfrootsof1() @@ -5786,7 +5791,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() return P.new_gen(rootsof1(self.g)) -@@ -7427,12 +7395,12 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7442,12 +7410,12 @@ cdef class gen(sage.structure.element.Ri def rnfeltabstorel(self, x): cdef gen t0 = objtogen(x) pari_catch_sig_on() @@ -5801,7 +5806,7 @@ index 71b3f14..981bd1f 100644 def rnfequation(self, poly, long flag=0): cdef gen t0 = objtogen(poly) -@@ -7460,10 +7428,10 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7475,10 +7443,10 @@ cdef class gen(sage.structure.element.Ri sage: P = pari('[[[1, 0]~, [0, 0]~; [0, 0]~, [1, 0]~], [[2, 0; 0, 2], [2, 0; 0, 1/2]]]') @@ -5814,7 +5819,7 @@ index 71b3f14..981bd1f 100644 """ cdef gen t0 = objtogen(x) pari_catch_sig_on() -@@ -7472,7 +7440,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7487,7 +7455,7 @@ cdef class gen(sage.structure.element.Ri def rnfidealhnf(self, x): cdef gen t0 = objtogen(x) pari_catch_sig_on() @@ -5823,7 +5828,7 @@ index 71b3f14..981bd1f 100644 def rnfidealnormrel(self, x): cdef gen t0 = objtogen(x) -@@ -7523,11 +7491,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7538,11 +7506,11 @@ cdef class gen(sage.structure.element.Ri sage: pari(-23).quadhilbert() x^3 - x^2 + 1 sage: pari(145).quadhilbert() @@ -5837,7 +5842,7 @@ index 71b3f14..981bd1f 100644 """ pari_catch_sig_on() # Precision argument is only used for real quadratic extensions -@@ -7612,7 +7580,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7627,7 +7595,7 @@ cdef class gen(sage.structure.element.Ri sage: pari('1/x').eval(0) Traceback (most recent call last): ... @@ -5846,7 +5851,7 @@ index 71b3f14..981bd1f 100644 sage: pari('1/x + O(x^2)').eval(0) Traceback (most recent call last): ... -@@ -7620,11 +7588,11 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7635,11 +7603,11 @@ cdef class gen(sage.structure.element.Ri sage: pari('1/x + O(x^2)').eval(pari('O(x^3)')) Traceback (most recent call last): ... @@ -5860,7 +5865,7 @@ index 71b3f14..981bd1f 100644 Evaluating multivariate polynomials:: -@@ -7690,9 +7658,9 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7705,9 +7673,9 @@ cdef class gen(sage.structure.element.Ri sage: K. = NumberField(x^2 + 1) sage: nf = K._pari_() sage: nf @@ -5872,7 +5877,7 @@ index 71b3f14..981bd1f 100644 """ cdef long t = typ(self.g) cdef gen t0 -@@ -7786,7 +7754,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -7801,7 +7769,7 @@ cdef class gen(sage.structure.element.Ri sage: T(0) Traceback (most recent call last): ... @@ -5881,7 +5886,7 @@ index 71b3f14..981bd1f 100644 sage: pari('() -> 42')(1,2,3) Traceback (most recent call last): ... -@@ -8012,7 +7980,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8027,7 +7995,7 @@ cdef class gen(sage.structure.element.Ri non-constant polynomial, or False if f is reducible or constant. """ pari_catch_sig_on() @@ -5890,7 +5895,7 @@ index 71b3f14..981bd1f 100644 P.clear_stack() return t != 0 -@@ -8055,12 +8023,14 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8070,12 +8038,14 @@ cdef class gen(sage.structure.element.Ri def polroots(self, long flag=0, unsigned long precision=0): """ @@ -5909,7 +5914,7 @@ index 71b3f14..981bd1f 100644 def polrootsmod(self, p, long flag=0): cdef gen t0 = objtogen(p) -@@ -8128,7 +8098,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8143,7 +8113,7 @@ cdef class gen(sage.structure.element.Ri x + O(x^4) """ pari_catch_sig_on() @@ -5918,7 +5923,7 @@ index 71b3f14..981bd1f 100644 def thueinit(self, long flag=0, unsigned long precision=0): pari_catch_sig_on() -@@ -8332,7 +8302,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8347,7 +8317,7 @@ cdef class gen(sage.structure.element.Ri [ [ -5 -10 -2 -7 3] [ 1 2 1 2 0] @@ -5927,7 +5932,7 @@ index 71b3f14..981bd1f 100644 ] """ -@@ -8354,14 +8324,31 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8369,14 +8339,31 @@ cdef class gen(sage.structure.element.Ri def qfrep(self, B, long flag=0): """ @@ -5964,7 +5969,7 @@ index 71b3f14..981bd1f 100644 def matsolve(self, B): """ -@@ -8745,9 +8732,9 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8760,9 +8747,9 @@ cdef class gen(sage.structure.element.Ri cdef gen t0 = objtogen(y) cdef gen t1 = objtogen(p) pari_catch_sig_on() @@ -5977,7 +5982,7 @@ index 71b3f14..981bd1f 100644 def chinese(self, y): cdef gen t0 = objtogen(y) -@@ -8786,7 +8773,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8801,7 +8788,7 @@ cdef class gen(sage.structure.element.Ri Mod(236736367459211723407, 473472734918423446802) """ pari_catch_sig_on() @@ -5986,7 +5991,7 @@ index 71b3f14..981bd1f 100644 def __abs__(self): return self.abs() -@@ -8814,8 +8801,8 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8829,8 +8816,8 @@ cdef class gen(sage.structure.element.Ri """ pari_catch_sig_on() if add_one: @@ -5997,7 +6002,7 @@ index 71b3f14..981bd1f 100644 def change_variable_name(self, var): """ -@@ -8957,12 +8944,12 @@ cdef class gen(sage.structure.element.RingElement): +@@ -8972,12 +8959,12 @@ cdef class gen(sage.structure.element.Ri pari_catch_sig_on() return P.new_gen(charpoly0(self.g, P.get_var(var), flag)) @@ -6013,7 +6018,7 @@ index 71b3f14..981bd1f 100644 def type(gen self): """ -@@ -9107,7 +9094,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -9122,7 +9109,7 @@ cdef class gen(sage.structure.element.Ri sage: om = e.omega() sage: om [2.49021256085506, -1.97173770155165*I] @@ -6022,7 +6027,7 @@ index 71b3f14..981bd1f 100644 10.0672605281120 sage: om.elleisnum(4) 112.000000000000 -@@ -9151,7 +9138,7 @@ cdef class gen(sage.structure.element.RingElement): +@@ -9166,7 +9153,7 @@ cdef class gen(sage.structure.element.Ri Compute P(1):: sage: E.ellwp(1) @@ -6031,7 +6036,7 @@ index 71b3f14..981bd1f 100644 Compute P(1+i), where i = sqrt(-1):: -@@ -9180,11 +9167,18 @@ cdef class gen(sage.structure.element.RingElement): +@@ -9195,11 +9182,18 @@ cdef class gen(sage.structure.element.Ri With flag=1, compute the pair P(z) and P'(z):: sage: E.ellwp(1, flag=1) @@ -6052,7 +6057,7 @@ index 71b3f14..981bd1f 100644 def ellchangepoint(self, y): """ -@@ -9368,7 +9362,7 @@ class PariError(RuntimeError): +@@ -9383,7 +9377,7 @@ class PariError(RuntimeError): ....: pari('1/0') ....: except PariError as err: ....: print err.errnum() @@ -6061,7 +6066,7 @@ index 71b3f14..981bd1f 100644 """ return self.args[0] -@@ -9414,7 +9408,7 @@ class PariError(RuntimeError): +@@ -9429,7 +9423,7 @@ class PariError(RuntimeError): ....: pari('1/0') ....: except PariError as err: ....: print err @@ -6070,7 +6075,7 @@ index 71b3f14..981bd1f 100644 A syntax error:: -@@ -9424,7 +9418,7 @@ class PariError(RuntimeError): +@@ -9439,7 +9433,7 @@ class PariError(RuntimeError): PariError: syntax error, unexpected $undefined: !@#$%^&*() """ lines = self.errtext().split('\n') @@ -6079,28 +6084,9 @@ index 71b3f14..981bd1f 100644 for line in lines: if "syntax error" in line: return line.lstrip(" *").rstrip(" .:") -diff --git a/src/sage/libs/pari/gen_py.py b/src/sage/libs/pari/gen_py.py -index 8ea4e5d..28f05f6 100644 ---- a/src/sage/libs/pari/gen_py.py -+++ b/src/sage/libs/pari/gen_py.py -@@ -73,11 +73,11 @@ def pari(x): - - sage: K. = NumberField(x^3 - 2) - sage: pari(K) -- [y^3 - 2, [1, 1], -108, 1, [[1, 1.25992104989487, 1.58740105196820; 1, -0.629960524947437 - 1.09112363597172*I, -0.793700525984100 + 1.37472963699860*I], [1, 1.25992104989487, 1.58740105196820; 1, -1.72108416091916, 0.581029111014503; 1, 0.461163111024285, -2.16843016298270], [1, 1, 2; 1, -2, 1; 1, 0, -2], [3, 0, 0; 0, 0, 6; 0, 6, 0], [6, 0, 0; 0, 6, 0; 0, 0, 3], [2, 0, 0; 0, 0, 1; 0, 1, 0], [2, [0, 0, 2; 1, 0, 0; 0, 1, 0]]], [1.25992104989487, -0.629960524947437 - 1.09112363597172*I], [1, y, y^2], [1, 0, 0; 0, 1, 0; 0, 0, 1], [1, 0, 0, 0, 0, 2, 0, 2, 0; 0, 1, 0, 1, 0, 0, 0, 0, 2; 0, 0, 1, 0, 1, 0, 1, 0, 0]] -+ [y^3 - 2, [1, 1], -108, 1, [[1, 1.25992104989487, 1.58740105196820; 1, -0.629960524947437 + 1.09112363597172*I, -0.793700525984100 - 1.37472963699860*I], [1, 1.25992104989487, 1.58740105196820; 1, 0.461163111024285, -2.16843016298270; 1, -1.72108416091916, 0.581029111014503], [1, 1, 2; 1, 0, -2; 1, -2, 1], [3, 0, 0; 0, 0, 6; 0, 6, 0], [6, 0, 0; 0, 6, 0; 0, 0, 3], [2, 0, 0; 0, 0, 1; 0, 1, 0], [2, [0, 0, 2; 1, 0, 0; 0, 1, 0]], []], [1.25992104989487, -0.629960524947437 + 1.09112363597172*I], [1, y, y^2], [1, 0, 0; 0, 1, 0; 0, 0, 1], [1, 0, 0, 0, 0, 2, 0, 2, 0; 0, 1, 0, 1, 0, 0, 0, 0, 2; 0, 0, 1, 0, 1, 0, 1, 0, 0]] - - sage: E = EllipticCurve('37a1') - sage: pari(E) -- [0, 0, 1, -1, 0, 0, -2, 1, -1, 48, -216, 37, 110592/37, [0.837565435283323, 0.269594436405445, -1.10715987168877]~, 2.99345864623196, -2.45138938198679*I, 0.942638555913623, 1.32703057887968*I, 7.33813274078958] -+ [0, 0, 1, -1, 0, 0, -2, 1, -1, 48, -216, 37, 110592/37, Vecsmall([1]), [Vecsmall([64, 1])], [0, 0, 0, 0, 0, 0, 0, 0]] - - Conversion from basic Python types:: - -diff --git a/src/sage/libs/pari/handle_error.pyx b/src/sage/libs/pari/handle_error.pyx -index 81472fb..101028b 100644 ---- a/src/sage/libs/pari/handle_error.pyx -+++ b/src/sage/libs/pari/handle_error.pyx +diff -up src/sage/libs/pari/handle_error.pyx.orig src/sage/libs/pari/handle_error.pyx +--- src/sage/libs/pari/handle_error.pyx.orig 2014-08-13 11:16:54.349162303 -0300 ++++ src/sage/libs/pari/handle_error.pyx 2014-08-13 11:16:57.562162426 -0300 @@ -27,7 +27,7 @@ cdef void _pari_init_error_handling(): ....: except PariError as e: ....: print e.errtext() @@ -6110,7 +6096,7 @@ index 81472fb..101028b 100644 """ global pari_error_string -@@ -73,17 +73,17 @@ cdef int _pari_handle_exception(long err) except 0: +@@ -73,17 +73,17 @@ cdef int _pari_handle_exception(long err sage: pari(1)/pari(0) Traceback (most recent call last): ... @@ -6131,11 +6117,10 @@ index 81472fb..101028b 100644 raise RuntimeError("PARI user exception\n%s" % pari_error_string) else: from sage.libs.pari.all import PariError -diff --git a/src/sage/libs/pari/pari_instance.pxd b/src/sage/libs/pari/pari_instance.pxd -index a7242a0..95db20d 100644 ---- a/src/sage/libs/pari/pari_instance.pxd -+++ b/src/sage/libs/pari/pari_instance.pxd -@@ -9,6 +9,7 @@ cpdef long prec_bits_to_words(unsigned long prec_in_bits) +diff -up src/sage/libs/pari/pari_instance.pxd.orig src/sage/libs/pari/pari_instance.pxd +--- src/sage/libs/pari/pari_instance.pxd.orig 2014-08-13 11:16:54.351162303 -0300 ++++ src/sage/libs/pari/pari_instance.pxd 2014-08-13 11:16:57.562162426 -0300 +@@ -13,6 +13,7 @@ cpdef long prec_bits_to_words(unsigned l @cython.final cdef class PariInstance(sage.structure.parent_base.ParentWithBase): @@ -6143,10 +6128,9 @@ index a7242a0..95db20d 100644 cdef gen PARI_ZERO, PARI_ONE, PARI_TWO cdef inline gen new_gen(self, GEN x) cdef inline gen new_gen_noclear(self, GEN x) -diff --git a/src/sage/libs/pari/pari_instance.pyx b/src/sage/libs/pari/pari_instance.pyx -index 7991a62..21e3b36 100644 ---- a/src/sage/libs/pari/pari_instance.pyx -+++ b/src/sage/libs/pari/pari_instance.pyx +diff -up src/sage/libs/pari/pari_instance.pyx.orig src/sage/libs/pari/pari_instance.pyx +--- src/sage/libs/pari/pari_instance.pyx.orig 2014-08-13 11:16:54.353162303 -0300 ++++ src/sage/libs/pari/pari_instance.pyx 2014-08-13 11:16:57.563162426 -0300 @@ -20,6 +20,8 @@ AUTHORS: - Peter Bruin (2013-11-17): split off this file from gen.pyx (#15185) @@ -6156,7 +6140,7 @@ index 7991a62..21e3b36 100644 EXAMPLES:: -@@ -44,7 +46,7 @@ Arithmetic obeys the usual coercion rules:: +@@ -44,7 +46,7 @@ Arithmetic obeys the usual coercion rule GUIDE TO REAL PRECISION AND THE PARI LIBRARY @@ -6207,7 +6191,7 @@ index 7991a62..21e3b36 100644 # Callbacks from PARI to print stuff using sys.stdout.write() instead # of C library functions like puts(). cdef PariOUT sage_pariOut -@@ -432,7 +430,7 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -432,7 +430,7 @@ cdef class PariInstance(sage.structure.p if bot: return # pari already initialized. @@ -6216,7 +6200,7 @@ index 7991a62..21e3b36 100644 # The size here doesn't really matter, because we will allocate # our own stack anyway. We ask PARI not to set up signal and -@@ -445,8 +443,6 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -450,8 +448,6 @@ cdef class PariInstance(sage.structure.p # so we need to reset them. init_memory_functions() @@ -6225,7 +6209,7 @@ index 7991a62..21e3b36 100644 # Free the PARI stack and allocate our own (using Cython) pari_free(bot); bot = 0 init_stack(size) -@@ -465,6 +461,7 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -470,6 +466,7 @@ cdef class PariInstance(sage.structure.p pariErr.flush = sage_pariErr_flush # Display only 15 digits @@ -6233,7 +6217,7 @@ index 7991a62..21e3b36 100644 sd_format("g.15", d_SILENT) # Init global prec variable (PARI's precision is always a -@@ -585,11 +582,12 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -590,11 +587,12 @@ cdef class PariInstance(sage.structure.p sage: pari.set_real_precision(15) 60 """ @@ -6247,7 +6231,7 @@ index 7991a62..21e3b36 100644 return prev def get_real_precision(self): -@@ -608,10 +606,7 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -613,10 +611,7 @@ cdef class PariInstance(sage.structure.p sage: pari.get_real_precision() 15 """ @@ -6259,7 +6243,7 @@ index 7991a62..21e3b36 100644 def set_series_precision(self, long n): global precdl -@@ -1147,7 +1142,7 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1152,7 +1147,7 @@ cdef class PariInstance(sage.structure.p def pari_version(self): return str(PARIVERSION) @@ -6268,7 +6252,7 @@ index 7991a62..21e3b36 100644 """ Recompute the primes table including at least all primes up to M (but possibly more). -@@ -1156,29 +1151,22 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1161,29 +1156,22 @@ cdef class PariInstance(sage.structure.p sage: pari.init_primes(200000) @@ -6307,7 +6291,7 @@ index 7991a62..21e3b36 100644 ############################################## ## Support for GP Scripts -@@ -1221,19 +1209,18 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1226,19 +1214,18 @@ cdef class PariInstance(sage.structure.p def _primelimit(self): """ @@ -6333,7 +6317,7 @@ index 7991a62..21e3b36 100644 def prime_list(self, long n): """ -@@ -1302,8 +1289,6 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1307,8 +1294,6 @@ cdef class PariInstance(sage.structure.p """ nth_prime(n): returns the n-th prime, where n is a C-int """ @@ -6342,7 +6326,7 @@ index 7991a62..21e3b36 100644 if n <= 0: raise ValueError, "nth prime meaningless for non-positive n (=%s)"%n cdef GEN g -@@ -1311,15 +1296,15 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1316,15 +1301,15 @@ cdef class PariInstance(sage.structure.p g = prime(n) return self.new_gen(g) @@ -6360,7 +6344,7 @@ index 7991a62..21e3b36 100644 def euler(self, unsigned long precision=0): """ Return Euler's constant to the requested real precision (in bits). -@@ -1488,16 +1473,16 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1493,16 +1478,16 @@ cdef class PariInstance(sage.structure.p TESTS: @@ -6380,7 +6364,7 @@ index 7991a62..21e3b36 100644 """ cdef gen t0 = self(seed) pari_catch_sig_on() -@@ -1579,6 +1564,24 @@ cdef class PariInstance(sage.structure.parent_base.ParentWithBase): +@@ -1584,6 +1569,24 @@ cdef class PariInstance(sage.structure.p k = k + 1 return A @@ -6405,11 +6389,10 @@ index 7991a62..21e3b36 100644 cdef int init_stack(size_t requested_size) except -1: r""" -diff --git a/src/sage/matrix/matrix_rational_dense.pyx b/src/sage/matrix/matrix_rational_dense.pyx -index cd1ccda..781db98 100644 ---- a/src/sage/matrix/matrix_rational_dense.pyx -+++ b/src/sage/matrix/matrix_rational_dense.pyx -@@ -2617,7 +2617,7 @@ cdef class Matrix_rational_dense(matrix_dense.Matrix_dense): +diff -up src/sage/matrix/matrix_rational_dense.pyx.orig src/sage/matrix/matrix_rational_dense.pyx +--- src/sage/matrix/matrix_rational_dense.pyx.orig 2014-08-13 11:16:54.355162303 -0300 ++++ src/sage/matrix/matrix_rational_dense.pyx 2014-08-13 11:16:57.563162426 -0300 +@@ -2617,7 +2617,7 @@ cdef class Matrix_rational_dense(matrix_ sage: matrix(QQ,2,[1,2,2,4])._invert_pari() Traceback (most recent call last): ... @@ -6418,11 +6401,10 @@ index cd1ccda..781db98 100644 """ if self._nrows != self._ncols: raise ValueError("self must be a square matrix") -diff --git a/src/sage/modular/cusps_nf.py b/src/sage/modular/cusps_nf.py -index 214172a..75c4519 100644 ---- a/src/sage/modular/cusps_nf.py -+++ b/src/sage/modular/cusps_nf.py -@@ -41,7 +41,7 @@ Different operations with cusps over a number field: +diff -up src/sage/modular/cusps_nf.py.orig src/sage/modular/cusps_nf.py +--- src/sage/modular/cusps_nf.py.orig 2014-08-13 11:16:54.357162304 -0300 ++++ src/sage/modular/cusps_nf.py 2014-08-13 11:16:57.563162426 -0300 +@@ -41,7 +41,7 @@ Different operations with cusps over a n sage: alpha.ideal() Fractional ideal (7, a + 3) sage: alpha.ABmatrix() @@ -6449,11 +6431,10 @@ index 214172a..75c4519 100644 :: -diff --git a/src/sage/modular/modform/constructor.py b/src/sage/modular/modform/constructor.py -index d5e5152..5a2f495 100644 ---- a/src/sage/modular/modform/constructor.py -+++ b/src/sage/modular/modform/constructor.py -@@ -430,7 +430,7 @@ def Newforms(group, weight=2, base_ring=None, names=None): +diff -up src/sage/modular/modform/constructor.py.orig src/sage/modular/modform/constructor.py +--- src/sage/modular/modform/constructor.py.orig 2014-08-13 11:16:54.359162304 -0300 ++++ src/sage/modular/modform/constructor.py 2014-08-13 11:16:57.564162426 -0300 +@@ -430,7 +430,7 @@ def Newforms(group, weight=2, base_ring= base field that is not minimal for that character:: sage: K. = QuadraticField(-1) @@ -6462,11 +6443,10 @@ index d5e5152..5a2f495 100644 sage: len(Newforms(chi, 7, names='a')) 1 sage: x = polygen(K); L. = K.extension(x^2 - 402*i) -diff --git a/src/sage/quadratic_forms/quadratic_form__automorphisms.py b/src/sage/quadratic_forms/quadratic_form__automorphisms.py -index 680df6e..e48729b 100644 ---- a/src/sage/quadratic_forms/quadratic_form__automorphisms.py -+++ b/src/sage/quadratic_forms/quadratic_form__automorphisms.py -@@ -220,18 +220,16 @@ def short_vector_list_up_to_length(self, len_bound, up_to_sign_flag=False): +diff -up src/sage/quadratic_forms/quadratic_form__automorphisms.py.orig src/sage/quadratic_forms/quadratic_form__automorphisms.py +--- src/sage/quadratic_forms/quadratic_form__automorphisms.py.orig 2014-08-13 11:16:54.361162304 -0300 ++++ src/sage/quadratic_forms/quadratic_form__automorphisms.py 2014-08-13 11:16:57.564162426 -0300 +@@ -220,18 +220,16 @@ def short_vector_list_up_to_length(self, ... ValueError: Quadratic form must be positive definite in order to enumerate short vectors @@ -6488,7 +6468,7 @@ index 680df6e..e48729b 100644 """ if not self.is_positive_definite() : raise ValueError( "Quadratic form must be positive definite in order to enumerate short vectors" ) -@@ -256,11 +254,9 @@ def short_vector_list_up_to_length(self, len_bound, up_to_sign_flag=False): +@@ -256,11 +254,9 @@ def short_vector_list_up_to_length(self, # Sort the vectors into lists by their length vec_sorted_list = [list() for i in range(len_bound)] for i in range(len(parilist)): @@ -6503,11 +6483,10 @@ index 680df6e..e48729b 100644 if length < len_bound: v = parilist[i] sagevec = V(list(parilist[i])) -diff --git a/src/sage/rings/arith.py b/src/sage/rings/arith.py -index b9efb9f..2755682 100644 ---- a/src/sage/rings/arith.py -+++ b/src/sage/rings/arith.py -@@ -2443,7 +2443,7 @@ def factor(n, proof=None, int_=False, algorithm='pari', verbose=0, **kwds): +diff -up src/sage/rings/arith.py.orig src/sage/rings/arith.py +--- src/sage/rings/arith.py.orig 2014-08-13 11:16:54.363162304 -0300 ++++ src/sage/rings/arith.py 2014-08-13 11:16:57.565162426 -0300 +@@ -2443,7 +2443,7 @@ def factor(n, proof=None, int_=False, al sage: K. = QuadraticField(-1) sage: factor(122 - 454*i) @@ -6516,7 +6495,7 @@ index b9efb9f..2755682 100644 To access the data in a factorization:: -@@ -4530,6 +4530,8 @@ def hilbert_symbol(a, b, p, algorithm="pari"): +@@ -4530,6 +4530,8 @@ def hilbert_symbol(a, b, p, algorithm="p b = QQ(b).numerator() * QQ(b).denominator() if algorithm == "pari": @@ -6525,7 +6504,7 @@ index b9efb9f..2755682 100644 return ZZ(pari(a).hilbert(b,p)) elif algorithm == 'direct': -@@ -5386,7 +5388,7 @@ def dedekind_sum(p, q, algorithm='default'): +@@ -5655,7 +5657,7 @@ def dedekind_sum(p, q, algorithm='defaul sage: dedekind_sum(3^54 - 1, 2^93 + 1, algorithm='pari') 459340694971839990630374299870/29710560942849126597578981379 @@ -6534,7 +6513,7 @@ index b9efb9f..2755682 100644 sage: dedekind_sum(5, 7, algorithm='default') -1/14 -@@ -5399,7 +5401,7 @@ def dedekind_sum(p, q, algorithm='default'): +@@ -5668,7 +5670,7 @@ def dedekind_sum(p, q, algorithm='defaul sage: dedekind_sum(6, 8, algorithm='flint') -1/8 sage: dedekind_sum(6, 8, algorithm='pari') @@ -6543,11 +6522,10 @@ index b9efb9f..2755682 100644 REFERENCES: -diff --git a/src/sage/rings/complex_double.pyx b/src/sage/rings/complex_double.pyx -index ebac16f..936044a 100644 ---- a/src/sage/rings/complex_double.pyx -+++ b/src/sage/rings/complex_double.pyx -@@ -2061,8 +2061,8 @@ cdef class ComplexDoubleElement(FieldElement): +diff -up src/sage/rings/complex_double.pyx.orig src/sage/rings/complex_double.pyx +--- src/sage/rings/complex_double.pyx.orig 2014-08-13 11:16:54.365162304 -0300 ++++ src/sage/rings/complex_double.pyx 2014-08-13 11:16:57.565162426 -0300 +@@ -2103,8 +2103,8 @@ cdef class ComplexDoubleElement(FieldEle The optional argument allows us to omit the fractional part:: @@ -6558,7 +6536,7 @@ index ebac16f..936044a 100644 sage: pi = CDF(pi) sage: prod([1-exp(2*pi*i*n*z) for n in range(1,10)]) # abs tol 1e-12 0.998129069926 + 4.59084695545e-19*I -@@ -2140,7 +2140,7 @@ cdef class ComplexDoubleElement(FieldElement): +@@ -2182,7 +2182,7 @@ cdef class ComplexDoubleElement(FieldEle sage: a.agm(b, algorithm='principal') 0.338175462986 - 0.0135326969565*I sage: a.agm(b, algorithm='pari') @@ -6567,11 +6545,10 @@ index ebac16f..936044a 100644 Some degenerate cases:: -diff --git a/src/sage/rings/complex_number.pyx b/src/sage/rings/complex_number.pyx -index 0a8ce5c..5fa15c9 100644 ---- a/src/sage/rings/complex_number.pyx -+++ b/src/sage/rings/complex_number.pyx -@@ -1508,7 +1508,7 @@ cdef class ComplexNumber(sage.structure.element.FieldElement): +diff -up src/sage/rings/complex_number.pyx.orig src/sage/rings/complex_number.pyx +--- src/sage/rings/complex_number.pyx.orig 2014-08-13 11:16:54.368162304 -0300 ++++ src/sage/rings/complex_number.pyx 2014-08-13 11:16:57.566162426 -0300 +@@ -1508,7 +1508,7 @@ cdef class ComplexNumber(sage.structure. sage: z = 1 + i sage: z.eta(omit_frac=True) @@ -6580,7 +6557,7 @@ index 0a8ce5c..5fa15c9 100644 sage: prod([1-exp(2*pi*i*n*z) for n in range(1,10)]) 0.998129069925958 + 4.59099857829247e-19*I -@@ -1721,13 +1721,13 @@ cdef class ComplexNumber(sage.structure.element.FieldElement): +@@ -1721,13 +1721,13 @@ cdef class ComplexNumber(sage.structure. sage: a.agm(b, algorithm="principal") 0.338175462986180 - 0.0135326969565405*I sage: a.agm(b, algorithm="pari") @@ -6596,7 +6573,7 @@ index 0a8ce5c..5fa15c9 100644 TESTS: -@@ -2021,7 +2021,7 @@ cdef class ComplexNumber(sage.structure.element.FieldElement): +@@ -2021,7 +2021,7 @@ cdef class ComplexNumber(sage.structure. sage: C, i = ComplexField(30).objgen() sage: (1+i).gamma_inc(2 + 3*i) @@ -6605,10 +6582,9 @@ index 0a8ce5c..5fa15c9 100644 sage: (1+i).gamma_inc(5) -0.0013781309 + 0.0065198200*I sage: C(2).gamma_inc(1 + i) -diff --git a/src/sage/rings/fast_arith.pyx b/src/sage/rings/fast_arith.pyx -index 3a0e304..a224775 100644 ---- a/src/sage/rings/fast_arith.pyx -+++ b/src/sage/rings/fast_arith.pyx +diff -up src/sage/rings/fast_arith.pyx.orig src/sage/rings/fast_arith.pyx +--- src/sage/rings/fast_arith.pyx.orig 2014-08-13 11:16:54.370162304 -0300 ++++ src/sage/rings/fast_arith.pyx 2014-08-13 11:16:57.566162426 -0300 @@ -46,7 +46,7 @@ include "sage/ext/stdsage.pxi" include "sage/libs/pari/decl.pxi" @@ -6618,7 +6594,7 @@ index 3a0e304..a224775 100644 from sage.rings.integer_ring import ZZ from sage.libs.pari.gen cimport gen as pari_gen -@@ -84,7 +84,8 @@ cpdef prime_range(start, stop=None, algorithm="pari_primes", bint py_ints=False) +@@ -84,7 +84,8 @@ cpdef prime_range(start, stop=None, algo - ``py_ints`` -- boolean (default False), return Python ints rather than Sage Integers (faster) @@ -6628,7 +6604,7 @@ index 3a0e304..a224775 100644 sage: prime_range(10) [2, 3, 5, 7] sage: prime_range(7) -@@ -110,21 +111,31 @@ cpdef prime_range(start, stop=None, algorithm="pari_primes", bint py_ints=False) +@@ -110,21 +111,31 @@ cpdef prime_range(start, stop=None, algo sage: type(prime_range(8,algorithm="pari_isprime")[0]) @@ -6670,7 +6646,7 @@ index 3a0e304..a224775 100644 if algorithm == "pari_primes": if stop is None: # In this case, "start" is really stop -@@ -133,13 +144,18 @@ cpdef prime_range(start, stop=None, algorithm="pari_primes", bint py_ints=False) +@@ -133,13 +144,18 @@ cpdef prime_range(start, stop=None, algo else: c_start = start c_stop = stop @@ -6693,11 +6669,10 @@ index 3a0e304..a224775 100644 p = 0 res = [] while p < c_start: -diff --git a/src/sage/rings/finite_rings/element_ext_pari.py b/src/sage/rings/finite_rings/element_ext_pari.py -index 074c2c4..cb76e70 100644 ---- a/src/sage/rings/finite_rings/element_ext_pari.py -+++ b/src/sage/rings/finite_rings/element_ext_pari.py -@@ -284,20 +284,20 @@ class FiniteField_ext_pariElement(FinitePolyExtElement): +diff -up src/sage/rings/finite_rings/element_ext_pari.py.orig src/sage/rings/finite_rings/element_ext_pari.py +--- src/sage/rings/finite_rings/element_ext_pari.py.orig 2014-08-13 11:16:54.372162304 -0300 ++++ src/sage/rings/finite_rings/element_ext_pari.py 2014-08-13 11:16:57.566162426 -0300 +@@ -284,20 +284,20 @@ class FiniteField_ext_pariElement(Finite if not value: value = [0] try: @@ -6726,11 +6701,10 @@ index 074c2c4..cb76e70 100644 elif isinstance(value, str): raise TypeError("value must not be a string") else: -diff --git a/src/sage/rings/finite_rings/finite_field_prime_modn.py b/src/sage/rings/finite_rings/finite_field_prime_modn.py -index a3b3044..b66b1e3 100644 ---- a/src/sage/rings/finite_rings/finite_field_prime_modn.py -+++ b/src/sage/rings/finite_rings/finite_field_prime_modn.py -@@ -168,7 +168,7 @@ class FiniteField_prime_modn(FiniteField_generic, integer_mod_ring.IntegerModRin +diff -up src/sage/rings/finite_rings/finite_field_prime_modn.py.orig src/sage/rings/finite_rings/finite_field_prime_modn.py +--- src/sage/rings/finite_rings/finite_field_prime_modn.py.orig 2014-08-13 11:16:54.374162304 -0300 ++++ src/sage/rings/finite_rings/finite_field_prime_modn.py 2014-08-13 11:16:57.566162426 -0300 +@@ -161,7 +161,7 @@ class FiniteField_prime_modn(FiniteField sage: RF13 = K.residue_field(pp) sage: RF13.hom([GF(13)(1)]) Ring morphism: @@ -6739,11 +6713,10 @@ index a3b3044..b66b1e3 100644 To: Finite Field of size 13 Defn: 1 |--> 1 """ -diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx -index 943036d..34b5f2c 100644 ---- a/src/sage/rings/integer.pyx -+++ b/src/sage/rings/integer.pyx -@@ -4746,8 +4746,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): +diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx +--- src/sage/rings/integer.pyx.orig 2014-08-13 11:16:54.376162304 -0300 ++++ src/sage/rings/integer.pyx 2014-08-13 11:16:57.567162426 -0300 +@@ -4769,8 +4769,7 @@ cdef class Integer(sage.structure.elemen sage: 3._bnfisnorm(QuadraticField(-1, 'i')) (1, 3) sage: 7._bnfisnorm(CyclotomicField(7)) @@ -6753,11 +6726,10 @@ index 943036d..34b5f2c 100644 """ from sage.rings.rational_field import QQ return QQ(self)._bnfisnorm(K, proof=proof, extra_primes=extra_primes) -diff --git a/src/sage/rings/number_field/class_group.py b/src/sage/rings/number_field/class_group.py -index a69a3ad..210a28c 100644 ---- a/src/sage/rings/number_field/class_group.py -+++ b/src/sage/rings/number_field/class_group.py -@@ -223,7 +223,7 @@ class FractionalIdealClass(AbelianGroupWithValuesElement): +diff -up src/sage/rings/number_field/class_group.py.orig src/sage/rings/number_field/class_group.py +--- src/sage/rings/number_field/class_group.py.orig 2014-08-13 11:16:54.378162304 -0300 ++++ src/sage/rings/number_field/class_group.py 2014-08-13 11:16:57.568162426 -0300 +@@ -223,7 +223,7 @@ class FractionalIdealClass(AbelianGroupW sage: k. = NumberField(x^2 + 20072); G = k.class_group(); G Class group of order 76 with structure C38 x C2 of Number Field in a with defining polynomial x^2 + 20072 @@ -6766,7 +6738,7 @@ index a69a3ad..210a28c 100644 Fractional ideal class (41, 1/2*a + 5) sage: J = G(I.ideal()^5); J Fractional ideal class (115856201, 1/2*a + 40407883) -@@ -471,7 +471,7 @@ class ClassGroup(AbelianGroupWithValues_class): +@@ -471,7 +471,7 @@ class ClassGroup(AbelianGroupWithValues_ Class group of order 68 with structure C34 x C2 of Number Field in a with defining polynomial x^2 + x + 23899 sage: C.gens() @@ -6775,11 +6747,10 @@ index a69a3ad..210a28c 100644 sage: C.ngens() 2 """ -diff --git a/src/sage/rings/number_field/galois_group.py b/src/sage/rings/number_field/galois_group.py -index fbb4ab0..0189900 100644 ---- a/src/sage/rings/number_field/galois_group.py -+++ b/src/sage/rings/number_field/galois_group.py -@@ -404,10 +404,12 @@ class GaloisGroup_v2(PermutationGroup_generic): +diff -up src/sage/rings/number_field/galois_group.py.orig src/sage/rings/number_field/galois_group.py +--- src/sage/rings/number_field/galois_group.py.orig 2014-08-13 11:16:54.380162304 -0300 ++++ src/sage/rings/number_field/galois_group.py 2014-08-13 11:16:57.568162426 -0300 +@@ -404,10 +404,12 @@ class GaloisGroup_v2(PermutationGroup_ge EXAMPLE:: @@ -6795,11 +6766,10 @@ index fbb4ab0..0189900 100644 An example where the field is not CM, so complex conjugation really depends on the choice of embedding:: -diff --git a/src/sage/rings/number_field/maps.py b/src/sage/rings/number_field/maps.py -index 1f59062..d262818 100644 ---- a/src/sage/rings/number_field/maps.py -+++ b/src/sage/rings/number_field/maps.py -@@ -302,12 +302,12 @@ class MapRelativeVectorSpaceToRelativeNumberField(NumberFieldIsomorphism): +diff -up src/sage/rings/number_field/maps.py.orig src/sage/rings/number_field/maps.py +--- src/sage/rings/number_field/maps.py.orig 2014-08-13 11:16:54.383162304 -0300 ++++ src/sage/rings/number_field/maps.py 2014-08-13 11:16:57.568162426 -0300 +@@ -302,12 +302,12 @@ class MapRelativeVectorSpaceToRelativeNu # Apply to_B, so now each coefficient is in an absolute field, # and is expressed in terms of a polynomial in y, then make # the PARI poly in x. @@ -6814,261 +6784,10 @@ index 1f59062..d262818 100644 return self.__K._element_class(self.__K, g) class MapRelativeNumberFieldToRelativeVectorSpace(NumberFieldIsomorphism): -diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py -index 08624f0..86cba05 100644 ---- a/src/sage/rings/number_field/number_field.py -+++ b/src/sage/rings/number_field/number_field.py -@@ -2632,9 +2632,9 @@ class NumberField_generic(number_field_base.NumberField): - sage: K. = NumberField(x^2 + 23) - sage: d = K.ideals_of_bdd_norm(10) - sage: for n in d: -- ... print n -- ... for I in d[n]: -- ... print I -+ ....: print n -+ ....: for I in d[n]: -+ ....: print I - 1 - Fractional ideal (1) - 2 -@@ -2649,13 +2649,13 @@ class NumberField_generic(number_field_base.NumberField): - Fractional ideal (4, 1/2*a + 5/2) - 5 - 6 -- Fractional ideal (-1/2*a + 1/2) -+ Fractional ideal (1/2*a - 1/2) - Fractional ideal (6, 1/2*a + 5/2) - Fractional ideal (6, 1/2*a + 7/2) - Fractional ideal (1/2*a + 1/2) - 7 - 8 -- Fractional ideal (-1/2*a - 3/2) -+ Fractional ideal (1/2*a + 3/2) - Fractional ideal (4, a - 1) - Fractional ideal (4, a + 1) - Fractional ideal (1/2*a - 3/2) -@@ -3101,7 +3101,9 @@ class NumberField_generic(number_field_base.NumberField): - return self.__pari_nf - except AttributeError: - f = self.pari_polynomial("y") -- self.__pari_nf = pari([f, self._pari_integral_basis(important=important)]).nfinit() -+ if f.poldegree() > 1: -+ f = pari([f, self._pari_integral_basis(important=important)]) -+ self.__pari_nf = f.nfinit() - return self.__pari_nf - - def pari_zk(self): -@@ -3184,7 +3186,7 @@ class NumberField_generic(number_field_base.NumberField): - sage: len(k.pari_bnf()) - 10 - sage: k.pari_bnf()[:4] -- [[;], matrix(0,7), [;], ...] -+ [[;], matrix(0,3), [;], ...] - sage: len(k.pari_nf()) - 9 - sage: k. = NumberField(x^7 + 7); k -@@ -3545,8 +3547,8 @@ class NumberField_generic(number_field_base.NumberField): - 14/13*a^2 + 267/13*a - 85/13, - 7/13*a^2 + 127/13*a - 49/13, - -1, -- 1/13*a^2 + 20/13*a - 7/13, -- 1/13*a^2 - 19/13*a + 6/13], -+ 1/13*a^2 - 19/13*a + 6/13, -+ 1/13*a^2 - 19/13*a - 7/13], - [(Fractional ideal (11, a - 2), 2), - (Fractional ideal (19, 1/13*a^2 - 45/13*a - 332/13), 2)]) - """ -@@ -3645,7 +3647,7 @@ class NumberField_generic(number_field_base.NumberField): - - sage: K. = NumberField(x^3 - 381 * x + 127) - sage: K.selmer_group(K.primes_above(13), 2) -- [-7/13*a^2 - 140/13*a + 36/13, 14/13*a^2 + 267/13*a - 85/13, 7/13*a^2 + 127/13*a - 49/13, -1, 1/13*a^2 + 20/13*a - 7/13, 1/13*a^2 - 19/13*a + 6/13, -2/13*a^2 - 53/13*a + 92/13, 10/13*a^2 + 44/13*a - 4555/13] -+ [-7/13*a^2 - 140/13*a + 36/13, 14/13*a^2 + 267/13*a - 85/13, 7/13*a^2 + 127/13*a - 49/13, -1, 1/13*a^2 - 19/13*a + 6/13, 1/13*a^2 - 19/13*a - 7/13, 2/13*a^2 + 53/13*a - 92/13, 10/13*a^2 + 44/13*a - 4555/13] - """ - units, clgp_gens = self._S_class_group_and_units(tuple(S), proof=proof) - gens = [] -@@ -4197,19 +4199,19 @@ class NumberField_generic(number_field_base.NumberField): - Here are the factors:: - - sage: fi, fj = K.factor(17); fi,fj -- ((Fractional ideal (4*I + 1), 1), (Fractional ideal (-I - 4), 1)) -+ ((Fractional ideal (I - 4), 1), (Fractional ideal (I + 4), 1)) - - Now we extract the reduced form of the generators:: - - sage: zi = fi[0].gens_reduced()[0]; zi -- 4*I + 1 -+ I - 4 - sage: zj = fj[0].gens_reduced()[0]; zj -- -I - 4 -+ I + 4 - - We recover the integer that was factored in `\ZZ[i]` (up to a unit):: - - sage: zi*zj -- -17*I -+ -17 - - One can also factor elements or ideals of the number field:: - -@@ -4219,15 +4221,14 @@ class NumberField_generic(number_field_base.NumberField): - sage: K.factor(1+a) - Fractional ideal (a + 1) - sage: K.factor(1+a/5) -- (Fractional ideal (-3*a - 2)) * (Fractional ideal (a + 1)) * (Fractional ideal (-a - 2))^-1 * (Fractional ideal (a - 2))^-1 -+ (Fractional ideal (-3*a - 2)) * (Fractional ideal (a + 1)) * (Fractional ideal (-a - 2))^-1 * (Fractional ideal (2*a + 1))^-1 - - An example over a relative number field:: - - sage: pari('setrand(2)') - sage: L. = K.extension(x^2 - 7) - sage: f = L.factor(a + 1); f -- (Fractional ideal (-1/2*a*b - a - 1/2)) * (Fractional ideal (1/2*b + 1/2*a - 1)) # 32-bit -- (Fractional ideal (1/2*a*b + a + 1/2)) * (Fractional ideal (-1/2*b - 1/2*a + 1)) # 64-bit -+ (Fractional ideal (1/2*a*b - a + 1/2)) * (Fractional ideal (-1/2*a*b - a + 1/2)) - sage: f.value() == a+1 - True - -@@ -4553,8 +4554,7 @@ class NumberField_generic(number_field_base.NumberField): - except (AttributeError, KeyError): - f = self.pari_polynomial("y") - if len(v) > 0: -- m = self._pari_disc_factorization_matrix(v) -- B = f.nfbasis(fa = m) -+ B = f.nfbasis(fa=v) - elif self._assume_disc_small: - B = f.nfbasis(1) - elif not important: -@@ -4575,34 +4575,6 @@ class NumberField_generic(number_field_base.NumberField): - self._integral_basis_dict[v] = B - return B - -- def _pari_disc_factorization_matrix(self, v): -- """ -- Returns a PARI matrix representation for the partial -- factorization of the discriminant of the defining polynomial -- of self, defined by the list of primes in the Python list v. -- This function is used internally by the number fields code. -- -- EXAMPLES:: -- -- sage: x = polygen(QQ,'x') -- sage: f = x^3 + 17*x + 393; f.discriminant().factor() -- -1 * 5^2 * 29 * 5779 -- sage: K. = NumberField(f) -- sage: fa = K._pari_disc_factorization_matrix([5,29]); fa -- [5, 2; 29, 1] -- sage: fa.type() -- 't_MAT' -- """ -- f = self.pari_polynomial() -- m = pari.matrix(len(v), 2) -- d = f.poldisc() -- for i in range(len(v)): -- p = pari(ZZ(v[i])) -- m[i,0] = p -- m[i,1] = d.valuation(p) -- return m -- -- - def reduced_basis(self, prec=None): - r""" - This function returns an LLL-reduced basis for the -@@ -5299,7 +5271,14 @@ class NumberField_generic(number_field_base.NumberField): - sage: K.units(proof=True) # takes forever, not tested - ... - sage: K.units(proof=False) # result not independently verified -- (a^9 + a - 1, a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, a^16 + a^15 + a^14 + a^13 + a^12 + a^11 + a^10 + a^9 + a^8 + a^7 + a^6 + a^5 + a^4 + a^3 + a^2 - 2, 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, 2*a^16 + a^15 - a^11 - 3*a^10 - 4*a^9 - 4*a^8 - 4*a^7 - 5*a^6 - 7*a^5 - 8*a^4 - 6*a^3 - 5*a^2 - 6*a - 7) -+ (a^9 + a - 1, -+ a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, -+ a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, -+ 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, -+ 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, -+ a^16 - a^15 - 3*a^14 - 4*a^13 - 4*a^12 - 3*a^11 - a^10 + 2*a^9 + 4*a^8 + 5*a^7 + 4*a^6 + 2*a^5 - 2*a^4 - 6*a^3 - 9*a^2 - 9*a - 7, -+ a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, -+ 5*a^16 - 6*a^14 + a^13 + 7*a^12 - 2*a^11 - 7*a^10 + 4*a^9 + 7*a^8 - 6*a^7 - 7*a^6 + 8*a^5 + 6*a^4 - 11*a^3 - 5*a^2 + 13*a + 4) - """ - proof = proof_flag(proof) - -@@ -5371,7 +5350,7 @@ class NumberField_generic(number_field_base.NumberField): - sage: U.gens() - (u0, u1, u2, u3, u4, u5, u6, u7, u8) - sage: U.gens_values() # result not independently verified -- [-1, a^9 + a - 1, a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, a^16 + a^15 + a^14 + a^13 + a^12 + a^11 + a^10 + a^9 + a^8 + a^7 + a^6 + a^5 + a^4 + a^3 + a^2 - 2, 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, 2*a^16 + a^15 - a^11 - 3*a^10 - 4*a^9 - 4*a^8 - 4*a^7 - 5*a^6 - 7*a^5 - 8*a^4 - 6*a^3 - 5*a^2 - 6*a - 7] -+ [-1, a^9 + a - 1, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, a^16 - a^15 - 3*a^14 - 4*a^13 - 4*a^12 - 3*a^11 - a^10 + 2*a^9 + 4*a^8 + 5*a^7 + 4*a^6 + 2*a^5 - 2*a^4 - 6*a^3 - 9*a^2 - 9*a - 7, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, 5*a^16 - 6*a^14 + a^13 + 7*a^12 - 2*a^11 - 7*a^10 + 4*a^9 + 7*a^8 - 6*a^7 - 7*a^6 + 8*a^5 + 6*a^4 - 11*a^3 - 5*a^2 + 13*a + 4] - """ - proof = proof_flag(proof) - -@@ -5421,8 +5400,7 @@ class NumberField_generic(number_field_base.NumberField): - sage: U.gens() - (u0, u1, u2, u3) - sage: U.gens_values() -- [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 6/275*a^3 - 9/55*a^2 + 14/11*a - 2, 14/275*a^3 - 21/55*a^2 + 29/11*a - 6, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5] # 32-bit -- [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 6/275*a^3 - 9/55*a^2 + 14/11*a - 2, -14/275*a^3 + 21/55*a^2 - 29/11*a + 6, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5] # 64-bit -+ [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 6/275*a^3 - 9/55*a^2 + 14/11*a - 2, -14/275*a^3 + 21/55*a^2 - 29/11*a + 6, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5] - sage: U.invariants() - (10, 0, 0, 0) - sage: [u.multiplicative_order() for u in U.gens()] -@@ -5566,9 +5544,9 @@ class NumberField_generic(number_field_base.NumberField): - sage: r. = QQ[] - sage: K. = NumberField(x^2+1) - sage: K.zeta(4) -- -b -+ b - sage: K.zeta(4,all=True) -- [-b, b] -+ [b, -b] - sage: K.zeta(3) - Traceback (most recent call last): - ... -@@ -5666,7 +5644,7 @@ class NumberField_generic(number_field_base.NumberField): - - sage: K. = NumberField(x^2+1) - sage: z = K.primitive_root_of_unity(); z -- -i -+ i - sage: z.multiplicative_order() - 4 - -@@ -5692,11 +5670,11 @@ class NumberField_generic(number_field_base.NumberField): - sage: z.multiplicative_order() - 6 - -- sage: K = CyclotomicField(7) -+ sage: K = CyclotomicField(3) - sage: z = K.primitive_root_of_unity(); z -- zeta7^5 + zeta7^4 + zeta7^3 + zeta7^2 + zeta7 + 1 -+ zeta3 + 1 - sage: z.multiplicative_order() -- 14 -+ 6 - - TESTS: - -@@ -5730,7 +5708,7 @@ class NumberField_generic(number_field_base.NumberField): - - sage: K. = NumberField(x^2+1) - sage: zs = K.roots_of_unity(); zs -- [-b, -1, b, 1] -+ [b, -1, -b, 1] - sage: [ z**K.number_of_roots_of_unity() for z in zs ] - [1, 1, 1, 1] - """ -@@ -7795,8 +7773,7 @@ class NumberField_absolute(NumberField_generic): - sage: K.hilbert_conductor(K(2),K(-2)) - Fractional ideal (1) - sage: K.hilbert_conductor(K(2*b),K(-2)) -- Fractional ideal (-b^2 - b + 2) -- -+ Fractional ideal (b^2 + b - 2) - - AUTHOR: - -diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx -index 91c4d1b..a8dcbeb 100644 ---- a/src/sage/rings/number_field/number_field_element.pyx -+++ b/src/sage/rings/number_field/number_field_element.pyx -@@ -329,9 +329,11 @@ cdef class NumberFieldElement(FieldElement): +diff -up src/sage/rings/number_field/number_field_element.pyx.orig src/sage/rings/number_field/number_field_element.pyx +--- src/sage/rings/number_field/number_field_element.pyx.orig 2014-08-13 11:16:54.385162305 -0300 ++++ src/sage/rings/number_field/number_field_element.pyx 2014-08-13 11:16:57.569162426 -0300 +@@ -329,9 +329,11 @@ cdef class NumberFieldElement(FieldEleme fmod = f.mod() for i from 0 <= i <= fmod.poldegree(): if fmod.polcoeff(i).type() in ["t_POL", "t_POLMOD"]: @@ -7083,7 +6802,7 @@ index 91c4d1b..a8dcbeb 100644 break # Check that the modulus is actually the defining polynomial # of the number field. -@@ -1188,7 +1190,7 @@ cdef class NumberFieldElement(FieldElement): +@@ -1207,7 +1209,7 @@ cdef class NumberFieldElement(FieldEleme sage: Q. = K[] sage: L. = NumberField(X^4 + a) sage: t = (-a).is_norm(L, element=True); t @@ -7092,7 +6811,7 @@ index 91c4d1b..a8dcbeb 100644 sage: t[1].norm(K) -a -@@ -1289,11 +1291,11 @@ cdef class NumberFieldElement(FieldElement): +@@ -1308,11 +1310,11 @@ cdef class NumberFieldElement(FieldEleme sage: Q. = K[] sage: L. = NumberField(X^4 + a) sage: t = (-a)._rnfisnorm(L); t @@ -7106,7 +6825,7 @@ index 91c4d1b..a8dcbeb 100644 sage: t[0].norm(K)*t[1] 3 -@@ -1323,6 +1325,9 @@ cdef class NumberFieldElement(FieldElement): +@@ -1342,6 +1344,9 @@ cdef class NumberFieldElement(FieldEleme rnf_data = K.pari_rnfnorm_data(L, proof=proof) x, q = self._pari_().rnfisnorm(rnf_data) @@ -7116,7 +6835,7 @@ index 91c4d1b..a8dcbeb 100644 return L(x), K(q) def _mpfr_(self, R): -@@ -1339,7 +1344,7 @@ cdef class NumberFieldElement(FieldElement): +@@ -1358,7 +1363,7 @@ cdef class NumberFieldElement(FieldEleme sage: (a^2)._mpfr_(RR) -1.00000000000000 @@ -7125,7 +6844,7 @@ index 91c4d1b..a8dcbeb 100644 sage: K. = NumberField(x^2-5) sage: RR(K(1)) -@@ -3813,12 +3818,12 @@ cdef class NumberFieldElement_relative(NumberFieldElement): +@@ -3905,12 +3910,12 @@ cdef class NumberFieldElement_relative(N sage: K. = NumberField(y^2 + y + 1) sage: x = polygen(K) sage: L. = NumberField(x^4 + a*x + 2) @@ -7141,7 +6860,7 @@ index 91c4d1b..a8dcbeb 100644 sage: L(e) # Conversion from PARI relative number field element a*b sage: e = pari('Mod(0, x^8 + 1)'); L(e) # Wrong modulus -@@ -3832,10 +3837,12 @@ cdef class NumberFieldElement_relative(NumberFieldElement): +@@ -3924,10 +3929,12 @@ cdef class NumberFieldElement_relative(N sage: L(e) a*b^2 + 1 @@ -7157,11 +6876,10 @@ index 91c4d1b..a8dcbeb 100644 """ NumberFieldElement.__init__(self, parent, f) -diff --git a/src/sage/rings/number_field/number_field_ideal.py b/src/sage/rings/number_field/number_field_ideal.py -index 51dadd8..2092543 100644 ---- a/src/sage/rings/number_field/number_field_ideal.py -+++ b/src/sage/rings/number_field/number_field_ideal.py -@@ -83,14 +83,17 @@ def convert_from_idealprimedec_form(field, ideal): +diff -up src/sage/rings/number_field/number_field_ideal.py.orig src/sage/rings/number_field/number_field_ideal.py +--- src/sage/rings/number_field/number_field_ideal.py.orig 2014-08-13 11:16:54.387162305 -0300 ++++ src/sage/rings/number_field/number_field_ideal.py 2014-08-13 11:16:57.569162426 -0300 +@@ -83,14 +83,17 @@ def convert_from_idealprimedec_form(fiel sage: K_bnf = gp(K.pari_bnf()) sage: ideal = K_bnf.idealprimedec(3)[1] sage: convert_from_idealprimedec_form(K, ideal) @@ -7182,7 +6900,7 @@ index 51dadd8..2092543 100644 return field.ideal(p, alpha) def convert_to_idealprimedec_form(field, ideal): -@@ -116,16 +119,13 @@ def convert_to_idealprimedec_form(field, ideal): +@@ -116,16 +119,13 @@ def convert_to_idealprimedec_form(field, sage: K. = NumberField(x^2 + 3) sage: P = K.ideal(a/2-3/2) sage: convert_to_idealprimedec_form(K, P) @@ -7252,7 +6970,7 @@ index 51dadd8..2092543 100644 sage: K.ideal(2).pari_prime() Traceback (most recent call last): ... -@@ -2238,7 +2238,7 @@ class NumberFieldFractionalIdeal(NumberFieldIdeal): +@@ -2238,7 +2238,7 @@ class NumberFieldFractionalIdeal(NumberF sage: I = K.ideal((3+4*i)/5); I Fractional ideal (4/5*i + 3/5) sage: I.denominator() @@ -7261,7 +6979,7 @@ index 51dadd8..2092543 100644 sage: I.numerator() Fractional ideal (-i - 2) sage: I.numerator().is_integral() and I.denominator().is_integral() -@@ -2268,7 +2268,7 @@ class NumberFieldFractionalIdeal(NumberFieldIdeal): +@@ -2268,7 +2268,7 @@ class NumberFieldFractionalIdeal(NumberF sage: I = K.ideal((3+4*i)/5); I Fractional ideal (4/5*i + 3/5) sage: I.denominator() @@ -7270,7 +6988,7 @@ index 51dadd8..2092543 100644 sage: I.numerator() Fractional ideal (-i - 2) sage: I.numerator().is_integral() and I.denominator().is_integral() -@@ -2999,15 +2999,15 @@ class NumberFieldFractionalIdeal(NumberFieldIdeal): +@@ -2999,15 +2999,15 @@ class NumberFieldFractionalIdeal(NumberF An example of reduction maps to the residue field: these are defined on the whole valuation ring, i.e. the subring of the number field consisting of elements with non-negative @@ -7289,7 +7007,7 @@ index 51dadd8..2092543 100644 sage: a.valuation(P1) 0 sage: F1(i/7) -@@ -3018,7 +3018,7 @@ class NumberFieldFractionalIdeal(NumberFieldIdeal): +@@ -3018,7 +3018,7 @@ class NumberFieldFractionalIdeal(NumberF -1 sage: F2(a) Traceback (most recent call last): @@ -7298,7 +7016,7 @@ index 51dadd8..2092543 100644 An example with a relative number field:: -@@ -3058,7 +3058,7 @@ class NumberFieldFractionalIdeal(NumberFieldIdeal): +@@ -3058,7 +3058,7 @@ class NumberFieldFractionalIdeal(NumberF sage: K. = NumberField(x^5 + 2); K Number Field in a with defining polynomial x^5 + 2 sage: f = K.factor(19); f @@ -7307,11 +7025,10 @@ index 51dadd8..2092543 100644 sage: [i.residue_class_degree() for i, _ in f] [2, 2, 1] """ -diff --git a/src/sage/rings/number_field/number_field_ideal_rel.py b/src/sage/rings/number_field/number_field_ideal_rel.py -index ba6fab5..6f50855 100644 ---- a/src/sage/rings/number_field/number_field_ideal_rel.py -+++ b/src/sage/rings/number_field/number_field_ideal_rel.py -@@ -114,12 +114,12 @@ class NumberFieldFractionalIdeal_rel(NumberFieldFractionalIdeal): +diff -up src/sage/rings/number_field/number_field_ideal_rel.py.orig src/sage/rings/number_field/number_field_ideal_rel.py +--- src/sage/rings/number_field/number_field_ideal_rel.py.orig 2014-08-13 11:16:54.390162305 -0300 ++++ src/sage/rings/number_field/number_field_ideal_rel.py 2014-08-13 11:16:57.570162427 -0300 +@@ -114,12 +114,12 @@ class NumberFieldFractionalIdeal_rel(Num sage: K. = NumberField([x^2 + 23, x^2 - 7]) sage: I = K.ideal(2, (a + 2*b + 3)/2) sage: I.pari_rhnf() @@ -7326,7 +7043,7 @@ index ba6fab5..6f50855 100644 rnf = self.number_field().pari_rnf() L_hnf = self.absolute_ideal().pari_hnf() self.__pari_rhnf = rnf.rnfidealabstorel(nfzk * L_hnf) -@@ -485,7 +485,7 @@ class NumberFieldFractionalIdeal_rel(NumberFieldFractionalIdeal): +@@ -485,7 +485,7 @@ class NumberFieldFractionalIdeal_rel(Num sage: K. = F.extension(Y^2 - (1 + a)*(a + b)*a*b) sage: I = K.ideal(3, c) sage: J = I.ideal_below(); J @@ -7335,11 +7052,276 @@ index ba6fab5..6f50855 100644 sage: J.number_field() == F True """ -diff --git a/src/sage/rings/number_field/number_field_rel.py b/src/sage/rings/number_field/number_field_rel.py -index 3fb70f7..98435fe 100644 ---- a/src/sage/rings/number_field/number_field_rel.py -+++ b/src/sage/rings/number_field/number_field_rel.py -@@ -207,7 +207,7 @@ class NumberField_relative(NumberField_generic): +diff -up src/sage/rings/number_field/number_field.py.orig src/sage/rings/number_field/number_field.py +--- src/sage/rings/number_field/number_field.py.orig 2014-08-13 11:16:54.392162305 -0300 ++++ src/sage/rings/number_field/number_field.py 2014-08-13 11:16:57.571162427 -0300 +@@ -2808,9 +2808,9 @@ class NumberField_generic(number_field_b + sage: K. = NumberField(x^2 + 23) + sage: d = K.ideals_of_bdd_norm(10) + sage: for n in d: +- ... print n +- ... for I in d[n]: +- ... print I ++ ....: print n ++ ....: for I in d[n]: ++ ....: print I + 1 + Fractional ideal (1) + 2 +@@ -2825,13 +2825,13 @@ class NumberField_generic(number_field_b + Fractional ideal (4, 1/2*a + 5/2) + 5 + 6 +- Fractional ideal (-1/2*a + 1/2) ++ Fractional ideal (1/2*a - 1/2) + Fractional ideal (6, 1/2*a + 5/2) + Fractional ideal (6, 1/2*a + 7/2) + Fractional ideal (1/2*a + 1/2) + 7 + 8 +- Fractional ideal (-1/2*a - 3/2) ++ Fractional ideal (1/2*a + 3/2) + Fractional ideal (4, a - 1) + Fractional ideal (4, a + 1) + Fractional ideal (1/2*a - 3/2) +@@ -3065,13 +3065,13 @@ class NumberField_generic(number_field_b + + EXAMPLES:: + +- sage: K.=QuadraticField(-1) +- sage: it=K.primes_of_bounded_norm_iter(10) ++ sage: K. = QuadraticField(-1) ++ sage: it = K.primes_of_bounded_norm_iter(10) + sage: list(it) + [Fractional ideal (i + 1), + Fractional ideal (3), + Fractional ideal (-i - 2), +- Fractional ideal (i - 2)] ++ Fractional ideal (2*i + 1)] + sage: list(K.primes_of_bounded_norm_iter(1)) + [] + """ +@@ -3327,7 +3327,9 @@ class NumberField_generic(number_field_b + return self.__pari_nf + except AttributeError: + f = self.pari_polynomial("y") +- self.__pari_nf = pari([f, self._pari_integral_basis(important=important)]).nfinit() ++ if f.poldegree() > 1: ++ f = pari([f, self._pari_integral_basis(important=important)]) ++ self.__pari_nf = f.nfinit() + return self.__pari_nf + + def pari_zk(self): +@@ -3410,7 +3412,7 @@ class NumberField_generic(number_field_b + sage: len(k.pari_bnf()) + 10 + sage: k.pari_bnf()[:4] +- [[;], matrix(0,7), [;], ...] ++ [[;], matrix(0,3), [;], ...] + sage: len(k.pari_nf()) + 9 + sage: k. = NumberField(x^7 + 7); k +@@ -3771,8 +3773,8 @@ class NumberField_generic(number_field_b + 14/13*a^2 + 267/13*a - 85/13, + 7/13*a^2 + 127/13*a - 49/13, + -1, +- 1/13*a^2 + 20/13*a - 7/13, +- 1/13*a^2 - 19/13*a + 6/13], ++ 1/13*a^2 - 19/13*a + 6/13, ++ 1/13*a^2 - 19/13*a - 7/13], + [(Fractional ideal (11, a - 2), 2), + (Fractional ideal (19, 1/13*a^2 - 45/13*a - 332/13), 2)]) + """ +@@ -3920,7 +3922,7 @@ class NumberField_generic(number_field_b + + sage: K. = NumberField(x^3 - 381 * x + 127) + sage: K.selmer_group(K.primes_above(13), 2) +- [-7/13*a^2 - 140/13*a + 36/13, 14/13*a^2 + 267/13*a - 85/13, 7/13*a^2 + 127/13*a - 49/13, -1, 1/13*a^2 + 20/13*a - 7/13, 1/13*a^2 - 19/13*a + 6/13, -2/13*a^2 - 53/13*a + 92/13, 10/13*a^2 + 44/13*a - 4555/13] ++ [-7/13*a^2 - 140/13*a + 36/13, 14/13*a^2 + 267/13*a - 85/13, 7/13*a^2 + 127/13*a - 49/13, -1, 1/13*a^2 - 19/13*a + 6/13, 1/13*a^2 - 19/13*a - 7/13, 2/13*a^2 + 53/13*a - 92/13, 10/13*a^2 + 44/13*a - 4555/13] + + Verify that :trac:`16708` is fixed:: + +@@ -4537,19 +4539,19 @@ class NumberField_generic(number_field_b + Here are the factors:: + + sage: fi, fj = K.factor(17); fi,fj +- ((Fractional ideal (4*I + 1), 1), (Fractional ideal (-I - 4), 1)) ++ ((Fractional ideal (I - 4), 1), (Fractional ideal (I + 4), 1)) + + Now we extract the reduced form of the generators:: + + sage: zi = fi[0].gens_reduced()[0]; zi +- 4*I + 1 ++ I - 4 + sage: zj = fj[0].gens_reduced()[0]; zj +- -I - 4 ++ I + 4 + + We recover the integer that was factored in `\ZZ[i]` (up to a unit):: + + sage: zi*zj +- -17*I ++ -17 + + One can also factor elements or ideals of the number field:: + +@@ -4559,15 +4561,14 @@ class NumberField_generic(number_field_b + sage: K.factor(1+a) + Fractional ideal (a + 1) + sage: K.factor(1+a/5) +- (Fractional ideal (-3*a - 2)) * (Fractional ideal (a + 1)) * (Fractional ideal (-a - 2))^-1 * (Fractional ideal (a - 2))^-1 ++ (Fractional ideal (-3*a - 2)) * (Fractional ideal (a + 1)) * (Fractional ideal (-a - 2))^-1 * (Fractional ideal (2*a + 1))^-1 + + An example over a relative number field:: + + sage: pari('setrand(2)') + sage: L. = K.extension(x^2 - 7) + sage: f = L.factor(a + 1); f +- (Fractional ideal (-1/2*a*b - a - 1/2)) * (Fractional ideal (1/2*b + 1/2*a - 1)) # 32-bit +- (Fractional ideal (1/2*a*b + a + 1/2)) * (Fractional ideal (-1/2*b - 1/2*a + 1)) # 64-bit ++ (Fractional ideal (1/2*a*b - a + 1/2)) * (Fractional ideal (-1/2*a*b - a + 1/2)) + sage: f.value() == a+1 + True + +@@ -4893,8 +4894,7 @@ class NumberField_generic(number_field_b + except (AttributeError, KeyError): + f = self.pari_polynomial("y") + if len(v) > 0: +- m = self._pari_disc_factorization_matrix(v) +- B = f.nfbasis(fa = m) ++ B = f.nfbasis(fa=v) + elif self._assume_disc_small: + B = f.nfbasis(1) + elif not important: +@@ -4915,34 +4915,6 @@ class NumberField_generic(number_field_b + self._integral_basis_dict[v] = B + return B + +- def _pari_disc_factorization_matrix(self, v): +- """ +- Returns a PARI matrix representation for the partial +- factorization of the discriminant of the defining polynomial +- of self, defined by the list of primes in the Python list v. +- This function is used internally by the number fields code. +- +- EXAMPLES:: +- +- sage: x = polygen(QQ,'x') +- sage: f = x^3 + 17*x + 393; f.discriminant().factor() +- -1 * 5^2 * 29 * 5779 +- sage: K. = NumberField(f) +- sage: fa = K._pari_disc_factorization_matrix([5,29]); fa +- [5, 2; 29, 1] +- sage: fa.type() +- 't_MAT' +- """ +- f = self.pari_polynomial() +- m = pari.matrix(len(v), 2) +- d = f.poldisc() +- for i in range(len(v)): +- p = pari(ZZ(v[i])) +- m[i,0] = p +- m[i,1] = d.valuation(p) +- return m +- +- + def reduced_basis(self, prec=None): + r""" + This function returns an LLL-reduced basis for the +@@ -5639,7 +5611,14 @@ class NumberField_generic(number_field_b + sage: K.units(proof=True) # takes forever, not tested + ... + sage: K.units(proof=False) # result not independently verified +- (a^9 + a - 1, a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, a^16 + a^15 + a^14 + a^13 + a^12 + a^11 + a^10 + a^9 + a^8 + a^7 + a^6 + a^5 + a^4 + a^3 + a^2 - 2, 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, 2*a^16 + a^15 - a^11 - 3*a^10 - 4*a^9 - 4*a^8 - 4*a^7 - 5*a^6 - 7*a^5 - 8*a^4 - 6*a^3 - 5*a^2 - 6*a - 7) ++ (a^9 + a - 1, ++ a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, ++ a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, ++ 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, ++ 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, ++ a^16 - a^15 - 3*a^14 - 4*a^13 - 4*a^12 - 3*a^11 - a^10 + 2*a^9 + 4*a^8 + 5*a^7 + 4*a^6 + 2*a^5 - 2*a^4 - 6*a^3 - 9*a^2 - 9*a - 7, ++ a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, ++ 5*a^16 - 6*a^14 + a^13 + 7*a^12 - 2*a^11 - 7*a^10 + 4*a^9 + 7*a^8 - 6*a^7 - 7*a^6 + 8*a^5 + 6*a^4 - 11*a^3 - 5*a^2 + 13*a + 4) + """ + proof = proof_flag(proof) + +@@ -5711,7 +5690,7 @@ class NumberField_generic(number_field_b + sage: U.gens() + (u0, u1, u2, u3, u4, u5, u6, u7, u8) + sage: U.gens_values() # result not independently verified +- [-1, a^9 + a - 1, a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, a^16 + a^15 + a^14 + a^13 + a^12 + a^11 + a^10 + a^9 + a^8 + a^7 + a^6 + a^5 + a^4 + a^3 + a^2 - 2, 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, 2*a^16 + a^15 - a^11 - 3*a^10 - 4*a^9 - 4*a^8 - 4*a^7 - 5*a^6 - 7*a^5 - 8*a^4 - 6*a^3 - 5*a^2 - 6*a - 7] ++ [-1, a^9 + a - 1, a^15 - a^12 + a^10 - a^9 - 2*a^8 + 3*a^7 + a^6 - 3*a^5 + a^4 + 4*a^3 - 3*a^2 - 2*a + 2, a^16 - a^15 + a^14 - a^12 + a^11 - a^10 - a^8 + a^7 - 2*a^6 + a^4 - 3*a^3 + 2*a^2 - 2*a + 1, 2*a^16 - a^14 - a^13 + 3*a^12 - 2*a^10 + a^9 + 3*a^8 - 3*a^6 + 3*a^5 + 3*a^4 - 2*a^3 - 2*a^2 + 3*a + 4, 2*a^16 - 3*a^15 + 3*a^14 - 3*a^13 + 3*a^12 - a^11 + a^9 - 3*a^8 + 4*a^7 - 5*a^6 + 6*a^5 - 4*a^4 + 3*a^3 - 2*a^2 - 2*a + 4, a^16 - a^15 - 3*a^14 - 4*a^13 - 4*a^12 - 3*a^11 - a^10 + 2*a^9 + 4*a^8 + 5*a^7 + 4*a^6 + 2*a^5 - 2*a^4 - 6*a^3 - 9*a^2 - 9*a - 7, a^15 + a^14 + 2*a^11 + a^10 - a^9 + a^8 + 2*a^7 - a^5 + 2*a^3 - a^2 - 3*a + 1, 5*a^16 - 6*a^14 + a^13 + 7*a^12 - 2*a^11 - 7*a^10 + 4*a^9 + 7*a^8 - 6*a^7 - 7*a^6 + 8*a^5 + 6*a^4 - 11*a^3 - 5*a^2 + 13*a + 4] + """ + proof = proof_flag(proof) + +@@ -5761,8 +5740,7 @@ class NumberField_generic(number_field_b + sage: U.gens() + (u0, u1, u2, u3) + sage: U.gens_values() +- [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 6/275*a^3 - 9/55*a^2 + 14/11*a - 2, 14/275*a^3 - 21/55*a^2 + 29/11*a - 6, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5] # 32-bit +- [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 6/275*a^3 - 9/55*a^2 + 14/11*a - 2, -14/275*a^3 + 21/55*a^2 - 29/11*a + 6, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5] # 64-bit ++ [-7/275*a^3 + 1/11*a^2 - 9/11*a - 1, 6/275*a^3 - 9/55*a^2 + 14/11*a - 2, -14/275*a^3 + 21/55*a^2 - 29/11*a + 6, 1/275*a^3 + 4/55*a^2 - 5/11*a + 5] + sage: U.invariants() + (10, 0, 0, 0) + sage: [u.multiplicative_order() for u in U.gens()] +@@ -5906,9 +5884,9 @@ class NumberField_generic(number_field_b + sage: r. = QQ[] + sage: K. = NumberField(x^2+1) + sage: K.zeta(4) +- -b ++ b + sage: K.zeta(4,all=True) +- [-b, b] ++ [b, -b] + sage: K.zeta(3) + Traceback (most recent call last): + ... +@@ -6006,7 +5984,7 @@ class NumberField_generic(number_field_b + + sage: K. = NumberField(x^2+1) + sage: z = K.primitive_root_of_unity(); z +- -i ++ i + sage: z.multiplicative_order() + 4 + +@@ -6032,11 +6010,11 @@ class NumberField_generic(number_field_b + sage: z.multiplicative_order() + 6 + +- sage: K = CyclotomicField(7) ++ sage: K = CyclotomicField(3) + sage: z = K.primitive_root_of_unity(); z +- zeta7^5 + zeta7^4 + zeta7^3 + zeta7^2 + zeta7 + 1 ++ zeta3 + 1 + sage: z.multiplicative_order() +- 14 ++ 6 + + TESTS: + +@@ -6070,7 +6048,7 @@ class NumberField_generic(number_field_b + + sage: K. = NumberField(x^2+1) + sage: zs = K.roots_of_unity(); zs +- [-b, -1, b, 1] ++ [b, -1, -b, 1] + sage: [ z**K.number_of_roots_of_unity() for z in zs ] + [1, 1, 1, 1] + """ +@@ -8163,8 +8141,7 @@ class NumberField_absolute(NumberField_g + sage: K.hilbert_conductor(K(2),K(-2)) + Fractional ideal (1) + sage: K.hilbert_conductor(K(2*b),K(-2)) +- Fractional ideal (-b^2 - b + 2) +- ++ Fractional ideal (b^2 + b - 2) + + AUTHOR: + +diff -up src/sage/rings/number_field/number_field_rel.py.orig src/sage/rings/number_field/number_field_rel.py +--- src/sage/rings/number_field/number_field_rel.py.orig 2014-08-13 11:16:54.394162305 -0300 ++++ src/sage/rings/number_field/number_field_rel.py 2014-08-13 11:16:57.572162427 -0300 +@@ -214,7 +214,7 @@ class NumberField_relative(NumberField_g sage: b Traceback (most recent call last): ... @@ -7348,7 +7330,7 @@ index 3fb70f7..98435fe 100644 However, if the polynomial is linear, rational coefficients should work:: -@@ -1060,7 +1060,7 @@ class NumberField_relative(NumberField_generic): +@@ -1082,7 +1082,7 @@ class NumberField_relative(NumberField_g pol = element.polynomial('y') t2 = pol(a).lift() if check: @@ -7357,7 +7339,7 @@ index 3fb70f7..98435fe 100644 assert t1 == t2 return t2 -@@ -1145,7 +1145,7 @@ class NumberField_relative(NumberField_generic): +@@ -1167,7 +1167,7 @@ class NumberField_relative(NumberField_g sage: k. = NumberField([x^3 + 2, x^2 + 2]) sage: k._pari_base_bnf() @@ -7366,7 +7348,7 @@ index 3fb70f7..98435fe 100644 """ abs_base, from_abs_base, to_abs_base = self.absolute_base_field() return abs_base.pari_bnf(proof, units) -@@ -1283,10 +1283,10 @@ class NumberField_relative(NumberField_generic): +@@ -1305,10 +1305,10 @@ class NumberField_relative(NumberField_g Galois conjugate:: sage: for g in G: @@ -7380,7 +7362,7 @@ index 3fb70f7..98435fe 100644 """ if is_RelativeNumberField(other): s_base_field = self.base_field() -@@ -1575,7 +1575,7 @@ class NumberField_relative(NumberField_generic): +@@ -1597,7 +1597,7 @@ class NumberField_relative(NumberField_g sage: k. = NumberField([x^4 + 3, x^2 + 2]) sage: k.pari_rnf() @@ -7389,7 +7371,7 @@ index 3fb70f7..98435fe 100644 """ return self._pari_base_nf().rnfinit(self.pari_relative_polynomial()) -@@ -2317,7 +2317,7 @@ class NumberField_relative(NumberField_generic): +@@ -2329,7 +2329,7 @@ class NumberField_relative(NumberField_g ... ValueError: The element b is not in the base field """ @@ -7398,10 +7380,9 @@ index 3fb70f7..98435fe 100644 # polmodmod_xy is a POLMOD with POLMOD coefficients in general. # These POLMOD coefficients represent elements of the base field K. # We do two lifts so we get a polynomial. We need the simplify() to -diff --git a/src/sage/rings/number_field/order.py b/src/sage/rings/number_field/order.py -index 99fe015..43d2e25 100644 ---- a/src/sage/rings/number_field/order.py -+++ b/src/sage/rings/number_field/order.py +diff -up src/sage/rings/number_field/order.py.orig src/sage/rings/number_field/order.py +--- src/sage/rings/number_field/order.py.orig 2014-08-13 11:16:54.396162305 -0300 ++++ src/sage/rings/number_field/order.py 2014-08-13 11:16:57.572162427 -0300 @@ -245,7 +245,7 @@ class Order(IntegralDomain): sage: k. = NumberField(x^2 + 5077); G = k.class_group(); G @@ -7411,11 +7392,10 @@ index 99fe015..43d2e25 100644 Fractional ideal class (11, a + 7) sage: Ok = k.maximal_order(); Ok Maximal Order in Number Field in a with defining polynomial x^2 + 5077 -diff --git a/src/sage/rings/number_field/unit_group.py b/src/sage/rings/number_field/unit_group.py -index 6029b83..a8fcc15 100644 ---- a/src/sage/rings/number_field/unit_group.py -+++ b/src/sage/rings/number_field/unit_group.py -@@ -173,18 +173,10 @@ class UnitGroup(AbelianGroupWithValues_class): +diff -up src/sage/rings/number_field/unit_group.py.orig src/sage/rings/number_field/unit_group.py +--- src/sage/rings/number_field/unit_group.py.orig 2014-08-13 11:16:54.398162305 -0300 ++++ src/sage/rings/number_field/unit_group.py 2014-08-13 11:16:57.573162427 -0300 +@@ -173,18 +173,10 @@ class UnitGroup(AbelianGroupWithValues_c sage: UK = K.unit_group() sage: UK.ngens() 6 @@ -7438,7 +7418,7 @@ index 6029b83..a8fcc15 100644 An S-unit group:: -@@ -195,7 +187,7 @@ class UnitGroup(AbelianGroupWithValues_class): +@@ -195,7 +187,7 @@ class UnitGroup(AbelianGroupWithValues_c sage: SUK.zeta_order() 26 sage: SUK.log(21*z) @@ -7447,7 +7427,7 @@ index 6029b83..a8fcc15 100644 """ # This structure is not a parent in the usual sense. The # "elements" are NumberFieldElement_absolute. Instead, they should -@@ -427,7 +419,7 @@ class UnitGroup(AbelianGroupWithValues_class): +@@ -427,7 +419,7 @@ class UnitGroup(AbelianGroupWithValues_c sage: K. = NumberField(x^2+1) sage: U = UnitGroup(K) sage: zs = U.roots_of_unity(); zs @@ -7456,7 +7436,7 @@ index 6029b83..a8fcc15 100644 sage: [ z**U.zeta_order() for z in zs ] [1, 1, 1, 1] """ -@@ -493,9 +485,9 @@ class UnitGroup(AbelianGroupWithValues_class): +@@ -493,9 +485,9 @@ class UnitGroup(AbelianGroupWithValues_c sage: K. = NumberField(x^2+1) sage: U = UnitGroup(K) sage: U.zeta(4) @@ -7468,7 +7448,7 @@ index 6029b83..a8fcc15 100644 sage: U.zeta(3) Traceback (most recent call last): ... -@@ -599,7 +591,7 @@ class UnitGroup(AbelianGroupWithValues_class): +@@ -599,7 +591,7 @@ class UnitGroup(AbelianGroupWithValues_c sage: SUK = UnitGroup(K,S=2) sage: v = (3,1,4,1,5,9,2) sage: u = SUK.exp(v); u @@ -7477,7 +7457,7 @@ index 6029b83..a8fcc15 100644 sage: SUK.log(u) (3, 1, 4, 1, 5, 9, 2) sage: SUK.log(u) == v -@@ -645,7 +637,7 @@ class UnitGroup(AbelianGroupWithValues_class): +@@ -645,7 +637,7 @@ class UnitGroup(AbelianGroupWithValues_c sage: SUK = UnitGroup(K,S=2) sage: v = (3,1,4,1,5,9,2) sage: u = SUK.exp(v); u @@ -7486,10 +7466,9 @@ index 6029b83..a8fcc15 100644 sage: SUK.log(u) (3, 1, 4, 1, 5, 9, 2) sage: SUK.log(u) == v -diff --git a/src/sage/rings/polynomial/cyclotomic.pyx b/src/sage/rings/polynomial/cyclotomic.pyx -index 8c5adb8..571c9d2 100644 ---- a/src/sage/rings/polynomial/cyclotomic.pyx -+++ b/src/sage/rings/polynomial/cyclotomic.pyx +diff -up src/sage/rings/polynomial/cyclotomic.pyx.orig src/sage/rings/polynomial/cyclotomic.pyx +--- src/sage/rings/polynomial/cyclotomic.pyx.orig 2014-08-13 11:16:54.401162305 -0300 ++++ src/sage/rings/polynomial/cyclotomic.pyx 2014-08-13 11:16:57.573162427 -0300 @@ -247,13 +247,16 @@ def cyclotomic_value(n, x): TESTS:: @@ -7545,10 +7524,9 @@ index 8c5adb8..571c9d2 100644 factors = factor(n) cdef Py_ssize_t i, j, ti, L, root_of_unity = -1 primes = [p for p, e in factors] -diff --git a/src/sage/rings/polynomial/padics/polynomial_padic.py b/src/sage/rings/polynomial/padics/polynomial_padic.py -index c8cae05..c99fe1e 100644 ---- a/src/sage/rings/polynomial/padics/polynomial_padic.py -+++ b/src/sage/rings/polynomial/padics/polynomial_padic.py +diff -up src/sage/rings/polynomial/padics/polynomial_padic.py.orig src/sage/rings/polynomial/padics/polynomial_padic.py +--- src/sage/rings/polynomial/padics/polynomial_padic.py.orig 2014-08-13 11:16:54.403162305 -0300 ++++ src/sage/rings/polynomial/padics/polynomial_padic.py 2014-08-13 11:16:57.573162427 -0300 @@ -86,7 +86,7 @@ class Polynomial_padic(Polynomial): 1 (1 + O(3^3))*t + (-1 + O(3^3)) 1 (1 + O(3^3))*t^2 + (5 + O(3^3))*t + (-1 + O(3^3)) @@ -7558,11 +7536,10 @@ index c8cae05..c99fe1e 100644 sage: R. = PolynomialRing(Qp(5,6,print_mode='terse',print_pos=False)) sage: pol = 100 * (5*t - 1) * (t - 5) sage: pol -diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx -index b81a919..14173df 100644 ---- a/src/sage/rings/polynomial/polynomial_element.pyx -+++ b/src/sage/rings/polynomial/polynomial_element.pyx -@@ -3244,9 +3244,7 @@ cdef class Polynomial(CommutativeAlgebraElement): +diff -up src/sage/rings/polynomial/polynomial_element.pyx.orig src/sage/rings/polynomial/polynomial_element.pyx +--- src/sage/rings/polynomial/polynomial_element.pyx.orig 2014-08-13 11:16:54.405162305 -0300 ++++ src/sage/rings/polynomial/polynomial_element.pyx 2014-08-13 11:16:57.574162427 -0300 +@@ -3248,9 +3248,7 @@ cdef class Polynomial(CommutativeAlgebra sage: K. = QuadraticField(p*q) sage: R. = PolynomialRing(K) sage: K.pari_polynomial('a').nffactor("x^2+1") @@ -7573,7 +7550,7 @@ index b81a919..14173df 100644 sage: factor(x^2 + 1) x^2 + 1 sage: factor( (x - a) * (x + 2*a) ) -@@ -4614,7 +4612,7 @@ cdef class Polynomial(CommutativeAlgebraElement): +@@ -4648,7 +4646,7 @@ cdef class Polynomial(CommutativeAlgebra sage: pari(f) Traceback (most recent call last): ... @@ -7582,11 +7559,10 @@ index b81a919..14173df 100644 Stacked polynomial rings, first with a univariate ring on the bottom:: -diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py -index 8d9975d..99bec5a 100644 ---- a/src/sage/rings/polynomial/polynomial_quotient_ring.py -+++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py -@@ -1234,11 +1234,11 @@ class PolynomialQuotientRing_generic(sage.rings.commutative_ring.CommutativeRing +diff -up src/sage/rings/polynomial/polynomial_quotient_ring.py.orig src/sage/rings/polynomial/polynomial_quotient_ring.py +--- src/sage/rings/polynomial/polynomial_quotient_ring.py.orig 2014-08-13 11:16:54.407162305 -0300 ++++ src/sage/rings/polynomial/polynomial_quotient_ring.py 2014-08-13 11:16:57.574162427 -0300 +@@ -1234,11 +1234,11 @@ class PolynomialQuotientRing_generic(sag sage: L. = K['y'].quotient(y^3 + 5); L Univariate Quotient Polynomial Ring in b over Number Field in a with defining polynomial x^2 + 3 with modulus y^3 + 5 sage: L.S_units([]) @@ -7601,7 +7577,7 @@ index 8d9975d..99bec5a 100644 Note that all the returned values live where we expect them to:: -@@ -1314,14 +1314,14 @@ class PolynomialQuotientRing_generic(sage.rings.commutative_ring.CommutativeRing +@@ -1314,14 +1314,14 @@ class PolynomialQuotientRing_generic(sag sage: L. = K['y'].quotient(y^3 + 5); L Univariate Quotient Polynomial Ring in b over Number Field in a with defining polynomial x^2 + 3 with modulus y^3 + 5 sage: L.units() @@ -7618,11 +7594,10 @@ index 8d9975d..99bec5a 100644 Note that all the returned values live where we expect them to:: -diff --git a/src/sage/rings/polynomial/polynomial_rational_flint.pyx b/src/sage/rings/polynomial/polynomial_rational_flint.pyx -index 0c13ffe..e84e148 100644 ---- a/src/sage/rings/polynomial/polynomial_rational_flint.pyx -+++ b/src/sage/rings/polynomial/polynomial_rational_flint.pyx -@@ -1568,9 +1568,9 @@ cdef class Polynomial_rational_flint(Polynomial): +diff -up src/sage/rings/polynomial/polynomial_rational_flint.pyx.orig src/sage/rings/polynomial/polynomial_rational_flint.pyx +--- src/sage/rings/polynomial/polynomial_rational_flint.pyx.orig 2014-08-13 11:16:54.410162306 -0300 ++++ src/sage/rings/polynomial/polynomial_rational_flint.pyx 2014-08-13 11:16:57.575162427 -0300 +@@ -1604,9 +1604,9 @@ cdef class Polynomial_rational_flint(Pol sage: R. = QQ[] sage: f = x^3 - 2 sage: f.factor_padic(2) @@ -7634,11 +7609,10 @@ index 0c13ffe..e84e148 100644 sage: f.factor_padic(5) ((1 + O(5^10))*x + (2 + 4*5 + 2*5^2 + 2*5^3 + 5^4 + 3*5^5 + 4*5^7 + 2*5^8 + 5^9 + O(5^10))) * ((1 + O(5^10))*x^2 + (3 + 2*5^2 + 2*5^3 + 3*5^4 + 5^5 + 4*5^6 + 2*5^8 + 3*5^9 + O(5^10))*x + (4 + 5 + 2*5^2 + 4*5^3 + 4*5^4 + 3*5^5 + 3*5^6 + 4*5^7 + 4*5^9 + O(5^10))) -diff --git a/src/sage/rings/qqbar.py b/src/sage/rings/qqbar.py -index 7f5653e..1038bcb 100644 ---- a/src/sage/rings/qqbar.py -+++ b/src/sage/rings/qqbar.py -@@ -1635,7 +1635,7 @@ def do_polred(poly): +diff -up src/sage/rings/qqbar.py.orig src/sage/rings/qqbar.py +--- src/sage/rings/qqbar.py.orig 2014-08-13 11:16:54.412162306 -0300 ++++ src/sage/rings/qqbar.py 2014-08-13 11:16:57.576162427 -0300 +@@ -1637,7 +1637,7 @@ def do_polred(poly): sage: do_polred(x^2 - x - 11) (1/3*x + 1/3, 3*x - 1, x^2 - x - 1) sage: do_polred(x^3 + 123456) @@ -7647,7 +7621,7 @@ index 7f5653e..1038bcb 100644 This shows that :trac:`13054` has been fixed:: -@@ -1887,11 +1887,11 @@ def number_field_elements_from_algebraics(numbers, minimal=False): +@@ -1889,11 +1889,11 @@ def number_field_elements_from_algebraic elements, and then mapping them back into ``QQbar``:: sage: (fld,nums,hom) = number_field_elements_from_algebraics((rt2, rt3, qqI, z3)) @@ -7664,7 +7638,7 @@ index 7f5653e..1038bcb 100644 sage: (nfrt2, nfrt3, nfI, nfz3) = nums sage: hom(nfrt2) 1.414213562373095? + 0.?e-18*I -@@ -1904,7 +1904,8 @@ def number_field_elements_from_algebraics(numbers, minimal=False): +@@ -1906,7 +1906,8 @@ def number_field_elements_from_algebraic sage: nfI^2 -1 sage: sum = nfrt2 + nfrt3 + nfI + nfz3; sum @@ -7674,11 +7648,10 @@ index 7f5653e..1038bcb 100644 sage: hom(sum) 2.646264369941973? + 1.866025403784439?*I sage: hom(sum) == rt2 + rt3 + qqI + z3 -diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx -index d4e65c8..51ca79a 100644 ---- a/src/sage/rings/rational.pyx -+++ b/src/sage/rings/rational.pyx -@@ -1193,7 +1193,7 @@ cdef class Rational(sage.structure.element.FieldElement): +diff -up src/sage/rings/rational.pyx.orig src/sage/rings/rational.pyx +--- src/sage/rings/rational.pyx.orig 2014-08-13 11:16:54.415162306 -0300 ++++ src/sage/rings/rational.pyx 2014-08-13 11:16:57.577162427 -0300 +@@ -1193,7 +1193,7 @@ cdef class Rational(sage.structure.eleme sage: 0.is_norm(K) True sage: (1/7).is_norm(K, element=True) @@ -7687,11 +7660,10 @@ index d4e65c8..51ca79a 100644 sage: (1/10).is_norm(K, element=True) (False, None) sage: (1/691).is_norm(QQ, element=True) -diff --git a/src/sage/rings/residue_field.pyx b/src/sage/rings/residue_field.pyx -index 828b638..884ff93 100644 ---- a/src/sage/rings/residue_field.pyx -+++ b/src/sage/rings/residue_field.pyx -@@ -19,13 +19,13 @@ monogenic (i.e., 2 is an essential discriminant divisor):: +diff -up src/sage/rings/residue_field.pyx.orig src/sage/rings/residue_field.pyx +--- src/sage/rings/residue_field.pyx.orig 2014-08-13 11:16:54.417162306 -0300 ++++ src/sage/rings/residue_field.pyx 2014-08-13 11:16:57.577162427 -0300 +@@ -19,13 +19,13 @@ monogenic (i.e., 2 is an essential discr sage: K. = NumberField(x^3 + x^2 - 2*x + 8) sage: F = K.factor(2); F @@ -7708,7 +7680,7 @@ index 828b638..884ff93 100644 We can also form residue fields from `\ZZ`:: -@@ -254,9 +254,9 @@ class ResidueFieldFactory(UniqueFactory): +@@ -254,9 +254,9 @@ class ResidueFieldFactory(UniqueFactory) the index of ``ZZ[a]`` in the maximal order for all ``a``:: sage: K. = NumberField(x^3 + x^2 - 2*x + 8); P = K.ideal(2).factor()[0][0]; P @@ -7720,7 +7692,7 @@ index 828b638..884ff93 100644 sage: F(a) 0 sage: B = K.maximal_order().basis(); B -@@ -266,7 +266,7 @@ class ResidueFieldFactory(UniqueFactory): +@@ -266,7 +266,7 @@ class ResidueFieldFactory(UniqueFactory) sage: F(B[2]) 0 sage: F @@ -7798,7 +7770,7 @@ index 828b638..884ff93 100644 To: Number Field in a with defining polynomial x^5 - 5*x + 2 sage: s(k.gen()) a -@@ -1223,7 +1223,7 @@ cdef class ResidueFieldHomomorphism_global(RingHomomorphism): +@@ -1223,7 +1223,7 @@ cdef class ResidueFieldHomomorphism_glob sage: f = k.coerce_map_from(K.ring_of_integers()) sage: s = f.section(); s Lifting map: @@ -7807,11 +7779,10 @@ index 828b638..884ff93 100644 To: Maximal Order in Number Field in a with defining polynomial x^5 - 5*x + 2 sage: s(k.gen()) a -diff --git a/src/sage/schemes/elliptic_curves/ell_generic.py b/src/sage/schemes/elliptic_curves/ell_generic.py -index 1c3b2bb..be2fd62 100644 ---- a/src/sage/schemes/elliptic_curves/ell_generic.py -+++ b/src/sage/schemes/elliptic_curves/ell_generic.py -@@ -565,7 +565,7 @@ class EllipticCurve_generic(plane_curve.ProjectiveCurve_generic): +diff -up src/sage/schemes/elliptic_curves/ell_generic.py.orig src/sage/schemes/elliptic_curves/ell_generic.py +--- src/sage/schemes/elliptic_curves/ell_generic.py.orig 2014-08-13 11:16:54.419162306 -0300 ++++ src/sage/schemes/elliptic_curves/ell_generic.py 2014-08-13 11:16:57.578162427 -0300 +@@ -527,7 +527,7 @@ class EllipticCurve_generic(WithEquality sage: E = EllipticCurve([0,0,0,-49,0]) sage: T = E.torsion_subgroup() sage: [E(t) for t in T] @@ -7820,7 +7791,7 @@ index 1c3b2bb..be2fd62 100644 :: -@@ -2923,26 +2923,24 @@ class EllipticCurve_generic(plane_curve.ProjectiveCurve_generic): +@@ -2866,26 +2866,24 @@ class EllipticCurve_generic(WithEquality Over a finite field:: sage: EllipticCurve(GF(41),[2,5]).pari_curve() @@ -7851,7 +7822,7 @@ index 1c3b2bb..be2fd62 100644 """ try: return self._pari_curve -@@ -2965,13 +2963,11 @@ class EllipticCurve_generic(plane_curve.ProjectiveCurve_generic): +@@ -2908,13 +2906,11 @@ class EllipticCurve_generic(WithEquality sage: E = EllipticCurve('11a1') sage: pari(E) @@ -7867,11 +7838,10 @@ index 1c3b2bb..be2fd62 100644 + [0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, Vecsmall([4]), [1, [[Vecsmall([0, 1]), Vecsmall([0, 1]), Vecsmall([0, 1])], Vecsmall([0, 1]), [Vecsmall([0, 1]), Vecsmall([0]), Vecsmall([0]), Vecsmall([0])]]], [0, 0, 0, 0]] """ return self.pari_curve() -diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py -index eff2c0a..c8a23be 100644 ---- a/src/sage/schemes/elliptic_curves/ell_number_field.py -+++ b/src/sage/schemes/elliptic_curves/ell_number_field.py -@@ -281,8 +281,10 @@ class EllipticCurve_number_field(EllipticCurve_field): +diff -up src/sage/schemes/elliptic_curves/ell_number_field.py.orig src/sage/schemes/elliptic_curves/ell_number_field.py +--- src/sage/schemes/elliptic_curves/ell_number_field.py.orig 2014-08-13 11:16:54.422162306 -0300 ++++ src/sage/schemes/elliptic_curves/ell_number_field.py 2014-08-13 11:16:57.578162427 -0300 +@@ -259,8 +259,10 @@ class EllipticCurve_number_field(Ellipti A = 0 B = Mod(1, y^2 + 7) C = Mod(y, y^2 + 7) @@ -7883,7 +7853,7 @@ index eff2c0a..c8a23be 100644 Computing the Selmer group #LS2gen = 2 LS2gen = [Mod(Mod(-5, y^2 + 7)*x^2 + Mod(-3*y, y^2 + 7)*x + Mod(8, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7)), Mod(Mod(1, y^2 + 7)*x^2 + Mod(1/2*y - 1/2, y^2 + 7)*x - 1, x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7))] -@@ -296,7 +298,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -274,7 +276,7 @@ class EllipticCurve_number_field(Ellipti zc*z1^2 = Mod(Mod(2*y - 2, y^2 + 7)*x + Mod(2*y + 10, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7)) quartic: (-1/2*y + 1/2)*Y^2 = x^4 + (-3*y - 15)*x^2 + (-8*y - 16)*x + (-11/2*y - 15/2) reduced: Y^2 = (-1/2*y + 1/2)*x^4 - 4*x^3 + (-3*y + 3)*x^2 + (2*y - 2)*x + (1/2*y + 3/2) @@ -7892,7 +7862,7 @@ index eff2c0a..c8a23be 100644 zc = Mod(Mod(1, y^2 + 7)*x^2 + Mod(1/2*y + 1/2, y^2 + 7)*x + Mod(-1, y^2 + 7), x^3 + Mod(1, y^2 + 7)*x + Mod(y, y^2 + 7)) comes from the trivial point [Mod(1/2*y + 3/2, y^2 + 7), Mod(-y - 2, y^2 + 7)] m1 = 1 -@@ -336,8 +338,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -314,8 +316,7 @@ class EllipticCurve_number_field(Ellipti sage: K = CyclotomicField(43).subfields(3)[0][0] sage: E = EllipticCurve(K, '37') sage: E.simon_two_descent() # long time (4s on sage.math, 2013) @@ -7902,7 +7872,7 @@ index eff2c0a..c8a23be 100644 """ verbose = int(verbose) if known_points is None: -@@ -380,7 +381,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -358,7 +359,7 @@ class EllipticCurve_number_field(Ellipti - ``map`` -- (default: ``False``) also return an embedding of the :meth:`base_field` into the resulting field. @@ -7911,7 +7881,7 @@ index eff2c0a..c8a23be 100644 :func:`sage.rings.number_field.splitting_field.splitting_field`. OUTPUT: -@@ -840,7 +841,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -818,7 +819,7 @@ class EllipticCurve_number_field(Ellipti sage: K. = NumberField(x^2 + 161*x - 150) sage: E = EllipticCurve([25105/216*v - 3839/36, 634768555/7776*v - 98002625/1296, 634768555/7776*v - 98002625/1296, 0, 0]) sage: E.global_integral_model() @@ -7920,7 +7890,7 @@ index eff2c0a..c8a23be 100644 :trac:`14476`:: -@@ -970,7 +971,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -948,7 +949,7 @@ class EllipticCurve_number_field(Ellipti sage: K. = NumberField(x^2+1) sage: E = EllipticCurve([1 + i, 0, 1, 0, 0]) sage: E.local_data() @@ -7929,7 +7899,7 @@ index eff2c0a..c8a23be 100644 Reduction type: bad non-split multiplicative Local minimal model: Elliptic Curve defined by y^2 + (i+1)*x*y + y = x^3 over Number Field in i with defining polynomial x^2 + 1 Minimal discriminant valuation: 1 -@@ -1530,7 +1531,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -1508,7 +1509,7 @@ class EllipticCurve_number_field(Ellipti Fractional ideal (21*i - 3) sage: K.=NumberField(x^2-x+3) sage: EllipticCurve([1 + a , -1 + a , 1 + a , -11 + a , 5 -9*a ]).conductor() @@ -7938,7 +7908,7 @@ index eff2c0a..c8a23be 100644 A not so well known curve with everywhere good reduction:: -@@ -2139,7 +2140,7 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -2117,7 +2118,7 @@ class EllipticCurve_number_field(Ellipti sage: E.gens(lim1=1, lim3=1) [] sage: E.rank(), E.gens() # long time (about 3 s) @@ -7947,7 +7917,7 @@ index eff2c0a..c8a23be 100644 Here is a curve of rank 2, yet the list contains many points:: -@@ -2315,10 +2316,10 @@ class EllipticCurve_number_field(EllipticCurve_field): +@@ -2310,10 +2311,10 @@ class EllipticCurve_number_field(Ellipti sage: K. = QuadraticField(-1) sage: E1 = EllipticCurve([i + 1, 0, 1, -240*i - 400, -2869*i - 2627]) sage: E1.conductor() @@ -7960,11 +7930,10 @@ index eff2c0a..c8a23be 100644 sage: E1.is_isogenous(E2) # long time (2s on sage.math, 2014) Traceback (most recent call last): ... -diff --git a/src/sage/schemes/elliptic_curves/ell_point.py b/src/sage/schemes/elliptic_curves/ell_point.py -index 78b99fa..33fc802 100644 ---- a/src/sage/schemes/elliptic_curves/ell_point.py -+++ b/src/sage/schemes/elliptic_curves/ell_point.py -@@ -2266,7 +2266,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field): +diff -up src/sage/schemes/elliptic_curves/ell_point.py.orig src/sage/schemes/elliptic_curves/ell_point.py +--- src/sage/schemes/elliptic_curves/ell_point.py.orig 2014-08-13 11:16:54.424162306 -0300 ++++ src/sage/schemes/elliptic_curves/ell_point.py 2014-08-13 11:16:57.579162427 -0300 +@@ -2266,7 +2266,7 @@ class EllipticCurvePoint_number_field(El sage: E.discriminant().support() [Fractional ideal (i + 1), Fractional ideal (-i - 2), @@ -7973,7 +7942,7 @@ index 78b99fa..33fc802 100644 Fractional ideal (3)] sage: [E.tamagawa_exponent(p) for p in E.discriminant().support()] [1, 4, 4, 4] -@@ -2651,7 +2651,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field): +@@ -2651,7 +2651,7 @@ class EllipticCurvePoint_number_field(El Emin = E.minimal_model() iso = E.isomorphism_to(Emin) P = iso(self) @@ -7982,7 +7951,7 @@ index 78b99fa..33fc802 100644 height = rings.RealField(precision)(h) else: height = (self.non_archimedean_local_height(prec=precision) -@@ -3192,7 +3192,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field): +@@ -3192,7 +3192,7 @@ class EllipticCurvePoint_number_field(El E_work = EllipticCurve(ai) # defined over RR pt_pari = pari([emb(x), emb(y)]) working_prec = precision @@ -7991,7 +7960,7 @@ index 78b99fa..33fc802 100644 log_pari = E_pari.ellpointtoz(pt_pari, precision=working_prec) while prec_words_to_bits(log_pari.precision()) < precision: -@@ -3206,7 +3206,7 @@ class EllipticCurvePoint_number_field(EllipticCurvePoint_field): +@@ -3206,7 +3206,7 @@ class EllipticCurvePoint_number_field(El ai = [emb(a) for a in E.a_invariants()] E_work = EllipticCurve(ai) # defined over RR pt_pari = pari([emb(x), emb(y)]) @@ -8000,11 +7969,10 @@ index 78b99fa..33fc802 100644 log_pari = E_pari.ellpointtoz(pt_pari, precision=working_prec) # normalization step -diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py -index c831c7f..913d408 100644 ---- a/src/sage/schemes/elliptic_curves/ell_rational_field.py -+++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py -@@ -592,17 +592,9 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): +diff -up src/sage/schemes/elliptic_curves/ell_rational_field.py.orig src/sage/schemes/elliptic_curves/ell_rational_field.py +--- src/sage/schemes/elliptic_curves/ell_rational_field.py.orig 2014-08-13 11:16:54.426162306 -0300 ++++ src/sage/schemes/elliptic_curves/ell_rational_field.py 2014-08-13 11:16:57.580162427 -0300 +@@ -562,17 +562,9 @@ class EllipticCurve_rational_field(Ellip INPUT: @@ -8024,7 +7992,7 @@ index c831c7f..913d408 100644 EXAMPLES:: -@@ -618,84 +610,57 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): +@@ -588,85 +580,55 @@ class EllipticCurve_rational_field(Ellip :: sage: E = EllipticCurve(RationalField(), ['1/3', '2/3']) @@ -8046,7 +8014,8 @@ index c831c7f..913d408 100644 + When doing certain computations, PARI caches the results:: sage: E = EllipticCurve('37a1') - sage: Epari = E.pari_curve() + sage: _ = E.__dict__.pop('_pari_curve') # clear cached data +- sage: Epari = E.pari_curve() - sage: Epari[14].python().prec() - 64 - sage: [a.precision() for a in Epari] @@ -8078,9 +8047,9 @@ index c831c7f..913d408 100644 - ... - PariError: precision too low in ellinit - sage: E.pari_curve() # automatically choose the right precision +- [4382696457564794691603442338788106497, 28, 3992, 16777216, 298, ...] +- sage: E.minimal_model() + sage: E.pari_curve() - [4382696457564794691603442338788106497, 28, 3992, 16777216, 298, ...] - sage: E.minimal_model() Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 7686423934083797390675981169229171907674183588326184511391146727143672423167091484392497987721106542488224058921302964259990799229848935835464702*x + 8202280443553761483773108648734271851215988504820214784899752662100459663011709992446860978259617135893103951840830254045837355547141096270521198994389833928471736723050112419004202643591202131091441454709193394358885 over Rational Field - """ - try: @@ -8142,7 +8111,7 @@ index c831c7f..913d408 100644 def pari_mincurve(self, prec=None, factor=1): """ -@@ -704,16 +669,9 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): +@@ -675,16 +637,9 @@ class EllipticCurve_rational_field(Ellip INPUT: @@ -8161,7 +8130,7 @@ index c831c7f..913d408 100644 EXAMPLES:: -@@ -724,29 +682,21 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): +@@ -695,29 +650,21 @@ class EllipticCurve_rational_field(Ellip sage: E.conductor() 47232 sage: e.ellglobalred() @@ -8201,9 +8170,9 @@ index c831c7f..913d408 100644 + self._pari_mincurve = mc + return self._pari_mincurve - def database_curve(self): - """ -@@ -3705,12 +3655,12 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): + @cached_method + def database_attributes(self): +@@ -3716,12 +3663,12 @@ class EllipticCurve_rational_field(Ellip Torsion Subgroup isomorphic to Z/2 + Z/8 associated to the Elliptic Curve defined by y^2 = x^3 - 1386747*x + 368636886 over Rational Field @@ -8218,7 +8187,7 @@ index c831c7f..913d408 100644 """ try: return self.__torsion_subgroup -@@ -3745,10 +3695,10 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): +@@ -3756,10 +3703,10 @@ class EllipticCurve_rational_field(Ellip sage: EllipticCurve('37b').torsion_points() [(0 : 1 : 0), (8 : -19 : 1), (8 : 18 : 1)] @@ -8232,7 +8201,7 @@ index c831c7f..913d408 100644 Torsion Subgroup isomorphic to Z/2 + Z/8 associated to the Elliptic Curve defined by y^2 = x^3 - 1386747*x + 368636886 over Rational Field sage: T == E.torsion_subgroup(algorithm="doud") True -@@ -3756,33 +3706,54 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): +@@ -3767,33 +3714,54 @@ class EllipticCurve_rational_field(Ellip True sage: E.torsion_points() [(-1293 : 0 : 1), @@ -8311,11 +8280,10 @@ index c831c7f..913d408 100644 @cached_method def root_number(self, p=None): """ -diff --git a/src/sage/schemes/elliptic_curves/ell_torsion.py b/src/sage/schemes/elliptic_curves/ell_torsion.py -index 050b7fa..6cac604 100644 ---- a/src/sage/schemes/elliptic_curves/ell_torsion.py -+++ b/src/sage/schemes/elliptic_curves/ell_torsion.py -@@ -44,7 +44,7 @@ class EllipticCurveTorsionSubgroup(groups.AdditiveAbelianGroupWrapper): +diff -up src/sage/schemes/elliptic_curves/ell_torsion.py.orig src/sage/schemes/elliptic_curves/ell_torsion.py +--- src/sage/schemes/elliptic_curves/ell_torsion.py.orig 2014-08-13 11:16:54.429162306 -0300 ++++ src/sage/schemes/elliptic_curves/ell_torsion.py 2014-08-13 11:16:57.580162427 -0300 +@@ -44,7 +44,7 @@ class EllipticCurveTorsionSubgroup(group sage: G.order() 4 sage: G.gen(0) @@ -8324,7 +8292,7 @@ index 050b7fa..6cac604 100644 sage: G.gen(1) (0 : 0 : 1) sage: G.ngens() -@@ -81,7 +81,7 @@ class EllipticCurveTorsionSubgroup(groups.AdditiveAbelianGroupWrapper): +@@ -81,7 +81,7 @@ class EllipticCurveTorsionSubgroup(group sage: E = EllipticCurve([0,0,0,-49,0]) sage: T = E.torsion_subgroup() sage: [E(t) for t in T] @@ -8333,7 +8301,7 @@ index 050b7fa..6cac604 100644 An example where the torsion subgroup is trivial:: -@@ -166,23 +166,15 @@ class EllipticCurveTorsionSubgroup(groups.AdditiveAbelianGroupWrapper): +@@ -166,23 +166,15 @@ class EllipticCurveTorsionSubgroup(group if self.__K is RationalField() and algorithm in pari_torsion_algorithms: flag = pari_torsion_algorithms.index(algorithm) @@ -8366,10 +8334,9 @@ index 050b7fa..6cac604 100644 T1 = E(0) # these will be the two generators T2 = E(0) -diff --git a/src/sage/schemes/elliptic_curves/heegner.py b/src/sage/schemes/elliptic_curves/heegner.py -index d1a114d..5af7988 100644 ---- a/src/sage/schemes/elliptic_curves/heegner.py -+++ b/src/sage/schemes/elliptic_curves/heegner.py +diff -up src/sage/schemes/elliptic_curves/heegner.py.orig src/sage/schemes/elliptic_curves/heegner.py +--- src/sage/schemes/elliptic_curves/heegner.py.orig 2014-08-13 11:16:54.431162306 -0300 ++++ src/sage/schemes/elliptic_curves/heegner.py 2014-08-13 11:16:57.581162427 -0300 @@ -22,7 +22,7 @@ EXAMPLES:: 1 sage: K. = QuadraticField(-8) @@ -8379,10 +8346,9 @@ index d1a114d..5af7988 100644 Next try an inert prime:: -diff --git a/src/sage/schemes/elliptic_curves/lseries_ell.py b/src/sage/schemes/elliptic_curves/lseries_ell.py -index 1f4905d..02b1358 100644 ---- a/src/sage/schemes/elliptic_curves/lseries_ell.py -+++ b/src/sage/schemes/elliptic_curves/lseries_ell.py +diff -up src/sage/schemes/elliptic_curves/lseries_ell.py.orig src/sage/schemes/elliptic_curves/lseries_ell.py +--- src/sage/schemes/elliptic_curves/lseries_ell.py.orig 2014-08-13 11:16:54.433162306 -0300 ++++ src/sage/schemes/elliptic_curves/lseries_ell.py 2014-08-13 11:16:57.581162427 -0300 @@ -67,8 +67,8 @@ class Lseries_ell(SageObject): sage: E = EllipticCurve('389a') sage: L = E.lseries() @@ -8403,10 +8369,9 @@ index 1f4905d..02b1358 100644 """ sqrtN = sqrt(self.__E.conductor()) if k: -diff --git a/src/sage/schemes/elliptic_curves/modular_parametrization.py b/src/sage/schemes/elliptic_curves/modular_parametrization.py -index 91833f8..a5ea060 100644 ---- a/src/sage/schemes/elliptic_curves/modular_parametrization.py -+++ b/src/sage/schemes/elliptic_curves/modular_parametrization.py +diff -up src/sage/schemes/elliptic_curves/modular_parametrization.py.orig src/sage/schemes/elliptic_curves/modular_parametrization.py +--- src/sage/schemes/elliptic_curves/modular_parametrization.py.orig 2014-08-13 11:16:54.435162306 -0300 ++++ src/sage/schemes/elliptic_curves/modular_parametrization.py 2014-08-13 11:16:57.582162427 -0300 @@ -245,9 +245,9 @@ class ModularParameterization: EXAMPLES:: @@ -8447,11 +8412,10 @@ index 91833f8..a5ea060 100644 + XY = self._E.pari_mincurve().elltaniyama(prec-1) return R(XY[0]),R(XY[1]) - -diff --git a/src/sage/schemes/elliptic_curves/period_lattice.py b/src/sage/schemes/elliptic_curves/period_lattice.py -index 227b32f..ef66865 100644 ---- a/src/sage/schemes/elliptic_curves/period_lattice.py -+++ b/src/sage/schemes/elliptic_curves/period_lattice.py -@@ -530,12 +530,12 @@ class PeriodLattice_ell(PeriodLattice): +diff -up src/sage/schemes/elliptic_curves/period_lattice.py.orig src/sage/schemes/elliptic_curves/period_lattice.py +--- src/sage/schemes/elliptic_curves/period_lattice.py.orig 2014-08-13 11:16:54.438162307 -0300 ++++ src/sage/schemes/elliptic_curves/period_lattice.py 2014-08-13 11:16:57.582162427 -0300 +@@ -591,12 +591,12 @@ class PeriodLattice_ell(PeriodLattice): if algorithm=='pari': if self.E.base_field() is QQ: @@ -8467,7 +8431,7 @@ index 227b32f..ef66865 100644 return (R(periods[0]), C(periods[1])) if algorithm!='sage': -@@ -937,9 +937,9 @@ class PeriodLattice_ell(PeriodLattice): +@@ -998,9 +998,9 @@ class PeriodLattice_ell(PeriodLattice): if prec is None: prec = RealField().precision() try: @@ -8479,11 +8443,10 @@ index 227b32f..ef66865 100644 def curve(self): r""" -diff --git a/src/sage/schemes/plane_conics/con_number_field.py b/src/sage/schemes/plane_conics/con_number_field.py -index 4ae48d8..b241d81 100644 ---- a/src/sage/schemes/plane_conics/con_number_field.py -+++ b/src/sage/schemes/plane_conics/con_number_field.py -@@ -124,7 +124,7 @@ class ProjectiveConic_number_field(ProjectiveConic_field): +diff -up src/sage/schemes/plane_conics/con_number_field.py.orig src/sage/schemes/plane_conics/con_number_field.py +--- src/sage/schemes/plane_conics/con_number_field.py.orig 2014-08-13 11:16:54.440162307 -0300 ++++ src/sage/schemes/plane_conics/con_number_field.py 2014-08-13 11:16:57.582162427 -0300 +@@ -124,7 +124,7 @@ class ProjectiveConic_number_field(Proje sage: C.has_rational_point(algorithm = 'local', read_cache = False) True @@ -8492,12 +8455,11 @@ index 4ae48d8..b241d81 100644 sage: K. = QuadraticField(-1) sage: C = Conic(K, [1, 3, -5]) -diff --git a/src/sage/symbolic/constants.py b/src/sage/symbolic/constants.py -index 6f76834..a91c008 100644 ---- a/src/sage/symbolic/constants.py -+++ b/src/sage/symbolic/constants.py +diff -up src/sage/symbolic/constants.py.orig src/sage/symbolic/constants.py +--- src/sage/symbolic/constants.py.orig 2014-08-13 11:16:54.442162307 -0300 ++++ src/sage/symbolic/constants.py 2014-08-13 11:16:57.583162427 -0300 @@ -851,7 +851,7 @@ class Log2(Constant): - .6931471805599453 + 0.6931471805599453 sage: gp(log2) 0.6931471805599453094172321215 # 32-bit - 0.69314718055994530941723212145817656808 # 64-bit @@ -8505,24 +8467,22 @@ index 6f76834..a91c008 100644 sage: RealField(150)(2).log() 0.69314718055994530941723212145817656807550013 """ -diff --git a/src/sage/symbolic/integration/integral.py b/src/sage/symbolic/integration/integral.py -index d092529..901acf0 100644 ---- a/src/sage/symbolic/integration/integral.py -+++ b/src/sage/symbolic/integration/integral.py -@@ -677,7 +677,7 @@ def integrate(expression, v=None, a=None, b=None, algorithm=None): +diff -up src/sage/symbolic/integration/integral.py.orig src/sage/symbolic/integration/integral.py +--- src/sage/symbolic/integration/integral.py.orig 2014-08-13 11:16:54.444162307 -0300 ++++ src/sage/symbolic/integration/integral.py 2014-08-13 11:16:57.583162427 -0300 +@@ -678,7 +678,7 @@ def integrate(expression, v=None, a=None Check that :trac:`11737` is fixed:: sage: N(integrate(sin(x^2)/(x^2), x, 1, infinity)) - 0.285736646322858 + 0.285736646322853 - """ - expression, v, a, b = _normalize_integral_input(expression, v, a, b) -diff --git a/src/sage/tests/parigp.py b/src/sage/tests/parigp.py -index e58d427..6077db3 100644 ---- a/src/sage/tests/parigp.py -+++ b/src/sage/tests/parigp.py -@@ -6,7 +6,7 @@ Check that :trac:`9876` has been fixed, this test comes from PARI's + Check that :trac:`14209` is fixed:: + +diff -up src/sage/tests/parigp.py.orig src/sage/tests/parigp.py +--- src/sage/tests/parigp.py.orig 2014-08-13 11:16:54.446162307 -0300 ++++ src/sage/tests/parigp.py 2014-08-13 11:16:57.583162427 -0300 +@@ -6,7 +6,7 @@ Check that :trac:`9876` has been fixed, self-test "rnfkummer":: sage: pari('setrand(1); lift(rnfkummer(bnrinit(bnfinit(y^4-52*y^2+26,1),3,1),Mat(5)))') # long time (4s on sage.math, 2011) @@ -8531,7 +8491,7 @@ index e58d427..6077db3 100644 Check that :trac:`10195` (PARI bug 1153) has been fixed:: -@@ -48,7 +48,7 @@ Check that the optional PARI databases work:: +@@ -48,7 +48,7 @@ Check that the optional PARI databases w [x^212 + (-y^7 + 5207*y^6 - 10241606*y^5 + 9430560101*y^4 - 4074860204015*y^3 + 718868274900397*y^2 - 34897101275826114*y + 104096378056356968)*x^211... The following requires the modular polynomials up to degree 223, while @@ -8540,7 +8500,7 @@ index e58d427..6077db3 100644 sage: p = next_prime(2^328) sage: E = EllipticCurve(GF(p), [6,1]) -@@ -56,7 +56,7 @@ only those up to degree 199 come standard in Sage: +@@ -56,7 +56,7 @@ only those up to degree 199 come standar 546812681195752981093125556779405341338292357723293496548601032930284335897180749997402596957976244 Create a number field with Galois group `A4`. Group `A4` corresponds to @@ -8549,5 +8509,3 @@ index e58d427..6077db3 100644 sage: R. = PolynomialRing(ZZ) sage: pol = pari("galoisgetpol(12,3)[1]") # optional -- database_pari --- -cgit v0.9.2 diff --git a/sagemath-png.patch b/sagemath-png.patch index 4ea39c1..d7cc39a 100644 --- a/sagemath-png.patch +++ b/sagemath-png.patch @@ -1,6 +1,7 @@ ---- src/module_list.py.orig 2014-05-10 15:46:32.570195300 -0300 -+++ src/module_list.py 2014-05-10 15:46:44.964194411 -0300 -@@ -1058,7 +1058,7 @@ ext_modules = [ +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2014-08-12 14:10:45.498956328 -0300 ++++ src/module_list.py 2014-08-12 14:10:53.082956619 -0300 +@@ -1065,7 +1065,7 @@ ext_modules = [ Extension('sage.matrix.matrix_mod2_dense', sources = ['sage/matrix/matrix_mod2_dense.pyx'], @@ -9,7 +10,7 @@ extra_compile_args = m4ri_extra_compile_args, depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]), -@@ -1354,7 +1354,7 @@ ext_modules = [ +@@ -1360,7 +1360,7 @@ ext_modules = [ Extension('sage.modules.vector_mod2_dense', sources = ['sage/modules/vector_mod2_dense.pyx'], @@ -18,7 +19,7 @@ extra_compile_args = m4ri_extra_compile_args, depends = [SAGE_INC + "/png.h", SAGE_INC + "/m4ri/m4ri.h"]), -@@ -1860,7 +1860,7 @@ ext_modules = [ +@@ -1876,7 +1876,7 @@ ext_modules = [ Extension('sage.rings.polynomial.pbori', sources = ['sage/rings/polynomial/pbori.pyx'], libraries=['polybori-' + polybori_major_version, diff --git a/sagemath-readonly.patch b/sagemath-readonly.patch index df83765..aac8360 100644 --- a/sagemath-readonly.patch +++ b/sagemath-readonly.patch @@ -1,6 +1,7 @@ ---- src/sage/all.py.orig 2014-05-10 15:45:46.934198573 -0300 -+++ src/sage/all.py 2014-05-10 15:45:58.395197751 -0300 -@@ -327,11 +327,11 @@ def _write_started_file(): +diff -up src/sage/all.py.orig src/sage/all.py +--- src/sage/all.py.orig 2014-08-12 14:10:06.778954845 -0300 ++++ src/sage/all.py 2014-08-12 14:10:14.402955137 -0300 +@@ -316,11 +316,11 @@ def _write_started_file(): Check that the file exists when Sage is running:: diff --git a/sagemath-rpmbuild.patch b/sagemath-rpmbuild.patch index cceaf36..3a602b3 100644 --- a/sagemath-rpmbuild.patch +++ b/sagemath-rpmbuild.patch @@ -1,5 +1,6 @@ ---- src/module_list.py.orig 2014-05-10 15:38:39.635229222 -0300 -+++ src/module_list.py 2014-05-10 15:40:06.410222998 -0300 +diff -up src/module_list.py.orig src/module_list.py +--- src/module_list.py.orig 2014-08-13 11:34:14.739202143 -0300 ++++ src/module_list.py 2014-08-13 11:34:18.828202300 -0300 @@ -5,7 +5,7 @@ from distutils.core import setup from distutils.extension import Extension from sage.env import * @@ -22,7 +23,7 @@ +numpy_depends = [get_python_lib(1) + '/numpy/core/include/numpy/_numpyconfig.h'] flint_depends = [SAGE_INC + '/flint/flint.h'] - singular_depends = [SAGE_INC + '/libsingular.h', SAGE_INC + '/givaro/givconfig.h'] + singular_depends = [SAGE_INC + '/libsingular.h'] @@ -70,7 +71,7 @@ givaro_extra_compile_args =['-D__STDC_LI ### PolyBoRi settings ######################################################### @@ -32,7 +33,7 @@ polybori_major_version = '0.8' -@@ -702,7 +703,7 @@ ext_modules = [ +@@ -710,7 +711,7 @@ ext_modules = [ sources = ['sage/libs/lcalc/lcalc_Lfunction.pyx'], libraries = ['m', 'ntl', 'mpfr', 'gmp', 'gmpxx', 'Lfunction'], @@ -41,8 +42,9 @@ extra_compile_args=["-O3", "-ffast-math"], language = 'c++'), ---- src/setup.py.orig 2014-05-10 15:40:24.650221690 -0300 -+++ src/setup.py 2014-05-10 15:43:52.993206746 -0300 +diff -up src/setup.py.orig src/setup.py +--- src/setup.py.orig 2014-08-13 11:34:14.742202143 -0300 ++++ src/setup.py 2014-08-13 11:34:55.082203688 -0300 @@ -36,11 +36,11 @@ except KeyError: compile_result_dir = None keep_going = False @@ -71,3 +73,24 @@ ############################################# +@@ -556,20 +558,6 @@ print "Discovered Python source, time: % + + + ######################################################### +-### Clean +-######################################################### +- +-print('Cleaning up stale installed files....') +-t = time.time() +-from sage_setup.clean import clean_install_dir +-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*')) +-for output_dir in output_dirs: +- print('- cleaning {0}'.format(output_dir)) +- clean_install_dir(output_dir, python_packages, python_modules, ext_modules) +-print('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) +- +- +-######################################################### + ### Distutils + ######################################################### + diff --git a/sagemath-sagedoc.patch b/sagemath-sagedoc.patch index cc1339e..db6ec03 100644 --- a/sagemath-sagedoc.patch +++ b/sagemath-sagedoc.patch @@ -1,5 +1,6 @@ ---- src/doc/common/builder.py.orig 2014-05-10 15:44:39.046203443 -0300 -+++ src/doc/common/builder.py 2014-05-10 15:45:03.225201708 -0300 +diff -up src/doc/common/builder.py.orig src/doc/common/builder.py +--- src/doc/common/builder.py.orig 2014-08-12 14:06:23.374946290 -0300 ++++ src/doc/common/builder.py 2014-08-12 14:06:47.943947231 -0300 @@ -32,7 +32,7 @@ from sage.env import SAGE_DOC, SAGE_SRC # SAGE_DOC, LANGUAGES, SPHINXOPTS, PAPER, OMIT, # PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS @@ -8,17 +9,18 @@ +execfile(os.path.join(os.getenv('SAGE_ROOT'), 'src', 'doc', 'common' , 'build_options.py')) - def print_build_error(): ---- src/doc/common/conf.py.orig 2014-05-10 15:44:59.936201944 -0300 -+++ src/doc/common/conf.py 2014-05-10 15:45:03.229201708 -0300 + def delete_empty_directories(root_dir, verbose=True): +diff -up src/doc/common/conf.py.orig src/doc/common/conf.py +--- src/doc/common/conf.py.orig 2014-08-12 14:06:23.376946291 -0300 ++++ src/doc/common/conf.py 2014-08-12 14:07:26.095948692 -0300 @@ -1,5 +1,5 @@ import sys, os, sphinx -from sage.env import SAGE_DOC +from sage.env import SAGE_DOC, SAGE_SRC + from datetime import date def get_doc_abspath(path): - """ -@@ -202,8 +202,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', ' +@@ -203,8 +203,7 @@ if (os.environ.get('SAGE_DOC_MATHJAX', ' from sage.misc.latex_macros import sage_mathjax_macros html_theme_options['mathjax_macros'] = sage_mathjax_macros() @@ -28,8 +30,9 @@ mathjax_relative = os.path.join('sagenb','data','mathjax') # It would be really nice if sphinx would copy the entire mathjax directory, ---- src/sage/doctest/control.py.orig 2014-05-10 15:44:59.940201944 -0300 -+++ src/sage/doctest/control.py 2014-05-10 15:45:03.230201708 -0300 +diff -up src/sage/doctest/control.py.orig src/sage/doctest/control.py +--- src/sage/doctest/control.py.orig 2014-08-12 14:06:23.382946291 -0300 ++++ src/sage/doctest/control.py 2014-08-12 14:08:08.384950312 -0300 @@ -89,7 +89,6 @@ class DocTestDefaults(SageObject): self.valgrind = False self.massif = False @@ -47,7 +50,7 @@ # Non-interactive debuggers: 48 hours options.timeout = int(os.getenv('SAGE_TIMEOUT_VALGRIND', 48 * 60 * 60)) elif options.long: -@@ -821,13 +820,8 @@ class DocTestController(SageObject): +@@ -822,13 +821,8 @@ class DocTestController(SageObject): elif opt.cachegrind: toolname = "cachegrind" flags = os.getenv("SAGE_CACHEGRIND_FLAGS", "") @@ -61,7 +64,7 @@ if "%s" in flags: flags %= toolname + ".%p" # replace %s with toolname cmd += flags + sage_cmd -@@ -887,10 +881,10 @@ class DocTestController(SageObject): +@@ -888,10 +882,10 @@ class DocTestController(SageObject): 0 """ opt = self.options @@ -74,9 +77,10 @@ return 2 return self.run_val_gdb() else: ---- src/sage/interfaces/singular.py.orig 2014-05-10 15:44:59.940201944 -0300 -+++ src/sage/interfaces/singular.py 2014-05-10 15:45:03.230201708 -0300 -@@ -2149,7 +2149,7 @@ def generate_docstring_dictionary(): +diff -up src/sage/interfaces/singular.py.orig src/sage/interfaces/singular.py +--- src/sage/interfaces/singular.py.orig 2014-08-12 14:06:23.391946291 -0300 ++++ src/sage/interfaces/singular.py 2014-08-12 14:08:26.055950988 -0300 +@@ -2147,7 +2147,7 @@ def generate_docstring_dictionary(): nodes.clear() node_names.clear() @@ -85,8 +89,9 @@ new_node = re.compile("File: singular\.hlp, Node: ([^,]*),.*") new_lookup = re.compile("\* ([^:]*):*([^.]*)\..*") ---- src/sage/misc/latex_macros.py.orig 2014-05-10 15:44:59.940201944 -0300 -+++ src/sage/misc/latex_macros.py 2014-05-10 15:45:03.232201708 -0300 +diff -up src/sage/misc/latex_macros.py.orig src/sage/misc/latex_macros.py +--- src/sage/misc/latex_macros.py.orig 2014-08-12 14:06:23.402946292 -0300 ++++ src/sage/misc/latex_macros.py 2014-08-12 14:08:46.103951756 -0300 @@ -142,7 +142,7 @@ def convert_latex_macro_to_mathjax(macro return name + ': ["' + defn + '",' + str(num_args) + ']' diff --git a/sagemath-scripts.patch b/sagemath-scripts.patch index 9cc19a5..0f8778f 100644 --- a/sagemath-scripts.patch +++ b/sagemath-scripts.patch @@ -1,6 +1,6 @@ diff -up src/bin/sage.orig src/bin/sage ---- src/bin/sage.orig 2014-05-26 13:29:30.741773304 -0300 -+++ src/bin/sage 2014-05-26 13:29:50.173774048 -0300 +--- src/bin/sage.orig 2014-08-12 13:51:14.714911495 -0300 ++++ src/bin/sage 2014-08-12 13:59:39.911930840 -0300 @@ -13,17 +13,14 @@ usage() { echo " file. -- run given .sage, .py or .spyx files" echo " -advanced -- list all command line options" @@ -30,10 +30,12 @@ diff -up src/bin/sage.orig src/bin/sage echo " -v, -version -- print the Sage version" exit 0 } -@@ -63,14 +56,14 @@ usage_advanced() { +@@ -61,16 +54,14 @@ usage_advanced() { + echo " -preparse -- preparse file.sage and produce corresponding file.sage.py" + echo " -q -- quiet; start with no banner" echo " -root -- print the Sage root directory" - echo " -gthread, -qthread, -q4thread, -wthread, -pylab" - echo " -- pass the option through to ipython" +- echo " -gthread, -qthread, -q4thread, -wthread, -pylab" +- echo " -- pass the option through to ipython" + echo " -testall [options] -- test all source files, docs, and examples. options" + echo " like -t" echo " -v, -version -- print the Sage version" @@ -47,13 +49,13 @@ diff -up src/bin/sage.orig src/bin/sage echo " -inotebook [...] -- start the *insecure* Sage notebook" echo " -n, -notebook [...] -- start the Sage notebook (options are the same" echo " as for the notebook command in Sage)" -@@ -87,13 +80,9 @@ usage_advanced() { +@@ -87,13 +78,8 @@ usage_advanced() { echo " -gp [...] -- run Sage's PARI/GP calculator with given arguments" echo " -ipython [...] -- run Sage's IPython using the default environment (not" echo " Sage), passing additional options to IPython" - echo " -kash [...] -- run Sage's Kash with given arguments" - command -v kash &>/dev/null || \ - echo " (not installed currently, run sage -i kash)" +- echo " (not installed currently, run sage -i kash)" echo " -lisp [...] -- run Lisp interpreter included with Sage" echo " -M2 [...] -- run Sage's Macaulay2 with given arguments" - command -v M2 &>/dev/null || \ @@ -61,7 +63,7 @@ diff -up src/bin/sage.orig src/bin/sage echo " -maxima [...] -- run Sage's Maxima with given arguments" echo " -mwrank [...] -- run Sage's mwrank with given arguments" echo " -python [...] -- run the Python interpreter" -@@ -107,80 +96,10 @@ usage_advanced() { +@@ -107,75 +93,10 @@ usage_advanced() { echo #### 1.......................26..................................................78 #### |.....................--.|...................................................| @@ -93,11 +95,6 @@ diff -up src/bin/sage.orig src/bin/sage - echo "Building and testing the Sage library:" - echo " -b [branch] -- build Sage library. If branch is given, switch to" - echo " branch in devel/sage-branch and build that branch" -- echo " -sync-build -- delete old code and other files in the Sage library" -- echo " that have already been deleted from devel/sage but" -- echo " remain in the build directory. This is sometimes" -- echo " necessary because \`sage -b\` merely copies new or" -- echo " modified files to the target directory." - echo " -ba [branch] -- same as -b and rebuild all Cython code" - echo " -ba-force [branch] -- same as -ba, but don't query before rebuilding" - echo " -br [branch] -- switch to, build, and run Sage given branch" @@ -142,13 +139,12 @@ diff -up src/bin/sage.orig src/bin/sage echo " -search_src -- search through all the Sage library code for string" echo " -search_doc -- search through the Sage documentation for string" echo " -grep -- same as -search_src" -@@ -200,17 +119,6 @@ usage_advanced() { +@@ -195,16 +116,6 @@ usage_advanced() { echo #### 1.......................26..................................................78 #### |.....................--.|...................................................| - echo "Making Sage packages or distributions:" - echo " -bdist VER -- build a binary distribution of Sage" -- echo " -combinat [...] -- run sage-combinat patch management script" - echo " -crap sage-ver.tar -- detect suspicious garbage in sage source tarball" - echo " -pkg -- create Sage package dir.spkg from a given directory" - echo " -pkg_nc -- as -pkg, but do not compress the package" @@ -160,7 +156,7 @@ diff -up src/bin/sage.orig src/bin/sage echo "Valgrind memory debugging:" echo " -cachegrind -- run Sage using Valgrind's cachegrind tool. The log" echo " files are named sage-cachegrind.PID can be found in" -@@ -224,9 +132,6 @@ usage_advanced() { +@@ -218,9 +129,6 @@ usage_advanced() { echo " -memcheck -- run Sage using Valgrind's memcheck tool. The log" echo " files are named sage-memcheck.PID can be found in" echo " $DOT_SAGE" @@ -170,10 +166,27 @@ diff -up src/bin/sage.orig src/bin/sage echo " -valgrind -- this is an alias for -memcheck" echo echo "You can also use -- before a long option, e.g., 'sage --optional'." -@@ -255,17 +160,6 @@ if [ "$1" = '-upgrade' -o "$1" = "--upgr +@@ -240,34 +148,6 @@ if [ "$1" = '--nodotsage' ]; then + exit $status fi - +-# Check for '--patchbot' before sourcing sage-env: patchbot needs +-# an unclobbered environment before testing unsafe tickets. +-if [ "$1" = '-patchbot' -o "$1" = "--patchbot" ]; then +- shift +- cd "$SAGE_ROOT" +- exec local/bin/patchbot/patchbot.py "$@" +-fi +- +-# Check for '--upgrade' before sourcing sage-env: the top-level "make" +-# should be run outside of the Sage shell, see #15517. +-if [ "$1" = '-upgrade' -o "$1" = "--upgrade" ]; then +- shift +- cd "$SAGE_ROOT" +- exec local/bin/sage-upgrade "$@" +-fi +- +- -# Source sage-env ($0 is the name of this "sage" script, so we can just -# append -env to that). We redirect stdout to stderr, which is safer -# for scripts. @@ -188,8 +201,11 @@ diff -up src/bin/sage.orig src/bin/sage if [ $# -gt 0 ]; then if [ "$1" = '-h' -o "$1" = '-?' -o "$1" = '-help' -o "$1" = '--help' ]; then usage -@@ -278,25 +172,11 @@ fi +@@ -277,28 +157,13 @@ if [ $# -gt 0 ]; then + fi + fi +- # Prepare for running Sage, either interactively or non-interactively. sage_setup() { - # Check that we're not in a source tarball which hasn't been built yet (#13561). @@ -214,10 +230,11 @@ diff -up src/bin/sage.orig src/bin/sage if [ ! -d "$IPYTHONDIR" ]; then # make sure that $DOT_SAGE exists so that ipython will happily # create its config directories there. If DOT_SAGE doesn't -@@ -307,20 +187,6 @@ sage_setup() { +@@ -308,21 +173,6 @@ sage_setup() { + sage-cleaner &>/dev/null & } - +- -# Check to see if the whole Sage install tree has moved. If so, -# change various hardcoded paths. Skip this if we don't have write -# access to $SAGE_LOCAL (e.g. when running as a different user) or @@ -235,19 +252,7 @@ diff -up src/bin/sage.orig src/bin/sage # Start an interactive Sage session, this function never returns. interactive_sage() { sage_setup -@@ -370,11 +236,6 @@ if [ "$1" = '-axiom' -o "$1" = '--axiom' - exec axiom "$@" - fi - --if [ "$1" = '-combinat' -o "$1" = '--combinat' ]; then -- shift -- exec sage-combinat "$@" --fi -- - if [ "$1" = '-gap' -o "$1" = '--gap' ]; then - shift - exec gap "$@" -@@ -387,7 +248,7 @@ fi +@@ -384,7 +234,7 @@ fi if [ "$1" = '-singular' -o "$1" = '--singular' ]; then shift @@ -256,7 +261,7 @@ diff -up src/bin/sage.orig src/bin/sage fi if [ "$1" = '-sqlite3' -o "$1" = '--sqlite3' ]; then -@@ -415,16 +276,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] +@@ -412,16 +262,6 @@ if [ "$1" = '-lisp' -o "$1" = '--lisp' ] exec ecl "$@" fi @@ -273,7 +278,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-maxima' -o "$1" = '--maxima' ]; then shift exec maxima "$@" -@@ -584,20 +435,6 @@ EOF +@@ -581,20 +421,6 @@ EOF fi ##################################################################### @@ -294,7 +299,7 @@ diff -up src/bin/sage.orig src/bin/sage # File conversion ##################################################################### -@@ -612,36 +449,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2 +@@ -609,36 +435,15 @@ if [ "$1" = '-rst2sws' -o "$1" = '--rst2 fi ##################################################################### @@ -331,7 +336,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = "-inotebook" -o "$1" = '--inotebook' ]; then shift sage-cleaner &>/dev/null & -@@ -660,58 +476,12 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep +@@ -657,40 +462,19 @@ if [ "$1" = '-grepdoc' -o "$1" = "--grep exit 0 fi @@ -352,37 +357,12 @@ diff -up src/bin/sage.orig src/bin/sage interactive_sage fi --if [ "$1" = '-ba' ]; then -- shift -- echo " *** WARNING ***" -- echo " You are about to rebuild the entire Sage library." -- echo " This will take a significant amount of time." -- echo " (Use --ba-force instead of -ba to skip this prompt.)" -- echo -n " Do you want to proceed? [y/n] " -- read CHOICE -- while [ "$CHOICE" != "y" -a "$CHOICE" != "n" ]; do -- echo -n " Choose one of y, n: " -- read CHOICE -- done -- if [ $CHOICE = 'n' ]; then -- exit 0 -- fi -- build_sage -b "$@" -- exit $? --fi -- --if [ "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then +-if [ "$1" = '-ba' -o "$1" = '-ba-force' -o "$1" = '--ba-force' ]; then - shift - build_sage -b "$@" - exit $? -fi - --if [ "$1" = '-sync-build' -o "$1" = '--sync-build' ]; then -- shift -- cd "$SAGE_ROOT" -- exec sage-sync-build.py "$@" --fi -- -if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" = '-tp' -o "$1" = '-btp' ]; then - if [ "$1" = '-bt' -o "$1" = '-btp' ]; then - build_sage @@ -391,7 +371,15 @@ diff -up src/bin/sage.orig src/bin/sage if [ ! -f "$DOT_SAGE"/init.sage ]; then echo >&2 "init.sage does not exist ... creating" touch "$DOT_SAGE"/init.sage -@@ -727,10 +497,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" + fi + SAGE_BANNER="no" + sage_setup +- if [ "$1" = '-tp' -o "$1" = '-btp' ]; then ++ if [ "$1" = '-tp' ]; then + shift + exec sage-runtests -p "$@" + else +@@ -699,10 +483,7 @@ if [ "$1" = '-t' -o "$1" = '-bt' -o "$1" fi fi @@ -403,20 +391,7 @@ diff -up src/bin/sage.orig src/bin/sage shift SAGE_BANNER="no" sage_setup -@@ -744,12 +511,6 @@ if [ "$1" = '-testall' -o "$1" = "--test - exec sage-runtests -a "$@" - fi - --if [ "$1" = '-patchbot' -o "$1" = "--patchbot" ]; then -- shift -- cd "$SAGE_ROOT" -- exec "$SAGE_LOCAL/bin/patchbot/patchbot.py" "$@" --fi -- - if [ "$1" = '-c' ]; then - shift - SAGE_BANNER="no" -@@ -758,124 +519,6 @@ if [ "$1" = '-c' ]; then +@@ -724,132 +505,6 @@ if [ "$1" = '-c' ]; then exec sage-eval "$@" fi @@ -458,6 +433,14 @@ diff -up src/bin/sage.orig src/bin/sage - exit 1 - fi - done +- # Display a message if we actually installed something (using this +- # file, generated by sage-spkg, is a bit of a hack though) +- if [ -f "$SAGE_LOCAL/lib/sage-force-relocate.txt" ]; then +- echo +- echo "Warning: it might be needed to update the Sage library before" +- echo "installed packages work: you should run 'make' from \$SAGE_ROOT" +- echo "before running Sage." +- fi - exit 0 -} - @@ -541,7 +524,7 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-gdb' -o "$1" = "--gdb" ]; then shift sage_setup -@@ -924,12 +567,6 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca +@@ -898,21 +553,10 @@ if [ "$1" = '-callgrind' -o "$1" = "--ca exec sage-callgrind "$@" fi @@ -554,9 +537,18 @@ diff -up src/bin/sage.orig src/bin/sage if [ "$1" = '-startuptime' -o "$1" = '--startuptime' ]; then exec sage-startuptime.py "$@" fi + +-if [ "$1" = '-gthread' -o "$1" = '-qthread' -o "$1" = '-q4thread' -o "$1" = '-wthread' -o "$1" = '-pylab' ]; then +- # Intentionally no "shift" here +- interactive_sage "$@" +-fi +- + if [ "$1" = '-dev' -o "$1" = "--dev" ]; then + shift + exec sage-dev "$@" diff -up src/bin/sage-runtests.orig src/bin/sage-runtests ---- src/bin/sage-runtests.orig 2014-05-26 13:29:46.150773894 -0300 -+++ src/bin/sage-runtests 2014-05-26 13:29:50.174774048 -0300 +--- src/bin/sage-runtests.orig 2014-08-12 14:00:18.705932326 -0300 ++++ src/bin/sage-runtests 2014-08-12 14:00:31.543932818 -0300 @@ -54,10 +54,6 @@ if __name__ == "__main__": help="run doctests using Valgrind's cachegrind tool. The log " "files are named sage-cachegrind.PID and can be found in " + @@ -569,8 +561,8 @@ diff -up src/bin/sage-runtests.orig src/bin/sage-runtests parser.add_option("-f", "--failed", action="store_true", default=False, help="doctest only those files that failed in the previous run") diff -up src/bin/sage-valgrind.orig src/bin/sage-valgrind ---- src/bin/sage-valgrind.orig 2014-05-26 13:29:46.152773894 -0300 -+++ src/bin/sage-valgrind 2014-05-26 13:29:50.174774048 -0300 +--- src/bin/sage-valgrind.orig 2014-08-12 14:00:41.666933205 -0300 ++++ src/bin/sage-valgrind 2014-08-12 14:01:14.983934481 -0300 @@ -11,7 +11,7 @@ fi LOG="$DOT_SAGE"/valgrind/sage-memcheck.%p echo "Log file is $LOG" diff --git a/sagemath-sphinx.patch b/sagemath-sphinx.patch index 9ba1429..bdca66d 100644 --- a/sagemath-sphinx.patch +++ b/sagemath-sphinx.patch @@ -1,7 +1,7 @@ diff -up src/sage/graphs/generic_graph.py.orig src/sage/graphs/generic_graph.py ---- src/sage/graphs/generic_graph.py.orig 2014-05-26 15:38:33.169069789 -0300 -+++ src/sage/graphs/generic_graph.py 2014-05-26 15:41:55.071077520 -0300 -@@ -9222,7 +9222,7 @@ class GenericGraph(GenericGraph_pyx): +--- src/sage/graphs/generic_graph.py.orig 2014-08-12 14:58:26.408065882 -0300 ++++ src/sage/graphs/generic_graph.py 2014-08-12 14:58:29.914066017 -0300 +@@ -9275,7 +9275,7 @@ class GenericGraph(GenericGraph_pyx): .. SEEALSO:: @@ -10,7 +10,7 @@ diff -up src/sage/graphs/generic_graph.py.orig src/sage/graphs/generic_graph.py """ for e in edges: self.subdivide_edge(e, k) -@@ -11504,10 +11504,10 @@ class GenericGraph(GenericGraph_pyx): +@@ -11557,10 +11557,10 @@ class GenericGraph(GenericGraph_pyx): .. SEEALSO:: @@ -24,7 +24,7 @@ diff -up src/sage/graphs/generic_graph.py.orig src/sage/graphs/generic_graph.py """ self._scream_if_not_simple() -@@ -13369,13 +13369,13 @@ class GenericGraph(GenericGraph_pyx): +@@ -13429,13 +13429,13 @@ class GenericGraph(GenericGraph_pyx): .. SEEALSO:: @@ -43,7 +43,7 @@ diff -up src/sage/graphs/generic_graph.py.orig src/sage/graphs/generic_graph.py EXAMPLES:: -@@ -13494,13 +13494,13 @@ class GenericGraph(GenericGraph_pyx): +@@ -13554,13 +13554,13 @@ class GenericGraph(GenericGraph_pyx): .. SEEALSO:: @@ -63,9 +63,9 @@ diff -up src/sage/graphs/generic_graph.py.orig src/sage/graphs/generic_graph.py EXAMPLES:: diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py ---- src/sage/graphs/graph.py.orig 2014-05-26 15:42:17.579078382 -0300 -+++ src/sage/graphs/graph.py 2014-05-26 16:04:45.519129999 -0300 -@@ -2704,9 +2704,9 @@ class Graph(GenericGraph): +--- src/sage/graphs/graph.py.orig 2014-08-12 14:58:26.410065882 -0300 ++++ src/sage/graphs/graph.py 2014-08-12 14:58:29.917066017 -0300 +@@ -3023,9 +3023,9 @@ class Graph(GenericGraph): .. SEEALSO:: @@ -78,7 +78,7 @@ diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py EXAMPLES:: -@@ -2751,9 +2751,9 @@ class Graph(GenericGraph): +@@ -3070,9 +3070,9 @@ class Graph(GenericGraph): .. SEEALSO:: @@ -91,7 +91,7 @@ diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py EXAMPLES:: -@@ -2788,9 +2788,9 @@ class Graph(GenericGraph): +@@ -3107,9 +3107,9 @@ class Graph(GenericGraph): .. SEEALSO:: @@ -104,7 +104,7 @@ diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py EXAMPLES: -@@ -2827,9 +2827,9 @@ class Graph(GenericGraph): +@@ -3146,9 +3146,9 @@ class Graph(GenericGraph): .. SEEALSO:: @@ -117,7 +117,7 @@ diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py EXAMPLES: -@@ -5751,8 +5751,8 @@ class Graph(GenericGraph): +@@ -6114,8 +6114,8 @@ class Graph(GenericGraph): .. SEEALSO:: @@ -128,7 +128,7 @@ diff -up src/sage/graphs/graph.py.orig src/sage/graphs/graph.py REFERENCE: -@@ -5937,7 +5937,7 @@ class Graph(GenericGraph): +@@ -6300,7 +6300,7 @@ class Graph(GenericGraph): .. SEEALSO:: diff --git a/sagemath-sympy.patch b/sagemath-sympy.patch index e900966..693ab84 100644 --- a/sagemath-sympy.patch +++ b/sagemath-sympy.patch @@ -1,7 +1,7 @@ diff -up src/sage/env.py.orig src/sage/env.py ---- src/sage/env.py.orig 2014-02-07 12:50:28.534870630 -0200 -+++ src/sage/env.py 2014-02-07 12:51:07.014872104 -0200 -@@ -85,7 +85,7 @@ _add_variable_or_fallback('HOSTNAME', +--- src/sage/env.py.orig 2014-08-12 14:24:55.730988886 -0300 ++++ src/sage/env.py 2014-08-12 14:25:03.802989196 -0300 +@@ -86,7 +86,7 @@ _add_variable_or_fallback('HOSTNAME', _add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid()) # bunch of sage directories and files diff --git a/sagemath.spec b/sagemath.spec index 22958ed..74fd547 100644 --- a/sagemath.spec +++ b/sagemath.spec @@ -38,8 +38,8 @@ Name: sagemath Group: Applications/Engineering Summary: A free open-source mathematics software system -Version: 6.2 -Release: 2%{?dist} +Version: 6.3 +Release: 1%{?dist} # The file ${SAGE_ROOT}/COPYING.txt is the upstream license breakdown file # Additionally, every $files section has a comment with the license name # before files with that license @@ -51,8 +51,6 @@ Source2: makecmds.sty # not installed by jmol package, use one in sagemath jmol spkg Source3: Jmol.js Source4: JmolHelp.html -# from jmol-12.3.27.p2 spkg -Source5: testjava.sh # 1. scons ignores most environment variables # 2. scons 2.2* does not have soname support (expected for scons 2.3*) @@ -156,7 +154,7 @@ Patch24: %{name}-sympy.patch # -k (keep-going) Patch25: %{name}-sphinx.patch -# Edited latest version from http://trac.sagemath.org/ticket/15767 +# Rediffed latest version from http://trac.sagemath.org/ticket/15767 Patch26: %{name}-pari2.7.patch BuildRequires: 4ti2 @@ -440,6 +438,16 @@ BuildArch: noarch %description doc-fr This package contains the French %{name} documentation. +#------------------------------------------------------------------------ +%package doc-it +Summary: Italian documentation files for %{name} +Group: Documentation +Requires: %{name}-doc = %{version}-%{release} +BuildArch: noarch + +%description doc-it +This package contains the Italian %{name} documentation. + #------------------------------------------------------------------------ %package doc-pt Summary: Portuguese documentation files for %{name} @@ -614,7 +622,7 @@ popd %patch24 %patch25 -%patch26 -p1 +%patch26 sed -e 's|@@SAGE_ROOT@@|%{SAGE_ROOT}|' \ -e 's|@@SAGE_DOC@@|%{SAGE_DOC}|' \ @@ -749,7 +757,6 @@ popd pushd build/pkgs/sagenb/src/%{sagenb_pkg} rm -f %{buildroot}%{python_sitearch}/sagenb/data/sage3d/sage3d python setup.py install --root=%{buildroot} --install-purelib=%{python_sitearch} - install -p -m0755 %{SOURCE5} $SAGE_LOCAL/bin/testjava.sh # jmol rm -fr %{buildroot}%{python_sitearch}/sagenb/data/jmol mkdir -p %{buildroot}%{python_sitearch}/sagenb/data/jmol/appletweb @@ -1077,6 +1084,9 @@ rm -r %{buildroot}%{python_sitearch}/sagenb/data/sage3d # remove cache files rm -r %{buildroot}%{python_sitearch}/sagenb/data/.webassets-cache +# remove sage_setup +rm -r %{buildroot}%{python_sitearch}/sage_setup + # last install command rm -fr $DOT_SAGE @@ -1127,7 +1137,6 @@ exit 0 %{SAGE_LOCAL}/bin/ecm %{SAGE_LOCAL}/bin/gap_stamp %{SAGE_LOCAL}/bin/sage* -%{SAGE_LOCAL}/bin/testjava.sh %{SAGE_LOCAL}/include %{SAGE_LOCAL}/lib %{SAGE_LOCAL}/share @@ -1223,6 +1232,11 @@ exit 0 %{SAGE_DOC}/fr %{SAGE_DOC}/output/html/fr +#------------------------------------------------------------------------ +%files doc-it +# GPLv2+ +%{SAGE_DOC}/output/html/it + #------------------------------------------------------------------------ %files doc-pt # GPLv2+ @@ -1327,6 +1341,10 @@ exit 0 ######################################################################## %changelog +* Wed Aug 13 2014 pcpa - 6.3-1 +- Update to sagemath 6.3 (#1095282) +- Add new doc-it Italian documentation subpackage + * Sun Jun 08 2014 Fedora Release Engineering - 6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index c5fdbdb..9f2f5a2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -71aa49875797c001ce0a31409f5a1762 sage-6.2.tar.gz +668f080be70ffea8d67592ca00d161eb sage-6.3.tar.gz