Package sage :: Package lfunctions :: Module lcalc :: Class LCalc
[hide private]
[frames] | no frames]

Class LCalc

source code

                      object --+    
                               |    
structure.sage_object.SageObject --+
                                   |
                                  LCalc


Rubinstein's $L$-functions Calculator

Type \code{lcalc.[tab]} for a list of useful commands that are
implemented using the command line interface, but return objects
that make sense in SAGE.  For each command the possible inputs
for the L-function are:
\begin{itemize}
   \item   \code{ ''} -- (default) the Riemann zeta function
   \item   \code{ 'tau'} -- the L function of the Ramanujan delta function
   \item   elliptic curve E -- where E is an elliptic curve over $\QQ$; defines $L(E,s)$
\end{itemize}

You can also use the complete command-line interface of
Rubinstein's $L$-functions calculations program via this class.
Type \code{lcalc.help()} for a list of commands and how to call
them.



Instance Methods [hide private]
 
_repr_(self) source code
 
__call__(self, args) source code
 
_compute_L(self, L) source code
 
help(self) source code
 
zeros(self, n, L='')
Return the imaginary parts of the first $n$ nontrivial zeros of the $L$-function in the upper half plane, as 32-bit reals.
source code
 
zeros_in_interval(self, x, y, stepsize, L='')
Return the imaginary parts of (most of) the nontrivial zeros of the $L$-function on the line $\Re(s)=1/2$ with positive imaginary part between $x$ and $y$, along with a technical quantity for each.
source code
 
value(self, s, L='')
Return $L(s)$ for $s$ a complex number.
source code
 
values_along_line(self, s0, s1, number_samples, L='')
Return values of $L(s)$ at \code{number_samples} equally-spaced sample points along the line from $s_0$ to $s_1$ in the complex plane.
source code
 
twist_values(self, s, dmin, dmax, L='')
Return values of $L(s, \chi_d)$ for each quadratic character $\chi_d$ for $d_{\min} \leq d \leq d_{\max}$.
source code
 
twist_zeros(self, n, dmin, dmax, L='')
Return first $n$ real parts of nontrivial zeros for each quadratic character $\chi_d$ for $d_{\min} \leq d \leq d_{\max}$.
source code
 
analytic_rank(self, L='')
Return the analytic rank of the $L$-function at the central critical point.
source code

Inherited from structure.sage_object.SageObject: __hash__, __new__, __repr__, _axiom_, _axiom_init_, _gap_, _gap_init_, _gp_, _gp_init_, _interface_, _interface_init_, _interface_is_cached_, _kash_, _kash_init_, _macaulay2_, _macaulay2_init_, _magma_, _magma_init_, _maple_, _maple_init_, _mathematica_, _mathematica_init_, _maxima_, _maxima_init_, _octave_, _octave_init_, _pari_, _pari_init_, _r_init_, _sage_, _singular_, _singular_init_, category, db, dump, dumps, plot, rename, reset_name, save, version

Inherited from object: __delattr__, __getattribute__, __init__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

zeros(self, n, L='')

source code 

Return the imaginary parts of the first $n$ nontrivial zeros
of the $L$-function in the upper half plane, as 32-bit reals.

INPUT:
    n -- integer
    L -- defines $L$-function (default: Riemann zeta function)

This function also checks the Riemann Hypothesis and makes
sure no zeros are missed.  This means it looks for several
dozen zeros to make sure none have been missed before
outputting any zeros at all, so takes longer than
\code{self.zeros_of_zeta_in_interval(...)}.

EXAMPLES:
    sage: lcalc.zeros(4)                           # long
    [14.1347251, 21.0220396, 25.0108576, 30.4248761]
    sage: lcalc.zeros(5, L='--tau')                # long
    [9.22237940, 13.9075499, 17.4427770, 19.6565131, 22.3361036]
    sage: lcalc.zeros(3, EllipticCurve('37a'))     # long
    [0.000000000, 5.00317001, 6.87039122]

zeros_in_interval(self, x, y, stepsize, L='')

source code 

Return the imaginary parts of (most of) the nontrivial zeros
of the $L$-function on the line $\Re(s)=1/2$ with
positive imaginary part between $x$ and $y$, along with a
technical quantity for each.

INPUT:
    x, y, stepsize -- positive floating point numbers
    L -- defines $L$-function (default: Riemann zeta function)

OUTPUT:
    list of pairs (zero, S(T)).

Rubinstein writes: The first column outputs the imaginary part
of the zero, the second column a quantity related to $S(T)$ (it
increases roughly by 2 whenever a sign change, i.e. pair of
zeros, is missed). Higher up the critical strip you should use
a smaller stepsize so as not to miss zeros.

EXAMPLES:
    sage: lcalc.zeros_in_interval(10, 30, 0.1)
    [(14.1347251, 0.184672916), (21.0220396, -0.0677893290), (25.0108576, -0.0555872781)]

value(self, s, L='')

source code 

Return $L(s)$ for $s$ a complex number.

INPUT:
    s -- complex number
    L -- defines $L$-function (default: Riemann zeta function)

EXAMPLES:
    sage: I = CC.0
    sage: lcalc.value(0.5 + 100*I)
    2.69261989 - 0.0203860296*I

Note, SAGE can also compute zeta at complex numbers (using
the PARI C library):
    sage: (0.5 + 100*I).zeta()
    2.69261988568132 - 0.0203860296025982*I

values_along_line(self, s0, s1, number_samples, L='')

source code 

Return values of $L(s)$ at \code{number_samples}
equally-spaced sample points along the line from $s_0$ to
$s_1$ in the complex plane.

INPUT:
    s0, s1 -- complex numbers
    number_samples -- integer
    L -- defines $L$-function (default: Riemann zeta function)
    
OUTPUT:
    list -- list of pairs (s, zeta(s)), where the s are
            equally spaced sampled points on the line from
            s0 to s1.

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)]

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, 0.209951303),
     (0.500000000, -...e-16),
     (1.00000000, 0.133768433),
     (1.50000000, 0.360092864),
     (2.00000000, 0.552975867)]

twist_values(self, s, dmin, dmax, L='')

source code 

Return values of $L(s, \chi_d)$ for each quadratic
character $\chi_d$ for $d_{\min} \leq d \leq d_{\max}$.

INPUT:
    s -- complex numbers
    dmin -- integer
    dmax -- integer
    L -- defines $L$-function (default: Riemann zeta function)

OUTPUT:
    list -- list of pairs (d, L(s,chi_d))

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)]

twist_zeros(self, n, dmin, dmax, L='')

source code 

Return first $n$ real parts of nontrivial zeros for each
quadratic character $\chi_d$ for $d_{\min} \leq d \leq
d_{\max}$.

INPUT:
    n -- integer
    dmin -- integer
    dmax -- integer
    L -- defines $L$-function (default: Riemann zeta function)

OUTPUT:
    dict -- keys are the discriminants $d$, and
            values are list of corresponding zeros.

EXAMPLES:
    sage: lcalc.twist_zeros(3, -3, 6)
    {-3: [8.03973716, 11.2492062, 15.7046192], 5: [6.64845335, 9.83144443, 11.9588456]}

analytic_rank(self, L='')

source code 

Return the analytic rank of the $L$-function at the central
critical point.

INPUT:
    L -- defines $L$-function (default: Riemann zeta function)

OUTPUT:
    integer
    
\note{Of course this is not provably correct in general, since
it is an open problem to compute analytic ranks provably
correctly in general.}

EXAMPLES:
    sage: E = EllipticCurve('37a')
    sage: lcalc.analytic_rank(E)
    1