Skip to content

Commit ae0df9c

Browse files
authored
Merge pull request #1 from eddelbuettel/master
Switch one PI to M_PI to support STRICT_R_HEADERS in Rcpp
2 parents b69e418 + 21b0aa3 commit ae0df9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stats.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ arma::colvec dmatnorm_calc(arma::cube& x, arma::mat& mean, arma::mat& U,
8686
arma::colvec logresult(x.n_slices);
8787
for (int i = 0; i < numslices; i++) {
8888
arma::mat XM = x.slice(i) - mean;
89-
logresult(i) = -0.5 * n * p * log(2 * PI) - 0.5 * p * logdetU -
89+
logresult(i) = -0.5 * n * p * log(2 * M_PI) - 0.5 * p * logdetU -
9090
0.5 * n * logdetV -
9191
0.5 * trace(Vinv * trans(XM) * Uinv * XM);
9292
}

0 commit comments

Comments
 (0)