Tim Dokchitser's -functions code is in Sage:
http://doc.sagemath.org/html/en/reference/lfunctions/sage/lfunctions/dokchitser.html
more examples here:
https://people.maths.bris.ac.uk/~matyd/computel/
some examples of doing Dokchitser by hand and guessing at Euler factors https://magma.maths.usyd.edu.au/magma/handbook/text/1523
CPU time: 0.00 s, Wall time: 0.02 s
12
11
0.0374412812685155
0.0374412812685155
0.0374412812685155 + 0.0709221123619322*z + 0.0380744761270520*z^2 + O(z^3)
<__builtin__.NFChar instance at 0x7fd031e230e0>
[1]
Error compiling Cython file:
------------------------------------------------------------
...
AUTHOR:
- William Stein
"""
include "stdsage.pxi"
^
------------------------------------------------------------
psage/number_fields/sqrt5/prime.pyx:47:0: 'stdsage.pxi' not found
Error compiling Cython file:
------------------------------------------------------------
...
- William Stein
"""
include "stdsage.pxi"
include "interrupt.pxi"
^
------------------------------------------------------------
psage/number_fields/sqrt5/prime.pyx:48:0: 'interrupt.pxi' not found
Error in lines 1-1
Traceback (most recent call last):
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "psage/eulerprod.py", line 50, in <module>
from number_fields.sqrt5.prime import primes_of_bounded_norm, Prime
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 445, in load_module
language_level=self.language_level)
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 234, in load_module
exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 216, in load_module
inplace=build_inplace, language_level=language_level)
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 192, in build_module
reload_support=pyxargs.reload_support)
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/projects/sage/sage-7.5/local/lib/python/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/projects/sage/sage-7.5/local/lib/python/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "/projects/sage/sage-7.5/local/lib/python/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "/projects/sage/sage-7.5/local/lib/python/distutils/command/build_ext.py", line 499, in build_extension
depends=ext.depends)
File "/projects/sage/sage-7.5/local/lib/python/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/projects/sage/sage-7.5/local/lib/python/distutils/unixccompiler.py", line 126, in _compile
raise CompileError, msg
ImportError: Building module psage.number_fields.sqrt5.prime failed: ["CompileError: command 'gcc' failed with exit status 1\n"]
1.00000000000000
done1
31
169
Twist of L-series of Elliptic Curve defined by y^2 + x*y + phi*y = x^3 + (phi+1)*x^2 + phi*x over Number Field in phi with defining polynomial x^2 - x - 1 by <__builtin__.NFChar instance at 0x7fcfe5d7f440>
done2
Error compiling Cython file:
------------------------------------------------------------
...
AUTHOR:
- William Stein
"""
include "stdsage.pxi"
^
------------------------------------------------------------
prime.pyx:47:0: 'stdsage.pxi' not found
Error compiling Cython file:
------------------------------------------------------------
...
- William Stein
"""
include "stdsage.pxi"
include "interrupt.pxi"
^
------------------------------------------------------------
prime.pyx:48:0: 'interrupt.pxi' not found
Error in lines 1-1
Traceback (most recent call last):
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "psage/eulerprod.py", line 1183, in anlist
if norm(P) <= bound:
File "psage/eulerprod.py", line 2498, in _local_factor
L0 = self._L.local_factor(P, prec)
File "sage/misc/cachefunc.pyx", line 2038, in sage.misc.cachefunc.CachedMethodCaller.__call__ (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:10792)
w = self._instance_call(*args, **kwds)
File "sage/misc/cachefunc.pyx", line 1914, in sage.misc.cachefunc.CachedMethodCaller._instance_call (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:10238)
return self.f(self._instance, *args, **kwds)
File "psage/eulerprod.py", line 1034, in local_factor
"""
File "psage/eulerprod.py", line 1983, in _local_factor
def _local_factor(self, P, prec):
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 445, in load_module
language_level=self.language_level)
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 234, in load_module
exec("raise exc, None, tb", {'exc': exc, 'tb': tb})
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 216, in load_module
inplace=build_inplace, language_level=language_level)
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyximport.py", line 192, in build_module
reload_support=pyxargs.reload_support)
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/projects/sage/sage-7.5/local/lib/python/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/projects/sage/sage-7.5/local/lib/python/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py", line 185, in run
_build_ext.build_ext.run(self)
File "/projects/sage/sage-7.5/local/lib/python/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/Cython/Distutils/old_build_ext.py", line 193, in build_extensions
self.build_extension(ext)
File "/projects/sage/sage-7.5/local/lib/python/distutils/command/build_ext.py", line 499, in build_extension
depends=ext.depends)
File "/projects/sage/sage-7.5/local/lib/python/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/projects/sage/sage-7.5/local/lib/python/distutils/unixccompiler.py", line 126, in _compile
raise CompileError, msg
ImportError: Building module prime failed: ["CompileError: command 'gcc' failed with exit status 1\n"]
1 loops, best of 1: 1.63 s per loop
1 loops, best of 1: 2.3 s per loop
1 loops, best of 1: 1.93 s per loop
1 loops, best of 1: 336 ms per loop
Error in lines 1-1
Traceback (most recent call last):
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "./eulerprod.py", line 1295, in __call__
return self._function(prec(s))(s)
File "sage/misc/cachefunc.pyx", line 2038, in sage.misc.cachefunc.CachedMethodCaller.__call__ (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:10792)
w = self._instance_call(*args, **kwds)
File "sage/misc/cachefunc.pyx", line 1914, in sage.misc.cachefunc.CachedMethodCaller._instance_call (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:10238)
return self.f(self._instance, *args, **kwds)
File "./eulerprod.py", line 1405, in _function
return self._dokchitser(prec, eps, T=T)
File "./eulerprod.py", line 1450, in _dokchitser
X = self.anlist(n, prec)
File "./eulerprod.py", line 1186, in anlist
coefficients = list(coefficients)[0]
File "./eulerprod.py", line 1228, in _compute_anlist
extend_multiplicatively_generic(coefficients)
NameError: global name 'extend_multiplicatively_generic' is not defined
5^2 * 11^2 * 157^2
Error in lines 1-1
Traceback (most recent call last):
File "/projects/sage/sage-7.5/local/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 995, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
File "./eulerprod.py", line 1295, in __call__
return self._function(prec(s))(s)
File "sage/misc/cachefunc.pyx", line 2038, in sage.misc.cachefunc.CachedMethodCaller.__call__ (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:10792)
w = self._instance_call(*args, **kwds)
File "sage/misc/cachefunc.pyx", line 1914, in sage.misc.cachefunc.CachedMethodCaller._instance_call (/projects/sage/sage-7.5/src/build/cythonized/sage/misc/cachefunc.c:10238)
return self.f(self._instance, *args, **kwds)
File "./eulerprod.py", line 1405, in _function
return self._dokchitser(prec, eps, T=T)
File "./eulerprod.py", line 1450, in _dokchitser
X = self.anlist(n, prec)
File "./eulerprod.py", line 1171, in anlist
self._precompute_local_factors(bound+1, prec=prec)
File "./eulerprod.py", line 1932, in _precompute_local_factors
from psage.number_fields.sqrt5.prime import primes_of_bounded_norm, Prime
ImportError: No module named psage.number_fields.sqrt5.prime