Skip to content

Clarify NaN sentinel identity comparisons - #122

Open
quinnj wants to merge 1 commit into
mainfrom
docs/nan-sentinel-identity
Open

quinnj wants to merge 1 commit into
mainfrom
docs/nan-sentinel-identity

Conversation

@quinnj

@quinnj quinnj commented Sep 22, 2026

Copy link
Copy Markdown
Member

Clarify that same-type Real values use === when matching a sentinel. A floating-point NaN sentinel therefore matches its own representation; other NaN representations remain data. This explains the behavior reported in #104 and documents normalization when every input NaN should mean missing.

Runtime behavior is unchanged. Replacing this comparison with isequal would discard the distinction between the sentinel and other stored NaNs.

Validation:36 local checks cover Float16/32/64 sentinel matching, preservation of other NaN representations, assignment, normalization, and signed zero on Julia1.6.7 and1.12.6. No runtime or test files changed.

Co-authored by Codex

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