Example #1
0
def newforms(N, recompute=False):
    if N <= 10:
        return []
    p = "%s/%s"%(PATH,N)
    if os.path.exists(p + ".bz2") and not recompute:
        return db.load(p,bzip2=True)
    c = conv(N)
    db.save(c,p, bzip2=True)
    return c
Example #2
0
def newforms(N, recompute=False):
    if N <= 10:
        return []
    p = "%s/%s" % (PATH, N)
    if os.path.exists(p + ".bz2") and not recompute:
        return db.load(p, bzip2=True)
    c = conv(N)
    db.save(c, p, bzip2=True)
    return c
Example #3
0
def zeta_zeros():
    r"""
    List of the imaginary parts of the first 100,000 nontrivial zeros
    of the Riemann zeta function. Andrew Odlyzko computed these to
    precision within `3\cdot 10^{-9}`.
    
    In order to use ``zeta_zeros()``, you will need to
    install the optional Odlyzko database package: ``sage -i
    database_odlyzko_zeta``. You can see a list of all
    available optional packages with ``sage --optional``.
    
    REFERENCES:

    - http://www.dtc.umn.edu/~odlyzko/zeta_tables/
    
    EXAMPLES:
    
    The following example prints the imaginary part of the 13th
    nontrivial zero of the Riemann zeta function. Note that only the
    first 9 digits after the decimal come from the database. Subsequent
    digits are the result of the inherent imprecision of a binary
    representation of decimal numbers.
    
    ::
    
        sage: zz = zeta_zeros() # optional - database_odlyzko_zeta
        sage: zz[12]            # optional - database_odlyzko_zeta
        59.347044003...
    """
    path = os.path.join(misc.SAGE_SHARE, 'odlyzko')
    file = os.path.join(path, 'zeros1')
    if os.path.exists(file + ".pickle"):
        misc.verbose("Loading Odlyzko database from " + file + ".pickle")
        return db.load(file + ".pickle")
    misc.verbose("Creating Odlyzko Database.")
    F = [eval(x) for x in open(file).read().split()]
    db.save(F, file + ".pickle")
    return F
Example #4
0
def zeta_zeros():
    r"""
    List of the imaginary parts of the first 100,000 nontrivial zeros
    of the Riemann zeta function. Andrew Odlyzko computed these to
    precision within `3\cdot 10^{-9}`.
    
    In order to use ``zeta_zeros()``, you will need to
    install the optional Odlyzko database package: ``sage -i
    database_odlyzko_zeta``. You can see a list of all
    available optional packages with ``sage -optional``.
    
    REFERENCES:

    - http://www.dtc.umn.edu/~odlyzko/zeta_tables/
    
    EXAMPLES:
    
    The following example prints the imaginary part of the 13th
    nontrivial zero of the Riemann zeta function. Note that only the
    first 9 digits after the decimal come from the database. Subsequent
    digits are the result of the inherent imprecision of a binary
    representation of decimal numbers.
    
    ::
    
        sage: zz = zeta_zeros() # optional
        sage: zz[12]            # optional
        59.347044003000001
    """
    path = "%s/odlyzko" % PATH
    file = "%s/zeros1" % path
    if os.path.exists(file + ".pickle"):
        misc.verbose("Loading Odlyzko database from " + file + ".pickle")
        return db.load(file + ".pickle")
    misc.verbose("Creating Odlyzko Database.")
    F = [eval(x) for x in open(file).read().split()]
    db.save(F, file + ".pickle")
    return F