We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b69e418 + 21b0aa3 commit ae0df9cCopy full SHA for ae0df9c
src/stats.cpp
@@ -86,7 +86,7 @@ arma::colvec dmatnorm_calc(arma::cube& x, arma::mat& mean, arma::mat& U,
86
arma::colvec logresult(x.n_slices);
87
for (int i = 0; i < numslices; i++) {
88
arma::mat XM = x.slice(i) - mean;
89
- logresult(i) = -0.5 * n * p * log(2 * PI) - 0.5 * p * logdetU -
+ logresult(i) = -0.5 * n * p * log(2 * M_PI) - 0.5 * p * logdetU -
90
0.5 * n * logdetV -
91
0.5 * trace(Vinv * trans(XM) * Uinv * XM);
92
}
0 commit comments