--- trunk/OOPSE-4/src/math/RealSphericalHarmonic.cpp 2005/04/15 22:04:00 2204 +++ trunk/OOPSE-4/src/math/RealSphericalHarmonic.cpp 2005/05/11 23:15:05 2223 @@ -41,7 +41,7 @@ #include #include - +#include #include "math/RealSphericalHarmonic.hpp" using namespace oopse; @@ -85,7 +85,8 @@ double RealSphericalHarmonic::LegendreP (int l, int m, // check parameters if (m < 0 || m > l || fabs(x) > 1.0) { printf("LegendreP got a bad argument: l = %d\tm = %d\tx = %lf\n", l, m, x); - return NAN; +// return NAN; + return std::numeric_limits :: quiet_NaN(); } double pmm = 1.0;