help-gsl
[Top][All Lists]
Advanced

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

Re: [Help-gsl] sphPlm problem


From: Zine Smith
Subject: Re: [Help-gsl] sphPlm problem
Date: Thu, 27 Jan 2005 11:45:07 -0800 (PST)

Forgot, the failure happens for n=3 m=1

--- Zine Smith <address@hidden> wrote:

> In writing a piece of software that utilizes
> spherical
> harmonics, thus gsl_sf_legendre_sphPlm, I
> encountered
> a problem that I can't run down in the documentation
> or otherwise.  sphPlm is returning nan.  The
> important
> section of the code is below along with the output. 
> I'm on a Linux using gcc.
>    
>    double phi = gsl_vector_get(position,1);
>    double sinPhi = gsl_sf_sin(phi), rsphPlm = 0.0;  
>  
>                                                     
>  
>                                                     
>  
>            
>    for (n=2;n<=nMax;n++)
>    {
>       for (m=0;m<=n;m++)
>       {
>          rsphPlm = gsl_sf_legendre_sphPlm
> (n,m,sinPhi);
>          printf("phi: %g  sin(phi): %g  L(sin(phi)):
>                             
> %g\n",phi,sinPhi,rsphPlm);
>       }
>     }
> 
> output
> 
> phi: 8.71031e-11  sin(phi): 8.71031e-11 
> L(sin(phi)):
> nan
> 
> Thanks for your help
> Zine
> 
> 
>               
> __________________________________ 
> Do you Yahoo!? 
> The all-new My Yahoo! - Get yours free! 
> http://my.yahoo.com 
>  
> 
> 
> 
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
> 



                
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 




reply via email to

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