1lcalc(1)                    General Commands Manual                   lcalc(1)
2
3
4

NAME

6       lcalc - Compute zeros and values of L-functions
7

SYNOPSIS

9       lcalc [OPTIONS]
10
11

DESCRIPTION

13       lcalc  is  a command-line program for computing the zeros and values of
14       L-functions. Several L-functions are built-in, and the default  is  the
15       Riemann  zeta function. You can also specify your own L-function in the
16       form of a data file that describes it; see the DATA FILE FORMAT section
17       below.
18
19

COMPUTING ZEROS

21       Given  an  L-function (by default, the Riemann zeta), lcalc can compute
22       its zeros using either the --zeros or --zeros-interval flags. For exam‐
23       ple,
24
25       $ lcalc --zeros 1000
26
27       will  compute  the  first  thousand zeros of the Riemann zeta function,
28       while checking the (generalized) Riemann  hypothesis  and  making  sure
29       that  no  zeros  are  missed. The output consists only of the imaginary
30       parts of the zeros, since all of the real parts should be 0.5.
31
32       The (generalized) Riemann hypothesis is confirmed by comparing the num‐
33       ber  of  zeros found to the main term in the formula for N(T). The dif‐
34       ference, S(T), should be small on average.  If not, then missing  zeros
35       are  detected  and  the  program backtracks looking for sign changes in
36       more refined steps. This is repeated until the missing zeros are  found
37       within reasonable time. Otherwise, the program exits.
38
39       The  found  zeros  are also verified before being output, using the ex‐
40       plicit formula to compare sums over the zeros to sums over primes.  The
41       program  uses  this comparison to dynamically set the output precision,
42       and exits if both sides do not agree to at least two places  after  the
43       decimal.  More  precisely, the Riemann-Weil explicit formula is checked
44       repeatedly, as zeros are outputted. Let the non-trivial zeros  of  L(s)
45       be  1/2  +  i  gamma.  Let f be a function of the form f(x) = exp(-A(x-
46       x_0)^2), where A = log(10)/Digits and Digits is the working  number  of
47       digits  of  precision (fifteen for built in doubles), and x_0 varies as
48       explained shortly.
49
50       Then, the sums over the zeros
51
52                -----
53                 \
54                  )    f(gamma)
55                 /
56                -----
57                gamma
58
59       are computed in two ways to working precision: first using the  numeri‐
60       cally  computed zeros, and second using the explicit formula to express
61       the sum over zeros as a sum over primes powers. These two are compared,
62       and  the  program  uses the amount of agreement between the two to help
63       decide the output precision of the zeros. If the two do not agree to at
64       least two digits after the decimal, then the program quits.
65
66       The  value  x_0 is chosen to coincide with a zero of L(s), say gamma_j,
67       but translated by 0.5 so as to desymmetrize the function f (not  trans‐
68       lating  would leave it an even function, and it would be quadratically,
69       rather than linearly, sensitive to inaccuracies in the zeros).
70
71       At first, a separate test function f is used for  each  of  the  zeros,
72       with  x_0  coinciding with those zeros. After a while, however, a new f
73       is taken only once every five zeros, with x_0 coinciding similarly.
74
75       You can also start after the Nth zero. For example,
76
77       $ lcalc --zeros 5 --N 5
78
79       outputs the sixth through tenth zeros. Caution: the --N  option  evalu‐
80       ates  N(T) by using the formula involving the main term (from the Gamma
81       factors) and S(T). S(T) is computed by looking at the change of arg  of
82       L(s) as one goes from 1/2 - iT to infinity - iT and then up to infinity
83       + iT and to 1/2 + iT. This can take a long time if T is near the  ordi‐
84       nate  of a zero. One could improve this by implementing Turing's method
85       for finding the Nth zero (only looking at sign changes on the  critical
86       line),  or by tweaking the starting point and suppressing a correspond‐
87       ing number of zeros should the program take too long, but for now, only
88       the contour integral is computed.
89
90       A  variant  of Turing's method which only looks on the critical line is
91       used for the --zeros option, to test that all zeros  have  been  found.
92       However, with regards to the --N option, S(T) is initially computed via
93       contour integration to zoom in on the Nth zero.
94
95       If you aren't concerned about verifying the (generalized)  Riemann  hy‐
96       pothesis,  or if you don't expect it to hold (for instance, if you plan
97       to study Dirichlet series without Euler products) then you  can  search
98       for zeros in an "interval" using the --zeros-interval option. For exam‐
99       ple,
100
101       $ lcalc --zeros-interval --x=10 --y=100 --stepsize=0.1
102
103       searches for zeros of the Riemann zeta function in  the  interval  from
104       1/2  +  10i to 1/2 + 100i, checking for sign changes advancing in steps
105       of size 0.1. The first column of the output contains the imaginary part
106       of  the zero, and the second column contains a quantity related to S(T)
107       --- it increases roughly by two whenever a sign change, that is, a pair
108       of  zeros,  is  missed.  Higher  up the critical strip you should use a
109       smaller stepsize so as not to miss zeros. The --zeros-interval  options
110       makes sense if you want to output zeros as they are found.
111
112       The --zeros option, which does verify the (generalized) Riemann hypoth‐
113       esis, looks for several dozen zeros to make sure none have been  missed
114       before  outputting  any zeros at all; as a result, it takes longer than
115       --zeros-interval to output the first few  zeros.  For  collecting  more
116       than  just  a  handful  of zeros, or to make certain that no zeros have
117       been missed, one should use the --zeros option.
118
119

