Skip to content

Fix inaccuracy about NaN sign bit#44707

Open
zacklukem wants to merge 2 commits into
mdn:mainfrom
zacklukem:patch-1
Open

Fix inaccuracy about NaN sign bit#44707
zacklukem wants to merge 2 commits into
mdn:mainfrom
zacklukem:patch-1

Conversation

@zacklukem

Copy link
Copy Markdown

Description

  • Fix inaccuracy about changing NaN sign bit
  • Add note about platform dependance in the example

Motivation

Previously this example claimed that the example code was changing the sign bit of the float, which doesn't effect NaN values. However, the example was actually modifying the fraction component (which also doesn't affect NaN values).

These changes correct that inaccuracy by being less specific about why the bit change still results in a NaN value.

Additional details

https://en.wikipedia.org/wiki/NaN#Encoding

Related issues and pull requests

@zacklukem zacklukem requested a review from a team as a code owner July 13, 2026 21:58
@zacklukem zacklukem requested review from sideshowbarker and removed request for a team July 13, 2026 21:58
@github-actions github-actions Bot added Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed labels Jul 13, 2026
Comment thread files/en-us/web/javascript/guide/equality_comparisons_and_sameness/index.md Outdated
Comment thread files/en-us/web/javascript/guide/equality_comparisons_and_sameness/index.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:JS JavaScript docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants