[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] gsl_sf_legendre_Plm_e sign error
From: |
Robin Hankin |
Subject: |
[Help-gsl] gsl_sf_legendre_Plm_e sign error |
Date: |
Wed, 10 Nov 2004 09:13:09 +0000 |
Hi everyone.
(newbie here. I've been lurking for a while).
I'm working with Legendre functions and I'm trying to reproduce
Abramowitz and Stegun's
figure 8.2 which shows $P^1_n(x)$.
Here's the relevant bit of my code. I am a C novice! (any advice on coding
style gratefully received).
void legendre_Plm_e(int *l, int *m, double *x, int *nx, double *val,
double *err, int *status)
{
int i;
gsl_sf_result result;
gsl_set_error_handler_off();
for(i = 0; i< *nx ; i++){
status[i] = gsl_sf_legendre_Plm_e(*l, *m, x[i] , &result) ;
val[i] = result.val;
err[i] = result.err;
}
}
I get a sign error: A&S have $P_1^1(0) ==1$, and I get -1.
Could anyone confirm that I've not introduced an invisible minus sign
into my coding?
best wishes
--
Robin Hankin
Uncertainty Analyst
Southampton Oceanography Centre
SO14 3ZH
tel +44(0)23-8059-7743
address@hidden (edit in obvious way; spam precaution)
- [Help-gsl] gsl_sf_legendre_Plm_e sign error,
Robin Hankin <=
- Message not available
- Re: [Help-gsl] gsl_sf_legendre_Plm_e sign error, Brian Gough, 2004/11/11
- Re: [Help-gsl] gsl_sf_legendre_Plm_e sign error, Brian Gough, 2004/11/15
- Re: [Help-gsl] gsl_sf_legendre_Plm_e sign error, Robin Hankin, 2004/11/15
- [Help-gsl] a new wrapper for the GSL, Robin Hankin, 2004/11/18
- Re: [Help-gsl] a new wrapper for the GSL, Brian Gough, 2004/11/19
- Re: [Help-gsl] a new wrapper for the GSL, Robin Hankin, 2004/11/19
- Re: [Help-gsl] a new wrapper for the GSL, Andre Lehovich, 2004/11/19
- Re: [Help-gsl] a new wrapper for the GSL, Brian Gough, 2004/11/22
- [Help-gsl] problem with gsl_sf_elljac_e, Robin Hankin, 2004/11/24