help-gsl
[Top][All Lists]
Advanced

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

[Help-gsl] sphPlm problem


From: Zine Smith
Subject: [Help-gsl] sphPlm problem
Date: Thu, 27 Jan 2005 10:54:26 -0800 (PST)

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 
 





reply via email to

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