Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

After searching Google for this issue, I've found myself an answer:

sage: def lchi4(s):
....:     return gp('lfun(lfuncreate(-4), %f)' %s)
....:
sage: lchi4(1)
0.78539816339744830961566084581987572105

I hope this might help for those who have the same problem. Please note that this is not the solution for DirichletGroup(4).list()[1].lfunction() but it works for equivalent function defined in Pari/GP.

After searching Google for this issue, I've found myself an answer:

sage: def lchi4(s):
....:     return gp('lfun(lfuncreate(-4), RR(gp('lfun(lfuncreate(-4), %f)' %s)
%s))
....:
sage: lchi4(1)
0.78539816339744830961566084581987572105
sage: numerical_integral(lambda t: lchi4(t), 2,3)
(0.9465779691617932, 1.163268688464501e-09)

I hope this might help for those who have the same problem. Please note that this is not the solution for DirichletGroup(4).list()[1].lfunction() but and it only works for equivalent function defined in Pari/GP.after changing GP element into RR as shown above.