COMPUTING VALUES

121       The lcalc program can also compute the values of an L-function by using
122       the --value flag. For example,
123
124       $ lcalc --value --x=0.5 --y=100
125
126       will  compute  the  value of the (default) Riemann zeta function at the
127       point x + yi = 0.5 + 100i. Both real and complex parts are output, sep‐
128       arated   by  a  space;  in  this  case,  the  output  is  approximately
129       2.692619886 -0.0203860296 which represents zeta(x+yi) =  2.692619886  -
130       0.0203860296i.
131
132       You  can  also  compute  values  along a line segment at equally spaced
133       points:
134
135       $ lcalc --value-line-segment --x=0.5 --X=0.5 --y=0 --Y=10 --number-samples=100
136
137       computes the values of the Riemann zeta function from 0.5 + 0i  through
138       0.5 + 100i at 1000 equally-spaced points. The output contains four col‐
139       umns: the real and imaginary parts of the current point (two  columns),
140       followed  by  the  real  and imaginary parts of the function value (two
141       columns).
142
143

ELLIPTIC CURVE L-FUNCTIONS

145       If lcalc was built with PARI support, the --elliptic-curve  option  can
146       be  combined  with  the  --a1 through --a6 flags to specify an elliptic
147       curve L-function. For example,
148
149       $ lcalc --zeros=5 --elliptic-curve --a1=0 --a2=0 --a3=0 --a4=0 --a6=1
150
151       computes the first five zeros of the L-function associated with the el‐
152       liptic curve y^2 = x^3 + 1.
153
154

TWISTS

156       Twists by Dirichlet characters are currently available for all zeta and
157       cusp-form L-functions. For example,
158
159       $ lcalc --value --x=0.5 --y=0 --twist-quadratic --start -100 --finish 100
160
161       will output L(1/2, chi_d) for d between -100 and 100, inclusive.  Other
162       twisting options are available. For example
163
164       $ lcalc --zeros=200 --twist-primitive --start 3 --finish 100
165
166       gives the first two-hundred zeros of all primitive L(s,chi) with a con‐
167       ductor between 3 and 100, inclusive.
168
169       Notice that with the --twist-quadratic option  one  is  specifying  the
170       discriminant  which  can  be negative, while with the --twist-primitive
171       option one is specifying the conductor which should be positive.
172
173       When using the various twisting options, other than  --twist-quadratic,
174       the  second  output column is a label for the character modulo n. It is
175       an integer between 1 and phi(n). If one  is  restricting  to  primitive
176       charcters,  then  only  a subset of these integers appear in the second
177       column.
178
179       One can obtain a table of characters using the  --output-character  op‐
180       tion.  This  doesn't  work  with the --twist-quadratic option, but does
181       with the other twisting options.
182
183       The --output-character option takes an argument of either 1  or  2.  An
184       argument  of 1, for example, will print a comprehensive table of chi(n)
185       for all gcd(n,conductor) = 1.
186
187       The characters are constructed multiplicatively in terms of  generators
188       of the cyclic groups mod the prime powers that divide n, and there's no
189       simple formula to go from the label to  the  character.  As  a  result,
190       --output-character  will  also output a table for each character before
191       outputting the zeros of the corresponding L-function (but not with  the
192       --twist-quadratic option).
193
194       These tables contain six columns:
195
196
197       1     the value of n
198
199       2     a label for the character, an integer between 1 and phi(n)
200
201       3     the  conductor  of the inducing character (same as the first col‐
202             umn, if primitive).
203
204       4     column 4: m, an integer that is coprime with n
205
206       5     Re(chi(m))
207
208       6     Im(chi(m))
209
210
211       If, instead, --output-character=2 is given,  then  only  the  value  of
212       chi(-1) (that is, whether chi is even or odd) and whether chi is primi‐
213       tive or not will be printed.
214
215

