Simplify definition of NaN#704
Closed
bnoordhuis wants to merge 1 commit intoquickjs-ng:masterfrom
Closed
Conversation
Contributor
|
ha, it does work! |
saghul
approved these changes
Nov 18, 2024
Contributor
|
I don't have a strong opinion whether we should have this or the current one in master. |
f90eeb5 to
60c6eed
Compare
Replace u64->double bitcast with 0.0/0.0. Change definition of JS_FLOAT64_NAN in the same way because that lets us drop <math.h> from quickjs.h. Replace INFINITY and -INFINITY with 1.0/0.0 and -1.0/0.0 respectively because we already defined globalThis.INFINITY that way and so we might as well go all the way.
60c6eed to
78c5fa0
Compare
Contributor
Author
|
Ha, you were right w.r.t 0.0/0.0 - VS 2019 rejects it. Definitely a compiler bug but okay, that settles that, closing.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace u64->double bitcast with 0.0/0.0
Because I'm curious if it really works everywhere (it should)