diff --git a/build/pkgs/gcc/spkg-configure.m4 b/build/pkgs/gcc/spkg-configure.m4 index 8b5ff54fe8e..9b8c8dc44ce 100644 --- a/build/pkgs/gcc/spkg-configure.m4 +++ b/build/pkgs/gcc/spkg-configure.m4 @@ -165,8 +165,8 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ # Install our own GCC if the system-provided one is older than gcc 8.4 SAGE_SHOULD_INSTALL_GCC([you have $CXX version $GXX_VERSION, which is quite old]) ], - [1[[4-9]].*], [ - # Install our own GCC if the system-provided one is newer than 13.x. + [1[[5-9]].*], [ + # Install our own GCC if the system-provided one is newer than 14.x. # See https://github.com/sagemath/sage/issues/29456 SAGE_SHOULD_INSTALL_GCC([$CXX is g++ version $GXX_VERSION, which is too recent for this version of Sage]) ]) diff --git a/build/pkgs/gfortran/spkg-configure.m4 b/build/pkgs/gfortran/spkg-configure.m4 index e6e396deaab..a8248a26aa5 100644 --- a/build/pkgs/gfortran/spkg-configure.m4 +++ b/build/pkgs/gfortran/spkg-configure.m4 @@ -86,8 +86,8 @@ SAGE_SPKG_CONFIGURE([gfortran], [ # Install our own gfortran if the system-provided one is older than gcc-4.8. SAGE_SHOULD_INSTALL_GFORTRAN([$FC is version $GFORTRAN_VERSION, which is quite old]) ], - [1[[4-9]].*], [ - # Install our own gfortran if the system-provided one is newer than 13.x. + [1[[5-9]].*], [ + # Install our own gfortran if the system-provided one is newer than 14.x. # See https://github.com/sagemath/sage/issues/29456, https://github.com/sagemath/sage/issues/31838 SAGE_MUST_INSTALL_GFORTRAN([$FC is version $GFORTRAN_VERSION, which is too recent for this version of Sage]) ]) diff --git a/src/sage/modular/arithgroup/farey.cpp b/src/sage/modular/arithgroup/farey.cpp index 209391676de..d224b2a8d13 100644 --- a/src/sage/modular/arithgroup/farey.cpp +++ b/src/sage/modular/arithgroup/farey.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -737,7 +738,7 @@ size_t FareySymbol::nu3() const { size_t FareySymbol::rank_pi() const { if( index() == 2 ) return 1; return count_if(pairing.begin(), pairing.end(), - bind2nd(greater(), 0))/2; + bind(greater(), placeholders::_1, 0))/2; } size_t FareySymbol::number_of_cusps() const { diff --git a/src/sage/modular/arithgroup/farey_symbol.pyx b/src/sage/modular/arithgroup/farey_symbol.pyx index 34546c082da..4cfb4b12363 100644 --- a/src/sage/modular/arithgroup/farey_symbol.pyx +++ b/src/sage/modular/arithgroup/farey_symbol.pyx @@ -1,4 +1,6 @@ # distutils: sources = sage/modular/arithgroup/sl2z.cpp sage/modular/arithgroup/farey.cpp +# distutils: language = c++ +# distutils: extra_compile_args = -std=c++11 # sage.doctest: needs sage.libs.pari r""" Farey symbol for arithmetic subgroups of `\PSL_2(\ZZ)` diff --git a/src/sage/rings/polynomial/hilbert.pyx b/src/sage/rings/polynomial/hilbert.pyx index 147db5691c3..9e61c4b129e 100644 --- a/src/sage/rings/polynomial/hilbert.pyx +++ b/src/sage/rings/polynomial/hilbert.pyx @@ -106,7 +106,7 @@ cdef inline list interred(list L) noexcept: # that appears later in L. if not L: return [] - L.sort(key=ETuple.unweighted_degree) + L.sort(key=ETuple._unweighted_degree) cdef size_t i cdef ETuple m cdef list result = [ PyList_GET_ITEM(L, 0)] diff --git a/src/sage/rings/polynomial/polydict.pxd b/src/sage/rings/polynomial/polydict.pxd index 432ae7d8c47..af56cd80364 100644 --- a/src/sage/rings/polynomial/polydict.pxd +++ b/src/sage/rings/polynomial/polydict.pxd @@ -14,6 +14,8 @@ cdef class ETuple: cdef ETuple _new(self) noexcept cdef int get_exp(self, size_t i) noexcept + # need a cdef version for function pointers + cdef int _unweighted_degree(self) except * cpdef int unweighted_degree(self) except * cpdef int weighted_degree(self, tuple w) except * cpdef int unweighted_quotient_degree(self, ETuple other) except * diff --git a/src/sage/rings/polynomial/polydict.pyx b/src/sage/rings/polynomial/polydict.pyx index af24e7ff245..0ecf35e452f 100644 --- a/src/sage/rings/polynomial/polydict.pyx +++ b/src/sage/rings/polynomial/polydict.pyx @@ -1845,7 +1845,7 @@ cdef class ETuple: # additional methods - cpdef int unweighted_degree(self) except *: + cdef int _unweighted_degree(self) except *: r""" Return the sum of entries. @@ -1863,6 +1863,20 @@ cdef class ETuple: degree += self._data[2 * i + 1] return degree + cpdef int unweighted_degree(self) except *: + r""" + Return the sum of entries. + + EXAMPLES:: + + sage: from sage.rings.polynomial.polydict import ETuple + sage: ETuple([1, 1, 0, 2, 0]).unweighted_degree() + 4 + sage: ETuple([-1, 1]).unweighted_degree() + 0 + """ + return self._unweighted_degree() + @cython.boundscheck(False) @cython.wraparound(False) cpdef int weighted_degree(self, tuple w) except *: