3 Aug 2012 19:31
incorrect value of gsl_sf_gegenpoly_1 for lambda = 0
victor.zverovich <at> gmail.com <victor.zverovich <at> gmail.com>
2012-08-03 17:31:18 GMT
2012-08-03 17:31:18 GMT
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
RSS Feed