victor.zverovich@gmail.com | 3 Aug 2012 19:31
Picon
Gravatar

incorrect value of gsl_sf_gegenpoly_1 for lambda = 0

Hi All,

gsl_sf_gegenpoly_1(0, x) returns (2 x) instead of 0. Here's a small example
that reproduces the bug:

#include <stdio.h>
#include <gsl/gsl_sf_gegenbauer.h>

int main() {
  printf("%g\n", gsl_sf_gegenpoly_1(0, 42));
  return 0;
}

$ gcc test.c -lgsl -lgslcblas
$ ./a.out
84

Since C^{(\lambda)}_1(x) = 2 \lambda x (
http://mathworld.wolfram.com/GegenbauerPolynomial.html), gsl_sf_gegenpoly_1(0,
42) should return 0.

Best regards,
Victor


Gmane