IAP GITLAB

Skip to content
Snippets Groups Projects
Commit b7d0a10a authored by ralfulrich's avatar ralfulrich
Browse files

de-boost

parent bfc55577
No related branches found
No related tags found
No related merge requests found
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
#include <corsika/framework/utility/CorsikaData.hpp> #include <corsika/framework/utility/CorsikaData.hpp>
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/math/special_functions/factorials.hpp>
#include <boost/math/special_functions/legendre.hpp>
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
...@@ -145,17 +143,17 @@ namespace corsika { ...@@ -145,17 +143,17 @@ namespace corsika {
p.g = p.g + (year - epoch) * p.dg; p.g = p.g + (year - epoch) * p.dg;
p.h = p.h + (year - epoch) * p.dh; p.h = p.h + (year - epoch) * p.dh;
legendre = boost::math::legendre_p(p.n, p.m, sin(lat_sph)); legendre = pow(-1, p.m) * std::assoc_legendre(p.n, p.m, sin(lat_sph));
next_legendre = boost::math::legendre_p(p.n + 1, p.m, sin(lat_sph)); next_legendre = pow(-1, p.m) * std::assoc_legendre(p.n + 1, p.m, sin(lat_sph));
// Schmidt semi-normalization and Condon-Shortley phase term // Schmidt semi-normalization and Condon-Shortley phase term
if (p.m > 0) { if (p.m > 0) {
legendre *= sqrt(2 * boost::math::factorial<double>(p.n - p.m) / // Note: n! = tgamma(n+1)
boost::math::factorial<double>(p.n + p.m)) * legendre *= sqrt(2 * std::tgamma(p.n - p.m + 1) / std::tgamma(p.n + p.m + 1)) *
pow(-1, p.m); pow(-1, p.m);
next_legendre *= sqrt(2 * boost::math::factorial<double>(p.n + 1 - p.m) / next_legendre *=
boost::math::factorial<double>(p.n + 1 + p.m)) * sqrt(2 * std::tgamma(p.n + 1 - p.m + 1) / std::tgamma(p.n + 1 + p.m + 1)) *
pow(-1, p.m); pow(-1, p.m);
} }
derivate_legendre = derivate_legendre =
(p.n + 1) * tan(lat_sph) * legendre - (p.n + 1) * tan(lat_sph) * legendre -
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment