diff --git a/corsika/detail/media/GeomagneticModel.inl b/corsika/detail/media/GeomagneticModel.inl index 6bf0ea20edd43b45c52c7fd3069abbb87491a4af..cb9dc67939bc55ebd684e9049f4f67b74d51c89a 100644 --- a/corsika/detail/media/GeomagneticModel.inl +++ b/corsika/detail/media/GeomagneticModel.inl @@ -149,11 +149,9 @@ namespace corsika { // Schmidt semi-normalization and Condon-Shortley phase term if (p.m > 0) { // Note: n! = tgamma(n+1) - legendre *= sqrt(2 * std::tgamma(p.n - p.m + 1) / std::tgamma(p.n + p.m + 1)) * - pow(-1, p.m); + legendre *= sqrt(2 * std::tgamma(p.n - p.m + 1) / std::tgamma(p.n + p.m + 1)); next_legendre *= - sqrt(2 * std::tgamma(p.n + 1 - p.m + 1) / std::tgamma(p.n + 1 + p.m + 1)) * - pow(-1, p.m); + sqrt(2 * std::tgamma(p.n + 1 - p.m + 1) / std::tgamma(p.n + 1 + p.m + 1)); } derivate_legendre = (p.n + 1) * tan(lat_sph) * legendre -