Skip to content

Commit

Permalink
Merge pull request #14 from eddelbuettel/master
Browse files Browse the repository at this point in the history
Switch one PI to M_PI to support STRICT_R_HEADERS
  • Loading branch information
schw4b authored Dec 5, 2021
2 parents b26d3a1 + d0ce892 commit 7888f46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dlmlpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ arma::rowvec dlmLplCpp(NumericVector Yt_, NumericMatrix Ft_, double delta, doubl

// Log Predictive Likelihood
// in the original R code the asignment was to lpl(t) and the first values was discarded, so we use here lpl(t-1)
lpl(t-1) = lgamma((nt(t-1)+1)/2)-lgamma(nt(t-1)/2)-0.5*log(PI*nt(t-1)*Qt(t))-((nt(t-1)+1)/2)*log(1+(1/nt(t-1))*(et*et)/Qt(t));
lpl(t-1) = lgamma((nt(t-1)+1)/2)-lgamma(nt(t-1)/2)-0.5*log(M_PI*nt(t-1)*Qt(t))-((nt(t-1)+1)/2)*log(1+(1/nt(t-1))*(et*et)/Qt(t));
}

// Debug print to console
Expand Down

0 comments on commit 7888f46

Please sign in to comment.