-
Notifications
You must be signed in to change notification settings - Fork 110
Add example with -2147483648 #309
Copy link
Copy link
Open
Description
In 4.1.3 Integers section of the spec there is a set of examples listing some valid/invalid integers. Specifically it lists:
2147483648 // OK. Evaluates to -2147483648 (the literal set the sign bit)
But, if you do -2147483648, then you also get -2147483648 (the negation of -2147483648 is -2147483648), you can also do -(-2147483648) to get the same value.
So, it might be worthwhile noting that the negation of -2147483648 is itself?
(This is different then say -2147483649 which becomes 2147483647 because 2147483649 is -2147483647 which then negates as expected)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels