diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 46 | ||||
-rw-r--r-- | sagemath-lcalc2.patch | 507 | ||||
-rw-r--r-- | sagemath-lrcalc2.patch | 37 | ||||
-rw-r--r-- | sagemath-singular-4.2.1.p1.patch | 152 |
5 files changed, 169 insertions, 585 deletions
@@ -1,6 +1,6 @@ pkgbase = sagemath-git pkgdesc = Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab - pkgver = 9.5.beta7.r0.gcc60cfebc4 + pkgver = 9.5.beta8.r0.gd6d0edce10 pkgrel = 1 url = http://www.sagemath.org arch = x86_64 @@ -64,6 +64,7 @@ pkgbase = sagemath-git depends = libbraiding depends = symmetrica depends = threejs-sage + depends = primecount optdepends = cython: to compile cython code optdepends = python-pkgconfig: to compile cython code optdepends = jmol: alternative 3D plot engine @@ -87,7 +88,6 @@ pkgbase = sagemath-git optdepends = shared_meataxe: faster matrix arithmetic over finite fields optdepends = openblas: faster linear algebra optdepends = sirocco: for computing the fundamental group of the complement of a plane curve - optdepends = primecount: faster prime_pi implementation optdepends = dot2tex: for displaying some diagrams optdepends = cryptominisat5: SAT solver optdepends = python-pycosat: picosat SAT solver @@ -96,19 +96,19 @@ pkgbase = sagemath-git optdepends = python-database-knotinfo: interface to the KnotInfo and LinkInfo databases provides = sagemath conflicts = sagemath + options = debug + options = !strip source = git://git.sagemath.org/sage.git#branch=develop source = sagemath-optional-packages.patch source = latte-count.patch source = test-optional.patch source = sagemath-lrcalc2.patch - source = sagemath-lcalc2.patch source = sagemath-singular-4.2.1.p1.patch sha256sums = SKIP sha256sums = b2308f25c5e6ad330342fc365056d7aebfbba09b833e3be6fb6283061709b6a0 sha256sums = 2f310081357996b7d3bf813e63d07c0fc04d6724adbfbd1beeb554e9476e2e4c sha256sums = d1310321bf07491658e83087a6ddb0011738fa17a1dc3275d6d5c6907eaf3df8 - sha256sums = b7ebdba8612b1219011642c9bd4b377a23f402876a7d3dac90679a2bb34bbf98 - sha256sums = 791b3f2c6e5529b09c3abf2f9703b6cf754d633a7a4177645b70b72ea014135a - sha256sums = e3cdfe730d0b0f422fe837e465ecde3419b16de50bef3dd2b674f275f528ed97 + sha256sums = ede5e054c73eab9aa71285bb3a16c1f2f0e4fdc0d4645fe13912ff9489865bee + sha256sums = 1f0c44a4998ed239a3d77e3028b98b6f2c28a95e9bb4b8557523cc8f12ffba34 pkgname = sagemath-git @@ -6,7 +6,7 @@ # Contributor: Stefan Husmann <stefan-husmann at t-online dot de> pkgname=sagemath-git -pkgver=9.5.beta7.r0.gcc60cfebc4 +pkgver=9.5.beta8.r0.gd6d0edce10 pkgrel=1 pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab' arch=(x86_64) @@ -16,24 +16,35 @@ depends=(palp brial cliquer maxima-ecl gfan sympow nauty python-rpy2 python-fpyl python-matplotlib python-scipy python-sympy python-networkx python-pplpy python-sphinx python-ipywidgets python-memory-allocator gap flintqs lcalc lrcalc arb eclib zn_poly gd python-cvxopt singular linbox m4rie pari-galdata pari-seadata-small planarity rankwidth tachyon sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials - iml giac libhomfly libbraiding symmetrica threejs-sage) -optdepends=('cython: to compile cython code' 'python-pkgconfig: to compile cython code' - 'jmol: alternative 3D plot engine' 'jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook' - 'sagemath-doc: HTML documentation' 'python-igraph: igraph backend for graph theory' + iml giac libhomfly libbraiding symmetrica threejs-sage primecount) +optdepends=('cython: to compile cython code' + 'python-pkgconfig: to compile cython code' + 'jmol: alternative 3D plot engine' + 'jupyter-jsmol: alternative 3D plot engine in the Jupyter notebook' + 'sagemath-doc: HTML documentation' + 'python-igraph: igraph backend for graph theory' 'sage-numerical-backends-coin: COIN mixed integer linear programming backend' 'sage-numerical-backends-gurobi: Gurobi mixed integer linear programming backend' 'coin-or-csdp: for computing Lovász theta-function of graphs' - 'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids' - 'ffmpeg: to export animations to video' 'imagemagick: to show animations' + 'buckygen: for generating fullerene graphs' + 'plantri: for generating some classes of graphs' + 'benzene: for generating fusenes and benzenoids' + 'ffmpeg: to export animations to video' + 'imagemagick: to show animations' 'coxeter: Coxeter groups implementation' 'rubiks: Rubiks cube algorithms' 'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes' 'python-pynormaliz: Normaliz backend for polyhedral computations' - 'latte-integrale: integral point count in polyhedra' 'python-jupymake: polymake backend for polyhedral computations' - 'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra' - 'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation' - 'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python-pycosat: picosat SAT solver' - 'python-pip: to install optional packages with sage -pip' 'sage-notebook-exporter: convert flask notebooks to Jupyter' + 'latte-integrale: integral point count in polyhedra' + 'python-jupymake: polymake backend for polyhedral computations' + 'shared_meataxe: faster matrix arithmetic over finite fields' + 'openblas: faster linear algebra' + 'sirocco: for computing the fundamental group of the complement of a plane curve' + 'dot2tex: for displaying some diagrams' + 'cryptominisat5: SAT solver' + 'python-pycosat: picosat SAT solver' + 'python-pip: to install optional packages with sage -pip' + 'sage-notebook-exporter: convert flask notebooks to Jupyter' 'python-database-knotinfo: interface to the KnotInfo and LinkInfo databases') makedepends=(cython boost ratpoints python-jinja sirocco mcqd coxeter bliss tdlib python-pkgconfig shared_meataxe primecount git) conflicts=(sagemath) @@ -43,15 +54,14 @@ source=(git://git.sagemath.org/sage.git#branch=develop latte-count.patch test-optional.patch sagemath-lrcalc2.patch - sagemath-lcalc2.patch sagemath-singular-4.2.1.p1.patch) sha256sums=('SKIP' 'b2308f25c5e6ad330342fc365056d7aebfbba09b833e3be6fb6283061709b6a0' '2f310081357996b7d3bf813e63d07c0fc04d6724adbfbd1beeb554e9476e2e4c' 'd1310321bf07491658e83087a6ddb0011738fa17a1dc3275d6d5c6907eaf3df8' - 'b7ebdba8612b1219011642c9bd4b377a23f402876a7d3dac90679a2bb34bbf98' - '791b3f2c6e5529b09c3abf2f9703b6cf754d633a7a4177645b70b72ea014135a' - 'e3cdfe730d0b0f422fe837e465ecde3419b16de50bef3dd2b674f275f528ed97') + 'ede5e054c73eab9aa71285bb3a16c1f2f0e4fdc0d4645fe13912ff9489865bee' + '1f0c44a4998ed239a3d77e3028b98b6f2c28a95e9bb4b8557523cc8f12ffba34') +options=(debug !strip) pkgver() { cd sage @@ -64,9 +74,7 @@ prepare(){ # Upstream patches # Replace lrcalc.pyx with a wrapper over lrcalc's python bindings https://trac.sagemath.org/ticket/31355 patch -p1 -i ../sagemath-lrcalc2.patch -# Port to lcalc 2 https://trac.sagemath.org/ticket/32037 - patch -p1 -i ../sagemath-lcalc2.patch -# Fix build with singular 4.2.1.p1 +# Fix build with singular 4.2.1.p1 https://trac.sagemath.org/ticket/32907 patch -p1 -i ../sagemath-singular-4.2.1.p1.patch # Arch-specific patches diff --git a/sagemath-lcalc2.patch b/sagemath-lcalc2.patch deleted file mode 100644 index efc1ab9a8a7b..000000000000 --- a/sagemath-lcalc2.patch +++ /dev/null @@ -1,507 +0,0 @@ -diff --git a/src/sage/lfunctions/lcalc.py b/src/sage/lfunctions/lcalc.py -index aabbd47..6efa5fe 100644 ---- a/src/sage/lfunctions/lcalc.py -+++ b/src/sage/lfunctions/lcalc.py -@@ -225,19 +225,54 @@ class LCalc(SageObject): - EXAMPLES:: - - sage: I = CC.0 -- sage: lcalc.values_along_line(0.5, 0.5+20*I, 5) -- [(0.500000000, -1.46035451), (0.500000000 + 4.00000000*I, 0.606783764 + 0.0911121400*I), (0.500000000 + 8.00000000*I, 1.24161511 + 0.360047588*I), (0.500000000 + 12.0000000*I, 1.01593665 - 0.745112472*I), (0.500000000 + 16.0000000*I, 0.938545408 + 1.21658782*I)] -+ sage: values = lcalc.values_along_line(0.5, 0.5+20*I, 5) -+ sage: values[0][0] # abs tol 1e-8 -+ 0.5 -+ sage: values[0][1] # abs tol 1e-8 -+ -1.46035451 + 0.0*I -+ sage: values[1][0] # abs tol 1e-8 -+ 0.5 + 4.0*I -+ sage: values[1][1] # abs tol 1e-8 -+ 0.606783764 + 0.0911121400*I -+ sage: values[2][0] # abs tol 1e-8 -+ 0.5 + 8.0*I -+ sage: values[2][1] # abs tol 1e-8 -+ 1.24161511 + 0.360047588*I -+ sage: values[3][0] # abs tol 1e-8 -+ 0.5 + 12.0*I -+ sage: values[3][1] # abs tol 1e-8 -+ 1.01593665 - 0.745112472*I -+ sage: values[4][0] # abs tol 1e-8 -+ 0.5 + 16.0*I -+ sage: values[4][1] # abs tol 1e-8 -+ 0.938545408 + 1.21658782*I - - Sometimes warnings are printed (by lcalc) when this command is - run:: - - sage: E = EllipticCurve('389a') -- sage: E.lseries().values_along_line(0.5, 3, 5) -- [(0.000000000, 0.209951303), -- (0.500000000, -...e-16), -- (1.00000000, 0.133768433), -- (1.50000000, 0.360092864), -- (2.00000000, 0.552975867)] -+ sage: values = E.lseries().values_along_line(0.5, 3, 5) -+ sage: values[0][0] # abs tol 1e-8 -+ 0.0 -+ sage: values[0][1] # abs tol 1e-8 -+ 0.209951303 + 0.0*I -+ sage: values[1][0] # abs tol 1e-8 -+ 0.5 -+ sage: values[1][1] # abs tol 1e-8 -+ 0.0 + 0.0*I -+ sage: values[2][0] # abs tol 1e-8 -+ 1.0 -+ sage: values[2][1] # abs tol 1e-8 -+ 0.133768433 - 0.0*I -+ sage: values[3][0] # abs tol 1e-8 -+ 1.5 -+ sage: values[3][1] # abs tol 1e-8 -+ 0.360092864 - 0.0*I -+ sage: values[4][0] # abs tol 1e-8 -+ 2.0 -+ sage: values[4][1] # abs tol 1e-8 -+ 0.552975867 + 0.0*I -+ - """ - L = self._compute_L(L) - CC = sage.rings.all.ComplexField(prec) -@@ -281,8 +316,31 @@ class LCalc(SageObject): - - EXAMPLES:: - -- sage: lcalc.twist_values(0.5, -10, 10) -- [(-8, 1.10042141), (-7, 1.14658567), (-4, 0.667691457), (-3, 0.480867558), (5, 0.231750947), (8, 0.373691713)] -+ sage: values = lcalc.twist_values(0.5, -10, 10) -+ sage: values[0][0] -+ -8 -+ sage: values[0][1] # abs tol 1e-8 -+ 1.10042141 + 0.0*I -+ sage: values[1][0] -+ -7 -+ sage: values[1][1] # abs tol 1e-8 -+ 1.14658567 + 0.0*I -+ sage: values[2][0] -+ -4 -+ sage: values[2][1] # abs tol 1e-8 -+ 0.667691457 + 0.0*I -+ sage: values[3][0] -+ -3 -+ sage: values[3][1] # abs tol 1e-8 -+ 0.480867558 + 0.0*I -+ sage: values[4][0] -+ 5 -+ sage: values[4][1] # abs tol 1e-8 -+ 0.231750947 + 0.0*I -+ sage: values[5][0] -+ 8 -+ sage: values[5][1] # abs tol 1e-8 -+ 0.373691713 + 0.0*I - """ - L = self._compute_L(L) - CC = sage.rings.all.ComplexField(prec) -diff --git a/src/sage/lfunctions/zero_sums.pyx b/src/sage/lfunctions/zero_sums.pyx -index 225fe7d..8b0e566 100644 ---- a/src/sage/lfunctions/zero_sums.pyx -+++ b/src/sage/lfunctions/zero_sums.pyx -@@ -829,8 +829,11 @@ cdef class LFunctionZeroSum_abstract(SageObject): - EXAMPLES:: - - sage: E = EllipticCurve("11a") -- sage: E.lseries().zeros(2) -- [6.36261389, 8.60353962] -+ sage: zeros = E.lseries().zeros(2) -+ sage: zeros[0] # abs tol 1e-8 -+ 6.36261389 -+ sage: zeros[1] # abs tol 1e-8 -+ 8.60353962 - - E is a rank zero curve; the lowest zero has imaginary part ~6.36. The - zero sum with tau=0 indicates that there are no zeros at the central -diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pxd b/src/sage/libs/lcalc/lcalc_Lfunction.pxd -index d1dbb5d..5edf084 100644 ---- a/src/sage/libs/lcalc/lcalc_Lfunction.pxd -+++ b/src/sage/libs/lcalc/lcalc_Lfunction.pxd -@@ -21,7 +21,7 @@ cdef extern from "lcalc_sage.h": - int (* compute_rank) () - double (* N) (double T) - void (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result ) -- void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result) -+ int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result) - void (*print_data_L)() - - #Constructor and destructor -@@ -38,7 +38,7 @@ cdef extern from "lcalc_sage.h": - double (* N) (double T) - double *dirichlet_coefficient - void (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result ) -- void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result) -+ int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result) - void (*print_data_L)() - - #Constructor and destructor -@@ -54,7 +54,7 @@ cdef extern from "lcalc_sage.h": - int (* compute_rank) () - double (* N) (double T) - void (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result ) -- void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result) -+ int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result) - void (*print_data_L)() - - #Constructor and destructor -@@ -70,7 +70,7 @@ cdef extern from "lcalc_sage.h": - int (* compute_rank) () - double (* N) (double T) - void (* find_zeros_v)(double T1, double T2, double stepsize, doublevec result ) -- void (*find_zeros_via_N_v)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec result)#puts result in vector<double> result -+ int (*find_zeros)(long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result) - void (*find_zeros_via_N)(long count,int do_negative,double max_refine, int rank, int test_explicit_formula, char *filename) #puts result in filename - - #Constructor and destructor -@@ -111,7 +111,7 @@ cdef class Lfunction: - #strange bug, replacing Double with double gives me a compile error - cdef Double __typedN(self, double T) - cdef void __find_zeros_v(self, double T1, double T2, double stepsize,doublevec *result) -- cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula,doublevec *result) -+ cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec* result) - - cdef str _repr - -diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pyx b/src/sage/libs/lcalc/lcalc_Lfunction.pyx -index 7e54d7e..88a6e13 100644 ---- a/src/sage/libs/lcalc/lcalc_Lfunction.pyx -+++ b/src/sage/libs/lcalc/lcalc_Lfunction.pyx -@@ -143,29 +143,29 @@ cdef class Lfunction: - sage: chi = DirichletGroup(5)[2] #This is a quadratic character - sage: from sage.libs.lcalc.lcalc_Lfunction import * - sage: L=Lfunction_from_character(chi, type="int") -- sage: L.value(.5) # abs tol 3e-15 -+ sage: L.value(.5) # abs tol 1e-8 - 0.231750947504016 + 5.75329642226136e-18*I -- sage: L.value(.2+.4*I) -- 0.102558603193... + 0.190840777924...*I -+ sage: L.value(.2+.4*I) # abs tol 1e-8 -+ 0.102558603193 + 0.190840777924*I - - sage: L=Lfunction_from_character(chi, type="double") -- sage: L.value(.6) # abs tol 3e-15 -+ sage: L.value(.6) # abs tol 1e-8 - 0.274633355856345 + 6.59869267328199e-18*I -- sage: L.value(.6+I) -- 0.362258705721... + 0.433888250620...*I -+ sage: L.value(.6+I) # abs tol 1e-8 -+ 0.362258705721 + 0.433888250620*I - - sage: chi = DirichletGroup(5)[1] - sage: L=Lfunction_from_character(chi, type="complex") -- sage: L.value(.5) -- 0.763747880117... + 0.216964767518...*I -- sage: L.value(.6+5*I) -- 0.702723260619... - 1.10178575243...*I -+ sage: L.value(.5) # abs tol 1e-8 -+ 0.763747880117 + 0.216964767518*I -+ sage: L.value(.6+5*I) # abs tol 1e-8 -+ 0.702723260619 - 1.10178575243*I - - sage: L=Lfunction_Zeta() -- sage: L.value(.5) -- -1.46035450880... -- sage: L.value(.4+.5*I) -- -0.450728958517... - 0.780511403019...*I -+ sage: L.value(.5) # abs tol 1e-8 -+ -1.46035450880 + 0.0*I -+ sage: L.value(.4+.5*I) # abs tol 1e-8 -+ -0.450728958517 - 0.780511403019*I - """ - cdef ComplexNumber complexified_s = CCC(s) - cdef c_Complex z = new_Complex(mpfr_get_d(complexified_s.__re, MPFR_RNDN), mpfr_get_d(complexified_s.__im, MPFR_RNDN)) -@@ -185,23 +185,21 @@ cdef class Lfunction: - sage: chi = DirichletGroup(5)[2] # Quadratic character - sage: from sage.libs.lcalc.lcalc_Lfunction import * - sage: L = Lfunction_from_character(chi, type="int") -- sage: L.hardy_z_function(0) -- 0.231750947504... -- sage: L.hardy_z_function(.5).imag() # abs tol 1e-15 -+ sage: L.hardy_z_function(0) # abs tol 1e-8 -+ 0.231750947504 + 0.0*I -+ sage: L.hardy_z_function(.5).imag() # abs tol 1e-8 - 1.17253174178320e-17 -- sage: L.hardy_z_function(.4+.3*I) -- 0.2166144222685... - 0.00408187127850...*I - sage: chi = DirichletGroup(5)[1] - sage: L = Lfunction_from_character(chi, type="complex") -- sage: L.hardy_z_function(0) -- 0.793967590477... -- sage: L.hardy_z_function(.5).imag() # abs tol 1e-15 -+ sage: L.hardy_z_function(0) # abs tol 1e-8 -+ 0.793967590477 + 0.0*I -+ sage: L.hardy_z_function(.5).imag() # abs tol 1e-8 - 0.000000000000000 - sage: E = EllipticCurve([-82,0]) - sage: L = Lfunction_from_elliptic_curve(E, number_of_coeffs=40000) -- sage: L.hardy_z_function(2.1) -- -0.00643179176869... -- sage: L.hardy_z_function(2.1).imag() # abs tol 1e-15 -+ sage: L.hardy_z_function(2.1) # abs tol 1e-8 -+ -0.00643179176863296 - 1.47189978221606e-19*I -+ sage: L.hardy_z_function(2.1).imag() # abs tol 1e-8 - -3.93833660115668e-19 - """ - #This takes s -> .5 + I*s -@@ -241,8 +239,8 @@ cdef class Lfunction: - sage: from sage.libs.lcalc.lcalc_Lfunction import * - sage: chi = DirichletGroup(5)[2] #This is a quadratic character - sage: L=Lfunction_from_character(chi, type="complex") -- sage: L.__N(10) -- 3.17043978326... -+ sage: L.__N(10) # abs tol 1e-8 -+ 4.0 - """ - cdef RealNumber real_T=RRR(T) - cdef double double_T = mpfr_get_d(real_T.value, MPFR_RNDN) -@@ -307,18 +305,21 @@ cdef class Lfunction: - return returnvalue - - #The default values are from L.h. See L.h -- def find_zeros_via_N(self, count=0, do_negative=False, max_refine=1025, -- rank=-1, test_explicit_formula=0): -+ def find_zeros_via_N(self, count=0, start=0, max_refine=1025, rank=-1): - """ -- Finds ``count`` number of zeros with positive imaginary part -- starting at real axis. This function also verifies that all -- the zeros have been found. -+ Find ``count`` zeros (in order of increasing magnitude) and output -+ their imaginary parts. This function verifies that no zeros -+ are missed, and that all values output are indeed zeros. -+ -+ If this L-function is self-dual (if its Dirichlet coefficients -+ are real, up to a tolerance of 1e-6), then only the zeros with -+ positive imaginary parts are output. Their conjugates, which -+ are also zeros, are not output. - - INPUT: - - - ``count`` - number of zeros to be found -- - ``do_negative`` - (default: False) False to ignore zeros below the -- real axis. -+ - ``start`` - (default: 0) how many initial zeros to skip - - ``max_refine`` - when some zeros are found to be missing, the step - size used to find zeros is refined. max_refine gives an upper limit - on when lcalc should give up. Use default value unless you know -@@ -326,13 +327,9 @@ cdef class Lfunction: - - ``rank`` - integer (default: -1) analytic rank of the L-function. - If -1 is passed, then we attempt to compute it. (Use default if in - doubt) -- - ``test_explicit_formula`` - integer (default: 0) If nonzero, test -- the explicit formula for additional confidence that all the zeros -- have been found and are accurate. This is still being tested, so -- using the default is recommended. - - OUTPUT: -- -+ - list -- A list of the imaginary parts of the zeros that have been found - - EXAMPLES:: -@@ -349,21 +346,26 @@ cdef class Lfunction: - - sage: chi = DirichletGroup(5)[1] - sage: L=Lfunction_from_character(chi, type="complex") -- sage: L.find_zeros_via_N(3) -- [6.18357819545..., 8.45722917442..., 12.6749464170...] -+ sage: zeros = L.find_zeros_via_N(3) -+ sage: zeros[0] # abs tol 1e-8 -+ -4.13290370521286 -+ sage: zeros[1] # abs tol 1e-8 -+ 6.18357819545086 -+ sage: zeros[2] # abs tol 1e-8 -+ 8.45722917442320 - - sage: L=Lfunction_Zeta() - sage: L.find_zeros_via_N(3) - [14.1347251417..., 21.0220396387..., 25.0108575801...] - """ -- cdef Integer count_I = Integer(count) -- cdef Integer do_negative_I = Integer(do_negative) -- cdef RealNumber max_refine_R = RRR(max_refine) -- cdef Integer rank_I = Integer(rank) -- cdef Integer test_explicit_I = Integer(test_explicit_formula) -+ -+ # This is the default value for message_stamp, but we have to -+ # pass it explicitly since we're passing in the next argument, -+ # our &result pointer. -+ cdef const char* message_stamp = "" - cdef doublevec result - sig_on() -- self.__find_zeros_via_N_v(mpz_get_si(count_I.value), mpz_get_si(do_negative_I.value), mpfr_get_d(max_refine_R.value, MPFR_RNDN), mpz_get_si(rank_I.value), mpz_get_si(test_explicit_I.value), &result) -+ self.__find_zeros(count, start, max_refine, rank, message_stamp, &result) - sig_off() - returnvalue = [] - for i in range(result.size()): -@@ -390,7 +392,7 @@ cdef class Lfunction: - cdef void __find_zeros_v(self,double T1, double T2, double stepsize, doublevec *result): - raise NotImplementedError - -- cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result): -+ cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result): - raise NotImplementedError - - ############################################################################## -@@ -486,8 +488,8 @@ cdef class Lfunction_I(Lfunction): - cdef double __typedN(self, double T): - return (<c_Lfunction_I *>self.thisptr).N(T) - -- cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result): -- (<c_Lfunction_I *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0]) -+ cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result): -+ (<c_Lfunction_I *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result) - - # debug tools - def _print_data_to_standard_output(self): -@@ -500,7 +502,7 @@ cdef class Lfunction_I(Lfunction): - sage: from sage.libs.lcalc.lcalc_Lfunction import * - sage: chi = DirichletGroup(5)[2] #This is a quadratic character - sage: L=Lfunction_from_character(chi, type="int") -- sage: L._print_data_to_standard_output() # tol 1e-15 -+ sage: L._print_data_to_standard_output() # tol 1e-8 - ----------------------------------------------- - <BLANKLINE> - Name of L_function: -@@ -624,8 +626,8 @@ cdef class Lfunction_D(Lfunction): - cdef double __typedN(self, double T): - return (<c_Lfunction_D *>self.thisptr).N(T) - -- cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result): -- (<c_Lfunction_D *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0]) -+ cdef int __find_zeros(self, long count, long start,double max_refine, int rank, const char* message_stamp, doublevec *result): -+ (<c_Lfunction_D *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result) - - # debug tools - def _print_data_to_standard_output(self): -@@ -638,7 +640,7 @@ cdef class Lfunction_D(Lfunction): - sage: from sage.libs.lcalc.lcalc_Lfunction import * - sage: chi = DirichletGroup(5)[2] #This is a quadratic character - sage: L=Lfunction_from_character(chi, type="double") -- sage: L._print_data_to_standard_output() # tol 1e-15 -+ sage: L._print_data_to_standard_output() # tol 1e-8 - ----------------------------------------------- - <BLANKLINE> - Name of L_function: -@@ -769,8 +771,8 @@ cdef class Lfunction_C: - cdef double __typedN(self, double T): - return (<c_Lfunction_C *>self.thisptr).N(T) - -- cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result): -- (<c_Lfunction_C *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0]) -+ cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result): -+ (<c_Lfunction_C *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result) - - # debug tools - def _print_data_to_standard_output(self): -@@ -783,7 +785,7 @@ cdef class Lfunction_C: - sage: from sage.libs.lcalc.lcalc_Lfunction import * - sage: chi = DirichletGroup(5)[1] - sage: L=Lfunction_from_character(chi, type="complex") -- sage: L._print_data_to_standard_output() # tol 1e-15 -+ sage: L._print_data_to_standard_output() # tol 1e-8 - ----------------------------------------------- - <BLANKLINE> - Name of L_function: -@@ -854,8 +856,8 @@ cdef class Lfunction_Zeta(Lfunction): - cdef double __typedN(self, double T): - return (<c_Lfunction_Zeta *>self.thisptr).N(T) - -- cdef void __find_zeros_via_N_v(self, long count,int do_negative,double max_refine, int rank, int test_explicit_formula, doublevec *result): -- (<c_Lfunction_Zeta *>self.thisptr).find_zeros_via_N_v(count, do_negative, max_refine, rank, test_explicit_formula, result[0]) -+ cdef int __find_zeros(self, long count, long start, double max_refine, int rank, const char* message_stamp, doublevec *result): -+ (<c_Lfunction_Zeta *>self.thisptr).find_zeros(count, start, max_refine, rank, message_stamp, result) - - def __dealloc__(self): - """ -@@ -950,10 +952,11 @@ def Lfunction_from_elliptic_curve(E, number_of_coeffs=10000): - sage: L = Lfunction_from_elliptic_curve(EllipticCurve('37')) - sage: L - L-function with real Dirichlet coefficients -- sage: L.value(0.5).abs() < 1e-15 # "noisy" zero on some platforms (see #9615) -+ sage: L.value(0.5).abs() < 1e-8 # "noisy" zero on some platforms (see #9615) - True -- sage: L.value(0.5, derivative=1) -- 0.305999... -+ sage: L.value(0.5, derivative=1) # abs tol 1e-6 -+ 0.305999773835200 + 0.0*I -+ - """ - import sage.libs.lcalc.lcalc_Lfunction - Q = RRR(E.conductor()).sqrt() / RRR(2 * pi) -diff --git a/src/sage/libs/lcalc/lcalc_sage.h b/src/sage/libs/lcalc/lcalc_sage.h -index 4985289..891a40c 100644 ---- a/src/sage/libs/lcalc/lcalc_sage.h -+++ b/src/sage/libs/lcalc/lcalc_sage.h -@@ -1,4 +1,4 @@ --#include "Lfunction/L.h" -+#include "lcalc/L.h" - int *new_ints(int l) - { - return new int[l]; -@@ -62,4 +62,3 @@ void testL(L_function<Complex> *L) - cout << "Value at 1" << L->value(1.0) <<endl; - cout << "Value at .5+I" << L->value(.5+I) <<endl; - } -- -diff --git a/src/sage/modular/dirichlet.py b/src/sage/modular/dirichlet.py -index d101f6a..23a9b1b 100644 ---- a/src/sage/modular/dirichlet.py -+++ b/src/sage/modular/dirichlet.py -@@ -751,8 +751,8 @@ class DirichletCharacter(MultiplicativeGroupElement): - sage: a = a.primitive_character() - sage: L = a.lfunction(algorithm='lcalc'); L - L-function with complex Dirichlet coefficients -- sage: L.value(4) # abs tol 1e-14 -- 0.988944551741105 - 5.16608739123418e-18*I -+ sage: L.value(4) # abs tol 1e-8 -+ 0.988944551741105 + 0.0*I - """ - if algorithm is None: - algorithm = 'pari' -diff --git a/src/sage/schemes/elliptic_curves/ell_rational_field.py b/src/sage/schemes/elliptic_curves/ell_rational_field.py -index bda999e..1736ce4 100644 ---- a/src/sage/schemes/elliptic_curves/ell_rational_field.py -+++ b/src/sage/schemes/elliptic_curves/ell_rational_field.py -@@ -1516,7 +1516,7 @@ class EllipticCurve_rational_field(EllipticCurve_number_field): - sage: EllipticCurve([1234567,89101112]).analytic_rank(algorithm='rubinstein') - Traceback (most recent call last): - ... -- RuntimeError: unable to compute analytic rank using rubinstein algorithm (unable to convert ' 6.19283e+19 and is too large' to an integer) -+ RuntimeError: unable to compute analytic rank using rubinstein algorithm (unable to convert ' 6.19283... and is too large' to an integer) - sage: EllipticCurve([1234567,89101112]).analytic_rank(algorithm='sympow') - Traceback (most recent call last): - ... -diff --git a/src/sage/schemes/elliptic_curves/lseries_ell.py b/src/sage/schemes/elliptic_curves/lseries_ell.py -index 1fcd02f..8536db5 100644 ---- a/src/sage/schemes/elliptic_curves/lseries_ell.py -+++ b/src/sage/schemes/elliptic_curves/lseries_ell.py -@@ -400,8 +400,22 @@ class Lseries_ell(SageObject): - - sage: E = EllipticCurve('37a') - sage: vals = E.lseries().twist_values(1, -12, -4) -- sage: vals # abs tol 1e-15 -- [(-11, 1.47824342), (-8, 8.9590946e-18), (-7, 1.85307619), (-4, 2.45138938)] -+ sage: vals[0][0] -+ -11 -+ sage: vals[0][1] # abs tol 1e-8 -+ 1.47824342 + 0.0*I -+ sage: vals[1][0] -+ -8 -+ sage: vals[1][1] # abs tol 1e-8 -+ 0.0 + 0.0*I -+ sage: vals[2][0] -+ -7 -+ sage: vals[2][1] # abs tol 1e-8 -+ 1.85307619 + 0.0*I -+ sage: vals[3][0] -+ -4 -+ sage: vals[3][1] # abs tol 1e-8 -+ 2.45138938 + 0.0*I - sage: F = E.quadratic_twist(-8) - sage: F.rank() - 1 - diff --git a/sagemath-lrcalc2.patch b/sagemath-lrcalc2.patch index 0ae8f6c1d086..8057508f4d07 100644 --- a/sagemath-lrcalc2.patch +++ b/sagemath-lrcalc2.patch @@ -1,5 +1,5 @@ diff --git a/build/pkgs/lrcalc/checksums.ini b/build/pkgs/lrcalc/checksums.ini -index 7a0e6a1b96..8b8620ba52 100644 +index 7a0e6a1..8b8620b 100644 --- a/build/pkgs/lrcalc/checksums.ini +++ b/build/pkgs/lrcalc/checksums.ini @@ -1,4 +1,5 @@ @@ -13,7 +13,7 @@ index 7a0e6a1b96..8b8620ba52 100644 +cksum=2250996027 +upstream_url=https://sites.math.rutgers.edu/~asbuch/lrcalc/lrcalc-VERSION.tar.gz diff --git a/build/pkgs/lrcalc/package-version.txt b/build/pkgs/lrcalc/package-version.txt -index 92ab3427e8..879b416e60 100644 +index 92ab342..879b416 100644 --- a/build/pkgs/lrcalc/package-version.txt +++ b/build/pkgs/lrcalc/package-version.txt @@ -1 +1 @@ @@ -21,7 +21,7 @@ index 92ab3427e8..879b416e60 100644 +2.1 diff --git a/build/pkgs/lrcalc/patches/includes.patch b/build/pkgs/lrcalc/patches/includes.patch deleted file mode 100644 -index 707da176a6..0000000000 +index 707da17..00000000 --- a/build/pkgs/lrcalc/patches/includes.patch +++ /dev/null @@ -1,90 +0,0 @@ @@ -116,7 +116,7 @@ index 707da176a6..0000000000 -2.1.1.1.g1fb337f - diff --git a/build/pkgs/lrcalc/spkg-configure.m4 b/build/pkgs/lrcalc/spkg-configure.m4 -index f2f8b74f8f..da66e31fbc 100644 +index f2f8b74..da66e31 100644 --- a/build/pkgs/lrcalc/spkg-configure.m4 +++ b/build/pkgs/lrcalc/spkg-configure.m4 @@ -2,8 +2,7 @@ SAGE_SPKG_CONFIGURE([lrcalc], [ @@ -131,7 +131,7 @@ index f2f8b74f8f..da66e31fbc 100644 #endif]]) ]) diff --git a/build/pkgs/lrcalc/spkg-install.in b/build/pkgs/lrcalc/spkg-install.in -index d6665bfb42..a863950189 100644 +index d6665bf..a863950 100644 --- a/build/pkgs/lrcalc/spkg-install.in +++ b/build/pkgs/lrcalc/spkg-install.in @@ -1,9 +1,5 @@ @@ -146,7 +146,7 @@ index d6665bfb42..a863950189 100644 sdh_make_install diff --git a/build/pkgs/lrcalc_python/SPKG.rst b/build/pkgs/lrcalc_python/SPKG.rst new file mode 100644 -index 0000000000..cff9d7d7fb +index 00000000..cff9d7d --- /dev/null +++ b/build/pkgs/lrcalc_python/SPKG.rst @@ -0,0 +1,22 @@ @@ -174,7 +174,7 @@ index 0000000000..cff9d7d7fb +https://bitbucket.org/asbuch/lrcalc diff --git a/build/pkgs/lrcalc_python/checksums.ini b/build/pkgs/lrcalc_python/checksums.ini new file mode 100644 -index 0000000000..bdfef8711e +index 00000000..bdfef87 --- /dev/null +++ b/build/pkgs/lrcalc_python/checksums.ini @@ -0,0 +1,5 @@ @@ -185,7 +185,7 @@ index 0000000000..bdfef8711e +upstream_url=https://pypi.io/packages/source/l/lrcalc/lrcalc-VERSION.tar.gz diff --git a/build/pkgs/lrcalc_python/dependencies b/build/pkgs/lrcalc_python/dependencies new file mode 100644 -index 0000000000..63e5177ae0 +index 00000000..63e5177 --- /dev/null +++ b/build/pkgs/lrcalc_python/dependencies @@ -0,0 +1,5 @@ @@ -196,45 +196,45 @@ index 0000000000..63e5177ae0 +It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile. diff --git a/build/pkgs/lrcalc_python/install-requires.txt b/build/pkgs/lrcalc_python/install-requires.txt new file mode 100644 -index 0000000000..8b44d97f4b +index 00000000..8b44d97 --- /dev/null +++ b/build/pkgs/lrcalc_python/install-requires.txt @@ -0,0 +1 @@ +lrcalc ~=2.1 diff --git a/build/pkgs/lrcalc_python/package-version.txt b/build/pkgs/lrcalc_python/package-version.txt new file mode 100644 -index 0000000000..879b416e60 +index 00000000..879b416 --- /dev/null +++ b/build/pkgs/lrcalc_python/package-version.txt @@ -0,0 +1 @@ +2.1 diff --git a/build/pkgs/lrcalc_python/spkg-install.in b/build/pkgs/lrcalc_python/spkg-install.in new file mode 100644 -index 0000000000..deba1bb42b +index 00000000..deba1bb --- /dev/null +++ b/build/pkgs/lrcalc_python/spkg-install.in @@ -0,0 +1 @@ +cd src && sdh_pip_install . diff --git a/build/pkgs/lrcalc_python/type b/build/pkgs/lrcalc_python/type new file mode 100644 -index 0000000000..a6a7b9cd72 +index 00000000..a6a7b9c --- /dev/null +++ b/build/pkgs/lrcalc_python/type @@ -0,0 +1 @@ +standard diff --git a/build/pkgs/sagelib/dependencies b/build/pkgs/sagelib/dependencies -index 960eb95c1c..a68ac961f1 100644 +index 53b78ff..e2bfab0 100644 --- a/build/pkgs/sagelib/dependencies +++ b/build/pkgs/sagelib/dependencies @@ -1,4 +1,4 @@ --FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy pycygwin $(PYTHON) ratpoints rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup -+FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy pycygwin $(PYTHON) ratpoints rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup +-FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount pycygwin $(PYTHON) ratpoints rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup ++FORCE $(SCRIPTS) arb boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml jinja2 jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount pycygwin $(PYTHON) ratpoints rw sage_conf singular symmetrica zn_poly $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup ---------- All lines of this file are ignored except the first. diff --git a/src/sage/libs/lrcalc/lrcalc.pxd b/src/sage/libs/lrcalc/lrcalc.pxd deleted file mode 100644 -index 10b88db93f..0000000000 +index 10b88db..00000000 --- a/src/sage/libs/lrcalc/lrcalc.pxd +++ /dev/null @@ -1,77 +0,0 @@ @@ -316,10 +316,7 @@ index 10b88db93f..0000000000 -cdef extern from "lrcalc/schublib.h": - hashtab* mult_schubert_c "mult_schubert"(vector *sh1, vector *sh2, int rank) diff --git a/src/sage/libs/lrcalc/lrcalc.pyx b/src/sage/libs/lrcalc/lrcalc.py -similarity index 65% -rename from src/sage/libs/lrcalc/lrcalc.pyx -rename to src/sage/libs/lrcalc/lrcalc.py -index b591081ec4..65db959944 100644 +index b591081..65db959 100644 --- a/src/sage/libs/lrcalc/lrcalc.pyx +++ b/src/sage/libs/lrcalc/lrcalc.py @@ -187,180 +187,24 @@ AUTHORS: diff --git a/sagemath-singular-4.2.1.p1.patch b/sagemath-singular-4.2.1.p1.patch index 28f0d39377d8..a16e2930f0d6 100644 --- a/sagemath-singular-4.2.1.p1.patch +++ b/sagemath-singular-4.2.1.p1.patch @@ -1,8 +1,8 @@ diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd -index 806937ff6e..68741d7588 100644 +index 997cb63..d5cf044 100644 --- a/src/sage/libs/singular/decl.pxd +++ b/src/sage/libs/singular/decl.pxd -@@ -747,21 +747,21 @@ cdef extern from "singular/Singular/libsingular.h": +@@ -748,21 +748,21 @@ cdef extern from "singular/Singular/libsingular.h": # general number constructor @@ -29,10 +29,10 @@ index 806937ff6e..68741d7588 100644 # rational number from int diff --git a/src/sage/libs/singular/polynomial.pyx b/src/sage/libs/singular/polynomial.pyx -index 7687de8f2d..027e0b574a 100644 +index f6d244e..1b881e2 100644 --- a/src/sage/libs/singular/polynomial.pyx +++ b/src/sage/libs/singular/polynomial.pyx -@@ -130,7 +130,7 @@ cdef int singular_polynomial_rmul(poly **ret, poly *p, RingElement n, ring *r): +@@ -132,7 +132,7 @@ cdef int singular_polynomial_rmul(poly **ret, poly *p, RingElement n, ring *r): rChangeCurrRing(r) cdef number *_n = sa2si(n, r) ret[0] = pp_Mult_nn(p, _n, r) @@ -41,7 +41,7 @@ index 7687de8f2d..027e0b574a 100644 return 0 cdef int singular_polynomial_call(poly **ret, poly *p, ring *r, list args, poly *(*get_element)(object)): -@@ -275,7 +275,7 @@ cdef int singular_polynomial_cmp(poly *p, poly *q, ring *r): +@@ -277,7 +277,7 @@ cdef int singular_polynomial_cmp(poly *p, poly *q, ring *r): h = r.cf.cfSub(p_GetCoeff(p, r),p_GetCoeff(q, r),r.cf) # compare coeffs ret = -1+r.cf.cfIsZero(h,r.cf)+2*r.cf.cfGreaterZero(h, r.cf) # -1: <, 0:==, 1: > @@ -50,7 +50,7 @@ index 7687de8f2d..027e0b574a 100644 p = pNext(p) q = pNext(q) -@@ -346,7 +346,7 @@ cdef int singular_polynomial_div_coeff(poly** ret, poly *p, poly *q, ring *r) ex +@@ -348,7 +348,7 @@ cdef int singular_polynomial_div_coeff(poly** ret, poly *p, poly *q, ring *r) ex cdef number *n = p_GetCoeff(q, r) n = r.cf.cfInvers(n,r.cf) ret[0] = pp_Mult_nn(p, n, r) @@ -60,11 +60,11 @@ index 7687de8f2d..027e0b574a 100644 return 0 diff --git a/src/sage/libs/singular/singular.pyx b/src/sage/libs/singular/singular.pyx -index ce93c3b8cb..c4eba5fe59 100644 +index d45de78..b235b90 100644 --- a/src/sage/libs/singular/singular.pyx +++ b/src/sage/libs/singular/singular.pyx -@@ -669,7 +669,7 @@ cdef object si2sa(number *n, ring *_ring, object base): - cdef number *sa2si(Element elem, ring * _ring): +@@ -1399,7 +1399,7 @@ cdef number *sa2si(Element elem, ring * _ring): + """ cdef int i = 0 if isinstance(elem._parent, FiniteField_prime_modn): - return n_Init(int(elem),_ring) @@ -72,17 +72,93 @@ index ce93c3b8cb..c4eba5fe59 100644 elif isinstance(elem._parent, RationalField): return sa2si_QQ(elem, _ring) -@@ -690,7 +690,7 @@ cdef number *sa2si(Element elem, ring * _ring): +@@ -1420,7 +1420,7 @@ cdef number *sa2si(Element elem, ring * _ring): return sa2si_NF(elem, _ring) elif isinstance(elem._parent, IntegerModRing_generic): if _ring.cf.type == n_unknown: - return n_Init(int(elem),_ring) + return n_Init(int(elem),_ring.cf) return sa2si_ZZmod(elem, _ring) - else: - raise ValueError("cannot convert to SINGULAR number") + elif isinstance(elem._parent, FractionField_generic) and isinstance(elem._parent.base(), (MPolynomialRing_libsingular, PolynomialRing_field)): + if isinstance(elem._parent.base().base_ring(), RationalField): +diff --git a/src/sage/modular/modform_hecketriangle/abstract_space.py b/src/sage/modular/modform_hecketriangle/abstract_space.py +index e073fc1..ad4307e 100644 +--- a/src/sage/modular/modform_hecketriangle/abstract_space.py ++++ b/src/sage/modular/modform_hecketriangle/abstract_space.py +@@ -1161,8 +1161,8 @@ class FormsSpace_abstract(FormsRing_abstract): + + sage: MF.F_basis_pol(2) + x^13*y*d^2 - 2*x^8*y^3*d^2 + x^3*y^5*d^2 +- sage: MF.F_basis_pol(1) +- (-81*x^13*y*d + 62*x^8*y^3*d + 19*x^3*y^5*d)/(-100) ++ sage: MF.F_basis_pol(1) * 100 ++ 81*x^13*y*d - 62*x^8*y^3*d - 19*x^3*y^5*d + sage: MF.F_basis_pol(0) + (141913*x^13*y + 168974*x^8*y^3 + 9113*x^3*y^5)/320000 + +diff --git a/src/sage/modular/modform_hecketriangle/readme.py b/src/sage/modular/modform_hecketriangle/readme.py +index 29e3ab1..b005972 100644 +--- a/src/sage/modular/modform_hecketriangle/readme.py ++++ b/src/sage/modular/modform_hecketriangle/readme.py +@@ -757,8 +757,8 @@ Modular forms ring and spaces for Hecke triangle groups: + + General Eisenstein series in some arithmetic cases:: + +- sage: ModularFormsRing(n=4).EisensteinSeries(k=8) +- (-25*f_rho^4 - 9*f_i^2)/(-34) ++ sage: ModularFormsRing(n=4).EisensteinSeries(k=8) * 34 ++ 25*f_rho^4 + 9*f_i^2 + sage: ModularForms(n=3, k=12).EisensteinSeries() + 1 + 65520/691*q + 134250480/691*q^2 + 11606736960/691*q^3 + 274945048560/691*q^4 + O(q^5) + sage: ModularForms(n=6, k=12).EisensteinSeries() +diff --git a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py +index 7c308fd..be1c70c 100644 +--- a/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py ++++ b/src/sage/rings/asymptotic/asymptotics_multivariate_generating_functions.py +@@ -1578,7 +1578,7 @@ class FractionWithFactoredDenominator(RingElement): + (1, [(x*y + x + y - 1, 2)]) + sage: alpha = [4, 3] + sage: decomp = F.asymptotic_decomposition(alpha); decomp +- (0, []) + (-2*r*(1/x + 1) - 1/2/x - 1/2, [(x*y + x + y - 1, 1)]) ++ (0, []) + (... - 1/2, [(x*y + x + y - 1, 1)]) + sage: F1 = decomp[1] + sage: p = {y: 1/3, x: 1/2} + sage: asy = F1.asymptotics(p, alpha, 2, verbose=True) +diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx +index e33e5e4..4cd91d0 100644 +--- a/src/sage/rings/polynomial/hilbert.pyx ++++ b/src/sage/rings/polynomial/hilbert.pyx +@@ -576,13 +576,10 @@ def hilbert_poincare_series(I, grading=None): + sage: hilbert_poincare_series(J).denominator().factor() + (t - 1)^14 + +- This example exceeds the current capabilities of Singular:: ++ This example exceeded the capabilities of Singular before version 4.2.1p2:: + + sage: J.hilbert_numerator(algorithm='singular') +- Traceback (most recent call last): +- ... +- RuntimeError: error in Singular function call 'hilb': +- int overflow in hilb 1 ++ 120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1 + + """ + cdef Polynomial_integer_dense_flint HP +diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal.py b/src/sage/rings/polynomial/multi_polynomial_ideal.py +index 70f2138..2b6c9fb 100644 +--- a/src/sage/rings/polynomial/multi_polynomial_ideal.py ++++ b/src/sage/rings/polynomial/multi_polynomial_ideal.py +@@ -154,7 +154,7 @@ when the system has no solutions over the rationals. + which is not 1. :: + + sage: I.groebner_basis() +- [x + y + 57119*z + 4, y^2 + 3*y + 17220, y*z + y + 26532, 2*y + 158864, z^2 + 17223, 2*z + 41856, 164878] ++ [x + y + 57119*z + 4, y^2 + 3*y + 17220, y*z + ..., 2*y + 158864, z^2 + 17223, 2*z + 41856, 164878] + + Now for each prime `p` dividing this integer 164878, the Groebner + basis of I modulo `p` will be non-trivial and will thus give a diff --git a/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx -index 6f884ea2c1..dcbc2a52a8 100644 +index 6f884ea..dcbc2a5 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx @@ -329,7 +329,7 @@ def interred_libsingular(I): @@ -95,10 +171,10 @@ index 6f884ea2c1..dcbc2a52a8 100644 id_Delete(&i,r) diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx -index 2c69227760..4ab9a36f78 100644 +index 5d34e62..ee90c9d 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx -@@ -1652,7 +1652,7 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): +@@ -1667,7 +1667,7 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): else: raise ArithmeticError("Cannot divide these coefficients.") else: @@ -107,7 +183,7 @@ index 2c69227760..4ab9a36f78 100644 return new_MP(self, res) def monomial_divides(self, MPolynomial_libsingular a, MPolynomial_libsingular b): -@@ -1805,7 +1805,7 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): +@@ -1820,7 +1820,7 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): if r is not currRing: rChangeCurrRing(r) flt = pMDivide(f._poly, h._poly) @@ -116,7 +192,7 @@ index 2c69227760..4ab9a36f78 100644 return (new_MP(self, flt), h) return (self._zero_element, self._zero_element) -@@ -2885,7 +2885,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -2900,7 +2900,7 @@ cdef class MPolynomial_libsingular(MPolynomial): flag = 1 if flag == 0: newptemp = p_LmInit(p,r) @@ -125,7 +201,7 @@ index 2c69227760..4ab9a36f78 100644 for i from 0<=i<gens: if exps[i] != -1: p_SetExp(newptemp,i+1,0,r) -@@ -3187,7 +3187,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -3202,7 +3202,7 @@ cdef class MPolynomial_libsingular(MPolynomial): t = pNext(p) p.next = NULL coeff = si2sa(p_GetCoeff(p, _ring), _ring, base) @@ -134,7 +210,7 @@ index 2c69227760..4ab9a36f78 100644 p_Setm(p, _ring) yield (coeff, new_MP(parent, p)) p = t -@@ -3716,7 +3716,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -3744,7 +3744,7 @@ cdef class MPolynomial_libsingular(MPolynomial): while p: t = pNext(p) p.next = NULL @@ -143,7 +219,7 @@ index 2c69227760..4ab9a36f78 100644 p_Setm(p, _ring) l.append( new_MP(parent,p) ) p = t -@@ -3993,7 +3993,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4021,7 +4021,7 @@ cdef class MPolynomial_libsingular(MPolynomial): if self._poly == NULL: return self._parent._zero_element _p = p_Head(self._poly, _ring) @@ -152,7 +228,7 @@ index 2c69227760..4ab9a36f78 100644 p_Setm(_p,_ring) return new_MP(self._parent, _p) -@@ -4142,7 +4142,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4170,7 +4170,7 @@ cdef class MPolynomial_libsingular(MPolynomial): elif p_IsOne(_right._poly, r): return self @@ -161,7 +237,7 @@ index 2c69227760..4ab9a36f78 100644 raise NotImplementedError("Division of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.") if r.cf.type != n_unknown: -@@ -4153,7 +4153,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4181,7 +4181,7 @@ cdef class MPolynomial_libsingular(MPolynomial): while p: if p_DivisibleBy(_right._poly, p, r): temp = p_MDivide(p, _right._poly, r) @@ -170,7 +246,7 @@ index 2c69227760..4ab9a36f78 100644 quo = p_Add_q(quo, temp, r) p = pNext(p) return new_MP(parent, quo) -@@ -4458,7 +4458,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4486,7 +4486,7 @@ cdef class MPolynomial_libsingular(MPolynomial): except Exception: raise NotImplementedError("Factorization of multivariate polynomials over %s is not implemented."%self._parent._base) @@ -179,7 +255,7 @@ index 2c69227760..4ab9a36f78 100644 raise NotImplementedError("Factorization of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.") # I make a temporary copy of the poly in self because singclap_factorize appears to modify it's parameter -@@ -4842,7 +4842,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4870,7 +4870,7 @@ cdef class MPolynomial_libsingular(MPolynomial): if _ring.cf.type == n_Znm or _ring.cf.type == n_Zn or _ring.cf.type == n_Z2m : raise NotImplementedError("GCD over rings not implemented.") @@ -188,7 +264,17 @@ index 2c69227760..4ab9a36f78 100644 raise NotImplementedError("GCD of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.") cdef int count = singular_polynomial_length_bounded(self._poly,20) \ -@@ -4915,7 +4915,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -4920,7 +4920,8 @@ cdef class MPolynomial_libsingular(MPolynomial): + + sage: Pol.<x,y,z> = ZZ[] + sage: p = -x*y + x*z + 54*x - 2 +- sage: (5*p^2).lcm(3*p) == 15*p^2 ++ sage: q = (5*p^2).lcm(3*p) ++ sage: q * q.lc().sign() == 15*p^2 + True + sage: lcm(2*x, 2*y) + 2*x*y +@@ -4943,7 +4944,7 @@ cdef class MPolynomial_libsingular(MPolynomial): else: _g = <MPolynomial_libsingular>g @@ -197,7 +283,7 @@ index 2c69227760..4ab9a36f78 100644 raise NotImplementedError("LCM of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.") cdef int count = singular_polynomial_length_bounded(self._poly,20) \ -@@ -4995,7 +4995,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -5023,7 +5024,7 @@ cdef class MPolynomial_libsingular(MPolynomial): py_rem = self - right*py_quo return py_quo, py_rem @@ -206,7 +292,7 @@ index 2c69227760..4ab9a36f78 100644 raise NotImplementedError("Division of multivariate polynomials over prime fields with characteristic > 2^29 is not implemented.") cdef int count = singular_polynomial_length_bounded(self._poly,15) -@@ -5450,7 +5450,7 @@ cdef class MPolynomial_libsingular(MPolynomial): +@@ -5478,7 +5479,7 @@ cdef class MPolynomial_libsingular(MPolynomial): raise TypeError("second parameter needs to be an element of self.parent() or None") @@ -216,10 +302,10 @@ index 2c69227760..4ab9a36f78 100644 if is_IntegerRing(self._parent._base): diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx -index 349871f508..540bc5cd29 100644 +index 972d220..8fbf375 100644 --- a/src/sage/rings/polynomial/plural.pyx +++ b/src/sage/rings/polynomial/plural.pyx -@@ -1063,7 +1063,7 @@ cdef class NCPolynomialRing_plural(Ring): +@@ -1081,7 +1081,7 @@ cdef class NCPolynomialRing_plural(Ring): else: raise ArithmeticError("Cannot divide these coefficients.") else: @@ -228,7 +314,7 @@ index 349871f508..540bc5cd29 100644 return new_NCP(self, res) def monomial_divides(self, NCPolynomial_plural a, NCPolynomial_plural b): -@@ -1251,7 +1251,7 @@ cdef class NCPolynomialRing_plural(Ring): +@@ -1269,7 +1269,7 @@ cdef class NCPolynomialRing_plural(Ring): h = <NCPolynomial_plural>g if p_LmDivisibleBy(h._poly, m, r): flt = pMDivide(f._poly, h._poly) @@ -237,7 +323,7 @@ index 349871f508..540bc5cd29 100644 return (new_NCP(self,flt), h) return (self._zero_element, self._zero_element) -@@ -2112,7 +2112,7 @@ cdef class NCPolynomial_plural(RingElement): +@@ -2130,7 +2130,7 @@ cdef class NCPolynomial_plural(RingElement): flag = 1 if flag == 0: newptemp = p_LmInit(p,r) @@ -246,7 +332,7 @@ index 349871f508..540bc5cd29 100644 for i from 0<=i<gens: if exps[i] != -1: p_SetExp(newptemp,i+1,0,r) -@@ -2545,7 +2545,7 @@ cdef class NCPolynomial_plural(RingElement): +@@ -2563,7 +2563,7 @@ cdef class NCPolynomial_plural(RingElement): while p: t = pNext(p) p.next = NULL @@ -255,7 +341,7 @@ index 349871f508..540bc5cd29 100644 p_Setm(p, _ring) l.append( new_NCP(parent,p) ) p = t -@@ -2650,7 +2650,7 @@ cdef class NCPolynomial_plural(RingElement): +@@ -2668,7 +2668,7 @@ cdef class NCPolynomial_plural(RingElement): if self._poly == NULL: return (<NCPolynomialRing_plural>self._parent)._zero_element _p = p_Head(self._poly, _ring) |