Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dokchitser: Pass internal parameter over properly #38482

Merged
merged 3 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions src/sage/lfunctions/dokchitser.py
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,10 @@ def __call__(self, s, c=None):

- ``s`` -- complex number

- ``c`` -- internal parameter, call with `c>1` to get the same value
with a different cutoff point (`c` close to `1`); should return the
same answer, good to check if everything works with right precision

.. NOTE::

Evaluation of the function takes a long time, so each
Expand All @@ -500,16 +504,28 @@ def __call__(self, s, c=None):
0.00000000000000000000000000000
sage: L(1+I)
-1.3085436607849493358323930438 + 0.81298000036784359634835412129*I
sage: L(1+I, 1.2)
-1.3085436607849493358323930438 + 0.81298000036784359634835412129*I

TESTS::

sage: L(1+I, 0)
Traceback (most recent call last):
...
RuntimeError
"""
self.__check_init()
s = self.__CC(s)
try:
return self.__values[s]
return self.__values[s, c]
except AttributeError:
self.__values = {}
except KeyError:
pass
z = self._gp_call_inst('L', s)
if c is None:
z = self._gp_call_inst('L', s)
else:
z = self._gp_call_inst('L', s, c)
CC = self.__CC
if 'pole' in z:
print(z)
Expand All @@ -522,10 +538,10 @@ def __call__(self, s, c=None):
msg = z[:i].replace('digits', 'decimal digits')
verbose(msg, level=-1)
ans = CC(z[i + 1:])
self.__values[s] = ans
self.__values[s, c] = ans
return ans
ans = CC(z)
self.__values[s] = ans
self.__values[s, c] = ans
return ans

def derivative(self, s, k=1):
Expand Down
6 changes: 4 additions & 2 deletions src/sage/modular/modform/l_series_gross_zagier.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __call__(self, s, der=0):

- ``s`` -- complex number

- ``der`` -- (default: 0)
- ``der`` -- order of derivative (default: 0)

EXAMPLES::

Expand All @@ -84,8 +84,10 @@ def __call__(self, s, der=0):
sage: G = GrossZagierLseries(e, A)
sage: G(3)
-0.272946890617590
sage: G(3, 1)
0.212442670030741
"""
return self._dokchister(s, der)
return self._dokchister.derivative(s, der)

def taylor_series(self, s=1, series_prec=6, var='z'):
r"""
Expand Down
Loading