Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/src/sage/databases/odlyzko.py
4081 views
1
"""
2
Database of the zeros of the Riemann zeta function
3
4
The main access function to the database of the zeros of the Riemann zeta
5
function is :func:`zeta_zeros`. In order to use ``zeta_zeros()``, you need to
6
install the optional :ref:`database_odlyzko_zeta <spkg_database_odlyzko_zeta>`
7
package::
8
9
sage -i database_odlyzko_zeta
10
11
AUTHORS:
12
13
- William Stein: initial version
14
- Jeroen Demeyer (2015-01-20): converted ``database_odlyzko_zeta`` to new-style
15
package
16
"""
17
18
# ****************************************************************************
19
# Copyright (C) 2004 William Stein <[email protected]>
20
# Copyright (C) 2015 Jeroen Demeyer <[email protected]>
21
#
22
# This program is free software: you can redistribute it and/or modify
23
# it under the terms of the GNU General Public License as published by
24
# the Free Software Foundation, either version 2 of the License, or
25
# (at your option) any later version.
26
# https://www.gnu.org/licenses/
27
# ****************************************************************************
28
29
import os
30
31
from sage.misc.persist import load
32
from sage.env import SAGE_SHARE
33
34
35
def zeta_zeros():
36
r"""
37
List of the imaginary parts of the first 2,001,052 zeros of the
38
Riemann zeta function, accurate to within 4e-9.
39
40
REFERENCES:
41
42
- http://www.dtc.umn.edu/~odlyzko/zeta_tables/index.html
43
44
EXAMPLES:
45
46
The following example shows the imaginary part of the 13th
47
nontrivial zero of the Riemann zeta function::
48
49
sage: # optional - database_odlyzko_zeta
50
sage: zz = zeta_zeros()
51
sage: zz[12]
52
59.347044003
53
sage: len(zz)
54
2001052
55
"""
56
from sage.misc.verbose import verbose
57
sobj = os.path.join(SAGE_SHARE, 'odlyzko', 'zeros.sobj')
58
verbose("Loading Odlyzko database from " + sobj)
59
return load(sobj)
60
61