--- trunk/src/math/SphericalHarmonic.cpp 2006/09/22 22:19:59 1050 +++ trunk/src/math/SphericalHarmonic.cpp 2006/09/25 22:08:33 1051 @@ -40,6 +40,7 @@ */ #include +#include #include #include "math/SphericalHarmonic.hpp" #include "utils/simError.h" @@ -140,7 +141,7 @@ RealType SphericalHarmonic::Ptilde(int l,int m, RealTy result = 0.; } else { RealType y=(RealType)(2.*l+1.)*Fact(l-m)/Fact(l+m); - result = sqrt(y) * Legendre(l,m,x); + result = mpow(m) * sqrt(y) * Legendre(l,m,x) / sqrt(4.0*M_PI); } return result; }