passagemath-lcalc 10.6.40__cp314-cp314-musllinux_1_2_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ # sage_setup: distribution = sagemath-lcalc
2
+
3
+ from sage.all__sagemath_lcalc import *
@@ -0,0 +1,93 @@
1
+ Metadata-Version: 2.4
2
+ Name: passagemath-lcalc
3
+ Version: 10.6.40
4
+ Summary: passagemath: L-function calculations with lcalc
5
+ Author-email: The Sage Developers <sage-support@googlegroups.com>
6
+ Maintainer: Matthias Köppe, passagemath contributors
7
+ License-Expression: GPL-2.0-or-later
8
+ Project-URL: release notes, https://github.com/passagemath/passagemath/releases
9
+ Project-URL: repo (upstream), https://github.com/sagemath/sage
10
+ Project-URL: repo, https://github.com/passagemath/passagemath
11
+ Project-URL: documentation, https://passagemath.org/docs/latest
12
+ Project-URL: homepage (upstream), https://www.sagemath.org
13
+ Project-URL: discourse, https://passagemath.discourse.group
14
+ Project-URL: tracker (upstream), https://github.com/sagemath/sage/issues
15
+ Project-URL: tracker, https://github.com/passagemath/passagemath/issues
16
+ Classifier: Development Status :: 6 - Mature
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Operating System :: POSIX
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Operating System :: MacOS :: MacOS X
22
+ Classifier: Programming Language :: Python :: 3 :: Only
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: 3.14
28
+ Classifier: Programming Language :: Python :: Implementation :: CPython
29
+ Classifier: Topic :: Scientific/Engineering :: Mathematics
30
+ Requires-Python: <3.15,>=3.10
31
+ Description-Content-Type: text/x-rst
32
+ Requires-Dist: passagemath-objects~=10.6.40.0
33
+ Requires-Dist: passagemath-categories~=10.6.40.0
34
+ Requires-Dist: passagemath-modules~=10.6.40.0
35
+ Requires-Dist: memory_allocator
36
+ Requires-Dist: cysignals!=1.12.4; sys_platform == "win32"
37
+ Requires-Dist: cysignals!=1.12.0,>=1.11.2
38
+ Provides-Extra: test
39
+
40
+ ============================================================================
41
+ passagemath: L-function calculations with lcalc
42
+ ============================================================================
43
+
44
+ `passagemath <https://github.com/passagemath/passagemath>`__ is open
45
+ source mathematical software in Python, released under the GNU General
46
+ Public Licence GPLv2+.
47
+
48
+ It is a fork of `SageMath <https://www.sagemath.org/>`__, which has been
49
+ developed 2005-2025 under the motto “Creating a Viable Open Source
50
+ Alternative to Magma, Maple, Mathematica, and MATLAB”.
51
+
52
+ The passagemath fork uses the motto "Creating a Free Passage Between the
53
+ Scientific Python Ecosystem and Mathematical Software Communities."
54
+ It was created in October 2024 with the following goals:
55
+
56
+ - providing modularized installation with pip,
57
+ - establishing first-class membership in the scientific Python
58
+ ecosystem,
59
+ - giving `clear attribution of upstream
60
+ projects <https://groups.google.com/g/sage-devel/c/6HO1HEtL1Fs/m/G002rPGpAAAJ>`__,
61
+ - providing independently usable Python interfaces to upstream
62
+ libraries,
63
+ - offering `platform portability and integration testing
64
+ services <https://github.com/passagemath/passagemath/issues/704>`__
65
+ to upstream projects,
66
+ - inviting collaborations with upstream projects,
67
+ - `building a professional, respectful, inclusive
68
+ community <https://groups.google.com/g/sage-devel/c/xBzaINHWwUQ>`__,
69
+ - `empowering Sage users to participate in the scientific Python ecosystem
70
+ <https://github.com/passagemath/passagemath/issues/248>`__ by publishing packages,
71
+ - developing a port to `Pyodide <https://pyodide.org/en/stable/>`__ for
72
+ serverless deployment with Javascript,
73
+ - developing a native Windows port.
74
+
75
+ `Full documentation <https://passagemath.org/docs/latest/html/en/index.html>`__ is
76
+ available online.
77
+
78
+ passagemath attempts to support and provides binary wheels suitable for
79
+ all major Linux distributions and recent versions of macOS.
80
+
81
+ Binary wheels for native Windows (x86_64) are are available for a subset of
82
+ the passagemath distributions. Use of the full functionality of passagemath
83
+ on Windows currently requires the use of Windows Subsystem for Linux (WSL)
84
+ or virtualization.
85
+
86
+ The supported Python versions in the passagemath 10.6.x series are 3.10.x-3.13.x.
87
+
88
+
89
+ About this pip-installable distribution package
90
+ -----------------------------------------------
91
+
92
+ This pip-installable distribution ``passagemath-lcalc`` provides
93
+ an interface to Michael Rubinstein's L-function calculator.
@@ -0,0 +1,20 @@
1
+ passagemath_lcalc/__init__.py,sha256=0uAqdhSAUtfkrrHBiwfBEWUOayn7nzatzW91I61yuQI,84
2
+ passagemath_lcalc.libs/libLfunction-12654e59.so.2.0.0,sha256=kq66sYrmjU66qy0R91olJ6gRtcRjd8mk2mprjDxB_gM,6233585
3
+ passagemath_lcalc.libs/libgcc_s-2d945d6c.so.1,sha256=NdOgO2If8roY3PSnJ81CsBa1rjMvN_uWPCo_V0ThwEY,203337
4
+ passagemath_lcalc.libs/libgmp-28992bcb.so.10.5.0,sha256=chvEgOPn69KHFEAC4oKOFhJ2LjYfSTYlyAEyFvE1hJg,668217
5
+ passagemath_lcalc.libs/libmpfr-1fc8ea36.so.6.2.2,sha256=6QZDznN7C9yVcv5AG5GpXZWrvxsAw1kqTlkqECWjLIQ,931889
6
+ passagemath_lcalc.libs/libpari-gmp-tls-7a518c9a.so.2.17.2,sha256=RZTunYVUVHz71hX7Ec9snWol9lvwuigxhL6mI2reNt4,11094969
7
+ passagemath_lcalc.libs/libstdc++-85f2cd6d.so.6.0.33,sha256=D3uBWNGP8cz5PIqwr4jUgv7u70AIVsNEjLuj90icFcw,3651889
8
+ sage/all__sagemath_lcalc.py,sha256=D9iHi3nLdsQCdZPBeiqScQWx038s3f7AAakrOTZp6kE,64
9
+ sage/lfunctions/all__sagemath_lcalc.py,sha256=SoqrpDKr69vZp_s5EhcbUzvMZ1xWT7kGPVFzwriXHdA,155
10
+ sage/lfunctions/lcalc.py,sha256=r8AAsv6jZPEoTB7nr1YJ4l012erjpxUNBLsyZsnEgck,12904
11
+ sage/libs/all__sagemath_lcalc.py,sha256=KQWtVG_LW-OnPa5fWIkPbhXFcSDwkvAILxVmAzMNJyw,44
12
+ sage/libs/lcalc/__init__.py,sha256=KQWtVG_LW-OnPa5fWIkPbhXFcSDwkvAILxVmAzMNJyw,44
13
+ sage/libs/lcalc/lcalc_Lfunction.cpython-314-aarch64-linux-musl.so,sha256=kHQ2h2ZmPRxs0eHg8Xmtsm59hpUUO91UskEqZwsbcbE,3552777
14
+ sage/libs/lcalc/lcalc_Lfunction.pxd,sha256=8NThJ5A6o1ASc5Y5pZ6ofA1AjlRM6dX-ypv4imz5MXM,5509
15
+ sage/libs/lcalc/lcalc_Lfunction.pyx,sha256=JHuW-AID04L0mUbwIjY7PSqQEgzNklrKd6CyFM0vL9c,37362
16
+ sage/libs/lcalc/lcalc_sage.h,sha256=gcR7C1PK7mt_xFnDKlBjCvmBMfy2O_Om4fTNZ5Xg6Po,1365
17
+ passagemath_lcalc-10.6.40.dist-info/METADATA,sha256=PgXgthAn6Q14LksoYbek6k5Ruz1H8JW0O_x1eksnry8,4415
18
+ passagemath_lcalc-10.6.40.dist-info/WHEEL,sha256=YkrrUEsfsMGYhv0j9OET9fyyb_PAeJ2gXOscdwOjcyo,113
19
+ passagemath_lcalc-10.6.40.dist-info/top_level.txt,sha256=w-Gg6mn7DamsDDyX5XcGrs4XsZExCoUUOxZi6hsKF5E,24
20
+ passagemath_lcalc-10.6.40.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: false
4
+ Tag: cp314-cp314-musllinux_1_2_aarch64
5
+
@@ -0,0 +1,3 @@
1
+
2
+ passagemath_lcalc
3
+ sage
@@ -0,0 +1,2 @@
1
+ # sage_setup: distribution = sagemath-lcalc
2
+ # delvewheel: patch
@@ -0,0 +1,7 @@
1
+ # sage_setup: distribution = sagemath-lcalc
2
+
3
+ from sage.misc.lazy_import import lazy_import
4
+
5
+ lazy_import("sage.lfunctions.lcalc", "lcalc")
6
+
7
+ del lazy_import
@@ -0,0 +1,413 @@
1
+ # sage_setup: distribution = sagemath-lcalc
2
+ r"""
3
+ Rubinstein's `L`-function calculator
4
+
5
+ This interface provides complete
6
+ access to Rubinstein's lcalc calculator with extra PARI
7
+ functionality compiled in
8
+ and is a standard part of Sage.
9
+
10
+ .. NOTE::
11
+
12
+ Each call to ``lcalc`` runs a complete
13
+ ``lcalc`` process. On a typical Linux system, this
14
+ entails about 0.3 seconds overhead.
15
+
16
+ AUTHORS:
17
+
18
+ - Michael Rubinstein (2005): released under GPL the C++ program lcalc
19
+
20
+ - William Stein (2006-03-05): wrote Sage interface to lcalc
21
+ """
22
+
23
+ # ######################################################################
24
+ # Copyright (C) 2006 William Stein <wstein@gmail.com>
25
+ #
26
+ # Distributed under the terms of the GNU General Public License (GPL)
27
+ #
28
+ # https://www.gnu.org/licenses/
29
+ # ######################################################################
30
+
31
+ import os
32
+
33
+ from sage.structure.sage_object import SageObject
34
+ from sage.misc.lazy_import import lazy_import
35
+ from sage.misc.pager import pager
36
+ from sage.rings.integer_ring import ZZ
37
+ from sage.rings.rational_field import QQ
38
+
39
+ lazy_import('sage.rings.complex_mpfr', 'ComplexField')
40
+ lazy_import('sage.rings.real_mpfr', 'RealField')
41
+ lazy_import('sage.schemes.elliptic_curves.ell_generic', 'EllipticCurve_generic', as_='EllipticCurve')
42
+
43
+ prec = 32
44
+
45
+
46
+ class LCalc(SageObject):
47
+ r"""
48
+ Rubinstein's `L`-functions Calculator.
49
+
50
+ Type ``lcalc.[tab]`` for a list of useful commands that
51
+ are implemented using the command line interface, but return
52
+ objects that make sense in Sage. For each command the possible
53
+ inputs for the `L`-function are:
54
+
55
+
56
+ - ``"`` -- (default) the Riemann zeta function
57
+
58
+ - ``'tau'`` -- the L function of the Ramanujan delta function
59
+
60
+ - ``E`` -- an elliptic curve over `\QQ`; defines `L(E,s)`
61
+
62
+ You can also use the complete command-line interface of
63
+ Rubinstein's `L`-functions calculations program via this
64
+ class. Type ``lcalc.help()`` for a list of commands and
65
+ how to call them.
66
+ """
67
+ def _repr_(self):
68
+ return "Rubinsteins L-function Calculator"
69
+
70
+ def __call__(self, args):
71
+ cmd = 'lcalc %s' % args
72
+ with os.popen(cmd) as f:
73
+ res = f.read().strip()
74
+ return res
75
+
76
+ def _compute_L(self, L):
77
+ if isinstance(L, str):
78
+ if L == 'tau':
79
+ return '--tau'
80
+ return L
81
+ if isinstance(L, EllipticCurve):
82
+ if L.base_ring() == QQ:
83
+ L = L.minimal_model()
84
+ return '-e --a1 %s --a2 %s --a3 %s --a4 %s --a6 %s' % tuple(L.a_invariants())
85
+ raise TypeError("$L$-function of %s not known" % L)
86
+
87
+ def help(self):
88
+ try:
89
+ h = self.__help
90
+ except AttributeError:
91
+ h = "-" * 70 + '\n'
92
+ h += " Call lcalc with one argument, e.g., \n"
93
+ h += " sage: lcalc('--tau -z 1000')\n"
94
+ h += " is translated into the command line\n"
95
+ h += " $ lcalc --tau -z 1000\n"
96
+ h += "-" * 70 + '\n'
97
+ h += '\n' + self('--help')
98
+ self.__help = h
99
+ pager()(h)
100
+
101
+ def zeros(self, n, L=''):
102
+ """
103
+ Return the imaginary parts of the first `n` nontrivial
104
+ zeros of the `L`-function in the upper half plane, as
105
+ 32-bit reals.
106
+
107
+ INPUT:
108
+
109
+ - ``n`` -- integer
110
+
111
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
112
+
113
+ This function also checks the Riemann Hypothesis and makes sure no
114
+ zeros are missed. This means it looks for several dozen zeros to
115
+ make sure none have been missed before outputting any zeros at all,
116
+ so takes longer than
117
+ ``self.zeros_of_zeta_in_interval(...)``.
118
+
119
+ EXAMPLES::
120
+
121
+ sage: lcalc.zeros(4) # long time
122
+ [14.1347251, 21.0220396, 25.0108576, 30.4248761]
123
+ sage: lcalc.zeros(5, L='--tau') # long time
124
+ [9.22237940, 13.9075499, 17.4427770, 19.6565131, 22.3361036]
125
+ sage: lcalc.zeros(3, EllipticCurve('37a')) # long time
126
+ [0.000000000, 5.00317001, 6.87039122]
127
+ """
128
+ L = self._compute_L(L)
129
+ RR = RealField(prec)
130
+ X = self('-z %s %s' % (int(n), L))
131
+ return [RR(z) for z in X.split()]
132
+
133
+ def zeros_in_interval(self, x, y, stepsize, L=''):
134
+ r"""
135
+ Return the imaginary parts of (most of) the nontrivial zeros of the
136
+ `L`-function on the line `\Re(s)=1/2` with positive
137
+ imaginary part between `x` and `y`, along with a
138
+ technical quantity for each.
139
+
140
+ INPUT:
141
+
142
+ - ``x, y, stepsize`` -- positive floating point numbers
143
+
144
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
145
+
146
+ OUTPUT: list of pairs (zero, S(T)).
147
+
148
+ Rubinstein writes: The first column outputs the imaginary part of
149
+ the zero, the second column a quantity related to `S(T)`
150
+ (it increases roughly by 2 whenever a sign change, i.e. pair of
151
+ zeros, is missed). Higher up the critical strip you should use a
152
+ smaller stepsize so as not to miss zeros.
153
+
154
+ EXAMPLES::
155
+
156
+ sage: lcalc.zeros_in_interval(10, 30, 0.1)
157
+ [(14.1347251, 0.184672916), (21.0220396, -0.0677893290), (25.0108576, -0.0555872781)]
158
+ """
159
+ L = self._compute_L(L)
160
+ RR = RealField(prec)
161
+ X = self('--zeros-interval -x %s -y %s --stepsize=%s %s' % (
162
+ float(x), float(y), float(stepsize), L))
163
+ return [tuple([RR(z) for z in t.split()]) for t in X.split('\n')]
164
+
165
+ def value(self, s, L=''):
166
+ r"""
167
+ Return `L(s)` for `s` a complex number.
168
+
169
+ INPUT:
170
+
171
+ - ``s`` -- complex number
172
+
173
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
174
+
175
+ EXAMPLES::
176
+
177
+ sage: I = CC.0
178
+ sage: lcalc.value(0.5 + 100*I)
179
+ 2.69261989 - 0.0203860296*I
180
+
181
+ Note, Sage can also compute zeta at complex numbers (using the PARI
182
+ C library)::
183
+
184
+ sage: (0.5 + 100*I).zeta()
185
+ 2.69261988568132 - 0.0203860296025982*I
186
+ """
187
+ L = self._compute_L(L)
188
+ CC = ComplexField(prec)
189
+ s = CC(s)
190
+ x, y = self('-v -x %s -y %s %s' % (s.real(), s.imag(), L)).split()
191
+ return CC((float(x), float(y)))
192
+
193
+ def values_along_line(self, s0, s1, number_samples, L=''):
194
+ r"""
195
+ Return values of `L(s)` at ``number_samples``
196
+ equally-spaced sample points along the line from `s_0` to
197
+ `s_1` in the complex plane.
198
+
199
+ INPUT:
200
+
201
+ - ``s0, s1`` -- complex numbers
202
+
203
+ - ``number_samples`` -- integer
204
+
205
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
206
+
207
+ OUTPUT: list of pairs `(s, L(s))`, where the `s` are equally spaced
208
+ sampled points on the line from `s_0` to `s_1`
209
+
210
+ EXAMPLES::
211
+
212
+ sage: I = CC.0
213
+ sage: values = lcalc.values_along_line(0.5, 0.5+20*I, 5)
214
+ sage: values[0][0] # abs tol 1e-8
215
+ 0.5
216
+ sage: values[0][1] # abs tol 1e-8
217
+ -1.46035451 + 0.0*I
218
+ sage: values[1][0] # abs tol 1e-8
219
+ 0.5 + 4.0*I
220
+ sage: values[1][1] # abs tol 1e-8
221
+ 0.606783764 + 0.0911121400*I
222
+ sage: values[2][0] # abs tol 1e-8
223
+ 0.5 + 8.0*I
224
+ sage: values[2][1] # abs tol 1e-8
225
+ 1.24161511 + 0.360047588*I
226
+ sage: values[3][0] # abs tol 1e-8
227
+ 0.5 + 12.0*I
228
+ sage: values[3][1] # abs tol 1e-8
229
+ 1.01593665 - 0.745112472*I
230
+ sage: values[4][0] # abs tol 1e-8
231
+ 0.5 + 16.0*I
232
+ sage: values[4][1] # abs tol 1e-8
233
+ 0.938545408 + 1.21658782*I
234
+
235
+ Sometimes warnings are printed (by lcalc) when this command is
236
+ run::
237
+
238
+ sage: E = EllipticCurve('389a')
239
+ sage: values = E.lseries().values_along_line(0.5, 3, 5)
240
+ sage: values[0][0] # abs tol 1e-8
241
+ 0.0
242
+ sage: values[0][1] # abs tol 1e-8
243
+ 0.209951303 + 0.0*I
244
+ sage: values[1][0] # abs tol 1e-8
245
+ 0.5
246
+ sage: values[1][1] # abs tol 1e-8
247
+ 0.0 + 0.0*I
248
+ sage: values[2][0] # abs tol 1e-8
249
+ 1.0
250
+ sage: values[2][1] # abs tol 1e-8
251
+ 0.133768433 - 0.0*I
252
+ sage: values[3][0] # abs tol 1e-8
253
+ 1.5
254
+ sage: values[3][1] # abs tol 1e-8
255
+ 0.360092864 - 0.0*I
256
+ sage: values[4][0] # abs tol 1e-8
257
+ 2.0
258
+ sage: values[4][1] # abs tol 1e-8
259
+ 0.552975867 + 0.0*I
260
+ """
261
+ L = self._compute_L(L)
262
+ CC = ComplexField(prec)
263
+ s0 = CC(s0)
264
+ s1 = CC(s1)
265
+ v = self('--value-line-segment -x %s -y %s -X %s -Y %s --number-samples %s %s' % (
266
+ (s0.real(), s0.imag(), s1.real(), s1.imag(), int(number_samples), L)))
267
+ w = []
268
+ for a in v.split('\n'):
269
+ try:
270
+ x0, y0, x1, y1 = a.split()
271
+ w.append((CC(x0, y0), CC(x1, y1)))
272
+ except ValueError:
273
+ print('lcalc: {}'.format(a))
274
+ return w
275
+
276
+ def twist_values(self, s, dmin, dmax, L=''):
277
+ r"""
278
+ Return values of `L(s, \chi_k)` for each quadratic
279
+ character `\chi_k` whose discriminant `d` satisfies
280
+ `d_{\min} \leq d \leq d_{\max}`.
281
+
282
+ INPUT:
283
+
284
+ - ``s`` -- complex numbers
285
+
286
+ - ``dmin`` -- integer
287
+
288
+ - ``dmax`` -- integer
289
+
290
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
291
+
292
+ OUTPUT: list of pairs `(d, L(s,\chi_d))`
293
+
294
+ EXAMPLES::
295
+
296
+ sage: values = lcalc.twist_values(0.5, -10, 10)
297
+ sage: values[0][0]
298
+ -8
299
+ sage: values[0][1] # abs tol 1e-8
300
+ 1.10042141 + 0.0*I
301
+ sage: values[1][0]
302
+ -7
303
+ sage: values[1][1] # abs tol 1e-8
304
+ 1.14658567 + 0.0*I
305
+ sage: values[2][0]
306
+ -4
307
+ sage: values[2][1] # abs tol 1e-8
308
+ 0.667691457 + 0.0*I
309
+ sage: values[3][0]
310
+ -3
311
+ sage: values[3][1] # abs tol 1e-8
312
+ 0.480867558 + 0.0*I
313
+ sage: values[4][0]
314
+ 5
315
+ sage: values[4][1] # abs tol 1e-8
316
+ 0.231750947 + 0.0*I
317
+ sage: values[5][0]
318
+ 8
319
+ sage: values[5][1] # abs tol 1e-8
320
+ 0.373691713 + 0.0*I
321
+ """
322
+ L = self._compute_L(L)
323
+ CC = ComplexField(prec)
324
+ s = CC(s)
325
+ typ = '--twist-quadratic'
326
+ dmin = int(dmin)
327
+ dmax = int(dmax)
328
+ v = self('-v -x %s -y %s %s --start %s --finish %s %s' % (
329
+ (s.real(), s.imag(), typ, dmin, dmax, L)))
330
+ w = []
331
+ if len(v) == 0:
332
+ return w
333
+ if len(v) == 0:
334
+ return w
335
+ for a in v.split('\n'):
336
+ d, x, y = a.split()
337
+ w.append((ZZ(d), CC(x, y)))
338
+ return w
339
+
340
+ def twist_zeros(self, n, dmin, dmax, L=''):
341
+ r"""
342
+ Return first `n` real parts of nontrivial zeros for each
343
+ quadratic character `\chi_k` whose discriminant `d` satisfies
344
+ `d_{\min} \leq d \leq d_{\max}`.
345
+
346
+ INPUT:
347
+
348
+ - ``n`` -- integer
349
+
350
+ - ``dmin`` -- integer
351
+
352
+ - ``dmax`` -- integer
353
+
354
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
355
+
356
+ OUTPUT: dictionary; keys are the discriminants `d`, and values are list
357
+ of corresponding zeros
358
+
359
+ EXAMPLES::
360
+
361
+ sage: lcalc.twist_zeros(3, -3, 6)
362
+ {-3: [8.03973716, 11.2492062, 15.7046192], 5: [6.64845335, 9.83144443, 11.9588456]}
363
+ """
364
+ L = self._compute_L(L)
365
+ RR = RealField(prec)
366
+ typ = '--twist-quadratic'
367
+ n = int(n)
368
+ v = self('-z %s %s --start %s --finish %s %s' % (
369
+ (n, typ, dmin, dmax, L)))
370
+ w = {}
371
+ if len(v) == 0:
372
+ return w
373
+ for a in v.split('\n'):
374
+ d, x = a.split()
375
+ x = RR(x)
376
+ d = ZZ(d)
377
+ if d in w:
378
+ w[d].append(x)
379
+ else:
380
+ w[d] = [x]
381
+ return w
382
+
383
+ def analytic_rank(self, L=''):
384
+ r"""
385
+ Return the analytic rank of the `L`-function at the central
386
+ critical point.
387
+
388
+ INPUT:
389
+
390
+ - ``L`` -- defines `L`-function (default: Riemann zeta function)
391
+
392
+ OUTPUT: integer
393
+
394
+ .. NOTE::
395
+
396
+ Of course this is not provably correct in general, since it
397
+ is an open problem to compute analytic ranks provably
398
+ correctly in general.
399
+
400
+ EXAMPLES::
401
+
402
+ sage: E = EllipticCurve('37a')
403
+ sage: lcalc.analytic_rank(E)
404
+ 1
405
+ """
406
+ L = self._compute_L(L)
407
+ s = self('--rank-compute %s' % L)
408
+ i = s.find('equals')
409
+ return ZZ(s[i + 6:])
410
+
411
+
412
+ # An instance
413
+ lcalc = LCalc()
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-lcalc
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-lcalc