[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gsl] legendre poly deriv

From: Li Dong
Subject: [Help-gsl] legendre poly deriv
Date: Fri, 10 Nov 2017 00:09:13 -0600


First of all, thanks for this great library! This is my first post in this
group. Sorry if there is any rule I fail to follow.

I was using gsl 1.16 and recently upgraded to 2.3. I found
gsl_sf_legendre_Plm_deriv_array is replaced by gsl_sf_legendre_deriv_array.
Maybe in most cases, this replacement is just fine. However, I find that in
certain cases there is no way to get a result from current

In 1.16, the following code works.
double L[5], DL[5]; // here 5 is just an arbitrary large number to
initialize the array
int lmax = 3, m = 2;
double x=-1.0;
gsl_sf_legendre_Plm_deriv_array (lmax, m, x, L, DL); // If m=1, this line
doesn't work since x=-1.

In 2.3, it needs to be written as:
double L[5], DL[5]; \\ 5 is again arbitrary
int lmax = 3;
double x = -1.0;
gsl_sf_legendre_deriv_array (GSL_SF_LEGENDRE_NONE, lmax, x, L, DL); // this
line won't work since we calculate all 0<=m<=lmax, it breaks when
calculates m=1 and x=-1

I wonder if there is a way around to implement this?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]