OPTIONS

217       For basic program usage, run
218
219       $ lcalc --help
220
221       Most of lcalc's options are sufficiently explained by its output.  Here
222       we collect some further information about specific options.
223
224
225       --rank-compute, -r
226              Compute  the  analytic  rank.  Analytic rank works well even for
227              high rank since the method used does  not  compute  derivatives,
228              but  rather  looks  at  the behaviour of the L-function near the
229              critical point.
230
231
232       --derivative=<n>, -d <n>
233              Compute the nth derivative. Presently the derivative option uses
234              numeric differentiation (taking linear combinations of L(s + mh)
235              for integers m, to pull out the relevant Taylor  coefficient  of
236              L(s)).  To  get good results with higher derivatives, one should
237              build libLfunction/lcalc with more precision.
238
239

EXAMPLES

241       • Compute the first thousand zeros of the Riemann zeta  function  using
242         the --zeros option, and output their imaginary parts (after verifying
243         that their real parts are all one-half):
244
245         $ lcalc --zeros 1000
246
247       • Compute the value of the Riemann zeta function at x +  iy  using  the
248         --value, --x, and --y options:
249
250         $ lcalc --value --x=0.5 --y=14.134725141738
251
252       • Compute  the first 10 zeros of the Ramanujan tau L-function using the
253         --tau and --zeros (-z) options:
254
255         $ lcalc --tau --zeros=10
256
257       • Compute the first zero of the real quadratic Dirichlet L-function  of
258         conductor  4 after using the --twist-quadratic, --start, and --finish
259         options to specify the L-function:
260
261         $ lcalc --twist-quadratic --start=-4 --finish=-4 --zeros=1
262
263

DATA FILE FORMAT

