| # | Line 40 | Line 40 | |
|---|---|---|
| 40 | */ | |
| 41 | ||
| 42 | #include <stdio.h> | |
| 43 | + | #include <cmath> |
| 44 | #include <limits> | |
| 45 | #include "math/SphericalHarmonic.hpp" | |
| 46 | #include "utils/simError.h" | |
| # | Line 140 | Line 141 | RealType SphericalHarmonic::Ptilde(int l,int m, RealTy | |
| 141 | result = 0.; | |
| 142 | } else { | |
| 143 | RealType y=(RealType)(2.*l+1.)*Fact(l-m)/Fact(l+m); | |
| 144 | < | result = sqrt(y) * Legendre(l,m,x); |
| 144 | > | result = mpow(m) * sqrt(y) * Legendre(l,m,x) / sqrt(4.0*M_PI); |
| 145 | } | |
| 146 | return result; | |
| 147 | } | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |