This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: psi(1,x) (was: Making some minor contributions to GSL)
On Wed, Jan 21, 2004 at 05:17:51PM -0700, Gerard Jungman wrote:
>
> Now in CVS:
>
> gsl_sf_psi_1_e(double x, gsl_sf_result * r);
> gsl_sf_psi_1_e(double x);
>
> works for all x != 0, -1, -2, ...
Well, golly!
> Also, gsl_sf_psi(int n, double x) will now work for negative x, for
> the cases n=0,1. This feature is un-documented for now, since there
> is no good way to explain that it won't work for n > 1.
?? Well, getting the 'domain error' from GSL is a strong clue...
Also, as to coding style, I find it quite acceptable to put
notes such as this into the header file; its easy enough to
'fix' the header when the code gets fixed.
> Eventually I may be able extend this to all x for n > 1. Perhaps the
> best way is to extend gsl_sf_hzeta(s,q) to handle q < 0, q != 0, -1,
> -2,... This is how I compute the general psi(n,x) case currently,
> for x > 0, using A+S 6.4.10.
Yeah, I see the problem. Using 6.4.10 with (large) negative z
would be bad. And now that you put it that way, I don't know
of any general way of handling the large-n + (large) neg z case.
(I would guess that "most" users would need the smaller-n case,
or the smaller-neg-z, large n case, which can be handeled;
you could report the unsupported domain with a 'domain error'
/application note. )
> Anyway, since you mentioned the case psi(1,.) explicitly in your
> message, I thought I could at least do that for now.
Thanks, it shows up 'naturally' in my calculcations, somehow.
Off-topic, and inapporpriate forum, but I thought I'd ask:
anyone know of any relations for products zeta's?
I need analytic expressions for Sum_n=2 ^inf zetam1(n) * zetam1(n+k)
and/or Sum_n=2 ^inf binomial (s, n) * zetam1(n) * zetam1(n+k)
or anything even vaguely similar ...
Equivalently, I need analytic expressions for
Sum_n=1^inf psi' (1+x+1/n)
I suspect these are hard/unknown, but it doesn't hurt to ask ...
--linas
p.s. Here's one more for your to-do list: Bernoulli numbers & polynomials.