Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document JavaScript engine-specific handling of NaN values #989

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tryone144
Copy link
Contributor

As mentioned in #895, I've finally gotten around to add comments to the tests and user-facing functions in the classlib that document potential issues with the JS backend. Since there isn't much we can do about that (other than using a non-JS backend or V8) having it documented should be enough.

Most JavaScript engines perform NaN-canonicalization. This results in
information loss when converting a long to a double and back, iff the
bits encode a non-canonical NaN value.
V8 in chrome seems to be an exception that keeps the bits intact.

The behaviour of Chrome is most likely the reason this inconsistency hasn't been noticed earlier.

This is a follow up to the changes introduced in #749, that surfaced the interface to observe this inconsistency.

Most JavaScript engines perform NaN-canonicalization. This results in
information loss when converting a long to a double and back, iff the
bits encode a non-canonical NaN value.
V8 in chrome seems to be an exception that keeps the bits intact.

See: konsoletyper#895
Related: 8277671
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