265       The lcalc -F option allows you to load L-function  data  from  a  file.
266       Here  we explain the format of this file. Basically it must contain the
267       functional equation, Dirichlet coefficients, and some other helpful in‐
268       formation.
269
270       The  first  line should contain an integer, either 1, 2, or 3: 1 speci‐
271       fies that the Dirichlet coefficients are to be given as integers (up to
272       thirty-two  bits  long), 2 that they are floating point numbers, 3 that
273       they are complex numbers. So, for example, the first line would be a  2
274       for  cusp  form or Maass form L-function (we normalize the L-functional
275       so that the functional equation is s <-> 1-s, so the normalized Dirich‐
276       let coefficients for a cusp form L-function are not integers).
277
278       The second line specifies info that the calculator can exploit (or will
279       exploit at some future date). It is an integer that is assigned to dif‐
280       ferent types of L-functions. Currently:
281
282-2 for L(s,chi) but where the number of coefficients computed is less
283         than the period
284
285-1 for zeta
286
2870 for unknown
288
2891 for periodic, including L(s,chi)
290
2912 for cusp form (in S_K(Gamma_0(N))
292
2933 for Maass form for SL_2(Z)
294
295       • other integers reserved for future types.
296
297         The third line is an integer that specifies how many Dirichlet  coef‐
298         ficients  to  read  from the file; there should be at least this many
299         Dirichlet coefficients in the file. This  is  a  useful  quantity  to
300         specify  sincethe  data file might have, say, a million coefficients,
301         but one might want to read in just ten thousand of them.
302
303         The fourth line is either 0, if the Dirichlet  coefficients  are  not
304         periodic, or a positive integer specifying the period otherwise (this
305         happens in the case of Dirichlet L-functions). For a  Maass  form  it
306         should be 0.
307
308         The  fifth  line is a positive integer, the quasi-degree. This is the
309         number of gamma factors of the form Gamma(gamma s +  lambda)  in  the
310         functional  equation, where gamma is either 0.5 or 1, and lambda is a
311         complex number with Re(lambda) >= 0. For example, it is 1 for Dirich‐
312         let  L-functions,  1  for  cusp form L-functions, 2 for Maass form L-
313         functions, etc. Note that the "1" for cusp form L-functions could  be
314         a "2" if you wish to split the gamma factor up using the Legendre du‐
315         plication formula. But it's better not to.
316
317         Next come the gamma factors, with two lines for  each  gamma  factor.
318         The first of each pair of lines contains gamma (either 0.5 or 1), and
319         the second line contains a pair of floating point  numbers  separated
320         by a space specifying the real and imaginary parts of lambda (even if
321         purely real, lambda should be given as a pair of numbers, the  second
322         one then being 0).
323
324         Next you specify the functional equation. Let
325
326                              a
327                           --------'
328                          '  |  |
329                             |  |
330           Lambda(s) = Q^s   |  |  Gamma(gamma_j*s + lambda_j)*L(s)
331                             |  |
332                            j = 1
333
334         satisfy  Lambda(s) = omega*conj(Lambda(1-conj(s))), where Q is a real
335         number, omega is complex,and "conj" denotes  the  complex  conjugate.
336         Notice that the functional equation is s into 1-s; that is, the gamma
337         factors and Dirichlet coefficients of L(s) should be normalized  cor‐
338         rectly so as to have critical line Re(s) = 1/2.
339
340         The next line in the datafile is Q giving as a floating point number,
341         and the one after that gives omega as a pair x y  of  floating  point
342         numbers,  specifying the real and imaginary parts of omega (even when
343         omega is unity, it should be given as a pair of floating points,  for
344         example 1 0 to indicate 1 + 0i).
345
346         We need to allow for the possibility of poles. For example, if L(s) =
347         zeta(s) then Lambda(s) has simple poles with residue  1  at  s=1  and
348         residue  -1 at s=0.  To take into account such possibilities I assume
349         that Lambda(s) has at most simple poles.  So, the next line specifies
350         the number of poles (usually 0) and then, for each pole there are two
351         lines. The first line in each pair gives the pole x+iy as a pair x  y
352         of  floating  point numbers. The second line specifies the residue at
353         that pole, also as a pair of floating point numbers.
354
355         Finally the Dirichlet coefficients. The remaining lines in  the  file
356         contain  a  list of Dirichlet coefficients, at least as many as indi‐
357         cated in line three of the datafile. The coefficients  can  be  inte‐
358         gers, real, or complex. If complex they should, as usual, be given as
359         a pair x y of floating point numbers separated by a space.  Otherwise
360         they  should  be given as single column of integers or floating point
361         numbers respectively.
362
363         The datafile should only contain numbers and no  comments.  The  com‐
364         ments  below  are  for the sake of understanding the structure of the
365         datafile.
366
367         An example data file for the Maass form for SL_2(Z) associated to the
368         eigenvalue  with  R  =  13.779751351891  is  given below (beware: the
369         Dirichlet coefficients for this particular L-function are only  accu‐
370         rate  to a handful of decimal places, especially near the tail of the
371         file).
372
373         2                    the Dirichlet coefficients are real
374         3                    this is a Maass form L-function
375         29900                use this many of the Dirichlet coefficients
376         0                    zero since the coefficients are not periodic
377         2                    two gamma factors
378         .5                   the first gamma factor
379         0 6.88987567594535   the first lambda
380         .5                   the second gamma factor
381         0 -6.88987567594535  the second lambda
382         .3183098861837906715 the Q in the functional equation
383         1 0                  the omega 1 + 0i in the functional equation
384         0                    the number of poles of Lambda(s)
385         1                    the first Dirichlet coefficient
386         1.549304477941       the second Dirichlet coefficient
387         0.246899772454       the third Dirichlet coefficient
388         1.400344365369       the fourth Dirichlet coefficient
389         ...
390
391         Several such example data files are included with lcalc.
392
393

BUGS

395       Report bugs to https://gitlab.com/sagemath/lcalc/issues
396
397
398
399                                                                      lcalc(1)
Impressum