[SciPy-User] polylogarithm?

Johann Cohen-Tanugi johann.cohen-tanugi@lupm.univ-montp2...
Fri Sep 23 11:39:23 CDT 2011



On 09/23/2011 06:18 PM, Pauli Virtanen wrote:
> Fri, 23 Sep 2011 15:21:12 +0200, Johann Cohen-Tanugi wrote:
> [clip]
>> zetac(z) knows how to eat negative arguments, but not zeta(z,1).... Is
>> there a reason why special.zeta does not default to 1+special.zetac for
>> s=1? This would make the behavior of the 2 functions more identical.
> Probably no reason, except that it wasn't implemented. mpmath is
> impressive, and in several ways ahead of scipy.special --- or at least in
> the parts where the problems overlap, as you can do tricks with arbitrary
> precision that are not really feasible.
>
> Note that if you need to call the zeta function from the Cython extension,
> call the C library directly:
>
> 	cdef extern from "cephes.h":
> 	    double zeta(double x, double q)
> 	    double zetac(double x)
thanks Pauli, is it what is exposed to special.zeta? I guess so, so what 
you are saying is that by going from cephes/zeta to special.zeta back 
into C in a pyx code I pay a penalty, correct? I am in the middle of a 
completely unknown territory, so I need to clarify every step as much as 
I can.


> and link the extension with the "sc_cephes" library.
>
>      ***
>
> There's a formula (look in the mpmath sources ;) for the transform
> from x<  0 to x>  0 for zeta(x, a) for general a. But that needs polylog.
>
> The implementation for zetac(x) for x<  0 seems also a bit incomplete,
> as it goes only down to -30.8148. It seems this is due to a silly reason,
> it should use gammaln instead of Gamma to avoid the overflow.
>
> 	Pauli
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>


More information about the SciPy-User mailing list