Skip to content

Fix MSVC build: use arma::datum::pi instead of M_PI in bcnorm.h#10

Merged
config-i1 merged 1 commit into
mainfrom
python
Jun 20, 2026
Merged

Fix MSVC build: use arma::datum::pi instead of M_PI in bcnorm.h#10
config-i1 merged 1 commit into
mainfrom
python

Conversation

@config-i1

Copy link
Copy Markdown
Collaborator

MSVC's does not define M_PI unless _USE_MATH_DEFINES is set before the include, so the Windows wheel compile failed with "'M_PI': undeclared identifier" (and the dependent LN_SQRT_2PI const init error). arma::datum::pi is the same IEEE double, portable, and already the idiom used elsewhere in the engine (PTSmodel.h).

Parity is bit-for-bit unchanged: 21/21 specs still match R (worst 3.48e-9); R side recompiles and runs.

MSVC's <cmath> does not define M_PI unless _USE_MATH_DEFINES is set
before the include, so the Windows wheel compile failed with
"'M_PI': undeclared identifier" (and the dependent LN_SQRT_2PI const
init error). arma::datum::pi is the same IEEE double, portable, and
already the idiom used elsewhere in the engine (PTSmodel.h).

Parity is bit-for-bit unchanged: 21/21 specs still match R (worst
3.48e-9); R side recompiles and runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@config-i1
config-i1 merged commit 2d5f182 into main Jun 20, 2026
5 checks passed
config-i1 added a commit that referenced this pull request Jul 23, 2026
Fix MSVC build: use arma::datum::pi instead of M_PI in bcnorm.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant