diff --git a/build/pkgs/configure/checksums.ini b/build/pkgs/configure/checksums.ini index ada82676b33..cf72ef0218d 100644 --- a/build/pkgs/configure/checksums.ini +++ b/build/pkgs/configure/checksums.ini @@ -1,3 +1,3 @@ tarball=configure-VERSION.tar.gz -sha1=86711d4cbef2cd4e7bb4afcde36965e5dea908e0 -sha256=9793cf92ebdceb09050a585294de93c242c033745a0012cae1bd301d307a45df +sha1=1d96adb1dc628dbcbcd38dcafde2caa27a1a4add +sha256=5cc48719acc4605ece48ef5340d59ef130bfb157262c78861e87a173e73a6cea diff --git a/build/pkgs/configure/package-version.txt b/build/pkgs/configure/package-version.txt index d1c6cb2da71..fb606ec5f19 100644 --- a/build/pkgs/configure/package-version.txt +++ b/build/pkgs/configure/package-version.txt @@ -1 +1 @@ -efc0914cd8d72a9bdfdcca4511b55e290b9b6674 +861d10a904bd88c486b565960e317af89fcc9506 diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx index fb9d821a413..fe7740b7a07 100644 --- a/src/sage/rings/complex_arb.pyx +++ b/src/sage/rings/complex_arb.pyx @@ -168,6 +168,7 @@ from sage.libs.flint.acb_hypgeom cimport * from sage.libs.flint.acb_elliptic cimport * from sage.libs.flint.acb_modular cimport * from sage.libs.flint.acb_poly cimport * +from sage.libs.flint.acb_dirichlet cimport * from sage.libs.flint.arf cimport arf_init, arf_get_d, arf_get_mpfr, arf_clear, arf_set, arf_is_nan from sage.libs.flint.mag cimport (mag_init, mag_clear, mag_set_d, MAG_BITS, mag_zero, mag_set_ui_2exp_si, @@ -1261,6 +1262,70 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField): return res + def zeta_zeros(self, count, start=1): + r""" + Compute consecutive zeros of the Riemann zeta function. + + INPUT: + + - ``count`` -- positive integer; number of zeros to be computed, must fit in a machine integer + + - ``start`` -- positive integer (default: 1); index of the first zero to be computed + + OUTPUT: + + A list of ``count`` consecutive zeros of the Riemann zeta function, starting from the ``start``-th zero. + Indexing starts at one, following usual mathematical notations. + + EXAMPLES:: + + sage: CBF.zeta_zeros(10) + [0.5000000000000000 + [14.134725141734...]*I, + 0.5000000000000000 + [21.0220396387715...]*I, + 0.5000000000000000 + [25.010857580145...]*I, + 0.5000000000000000 + [30.4248761258595...]*I, + 0.5000000000000000 + [32.935061587739...]*I, + 0.5000000000000000 + [37.586178158825...]*I, + 0.5000000000000000 + [40.918719012147...]*I, + 0.5000000000000000 + [43.32707328091...]*I, + 0.5000000000000000 + [48.005150881167...]*I, + 0.5000000000000000 + [49.773832477672...]*I] + + sage: CBF.zeta_zeros(6, start=5) + [0.5000000000000000 + [32.935061587739...]*I, + 0.5000000000000000 + [37.586178158825...]*I, + 0.5000000000000000 + [40.918719012147...]*I, + 0.5000000000000000 + [43.32707328091...]*I, + 0.5000000000000000 + [48.005150881167...]*I, + 0.5000000000000000 + [49.773832477672...]*I] + """ + cdef fmpz_t _start + fmpz_init(_start) + fmpz_set_mpz(_start, ( Integer(start)).value) + + cdef long _count = count + if _count < 1: + raise ValueError("count must be positive") + + cdef acb_ptr ar = _acb_vec_init(_count) + + sig_on() + acb_dirichlet_zeta_zeros(ar, _start, _count, self._prec) + sig_off() + + res = [] + cdef ComplexBall b + for i in range(_count): + b = ComplexBall.__new__(ComplexBall) + b._parent = self + acb_swap(b.value, &ar[i]) + res.append(b) + + _acb_vec_clear(ar, _count) + fmpz_clear(_start) + + return res + cdef inline bint _do_sig(long prec) noexcept: """