My point is that floats *are* Proper Integers: up to 53 bits they can represent every possible integer, and beyond that they can represent certain integers (but those integers, they represent exactly). JS is printing a *different* integer than what the float represents.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
-
Replying to @marcan42 @robertbak
Sure, it's repeatable, and it round-trips, but it's just /wrong/. If the float has a given value, and you print a *different* value, as an integer (not a decimal number that is obviously rounded), that's just messed up. Sure, you can *define* it that way, but still.
1 reply 0 retweets 0 likes -
Replying to @marcan42 @robertbak
Heck, even recent discussion and change to the BigInt spec agree: large Numbers are well-defined as integers. It's ridiculous that converting a Number to a BigInt (which is a safe operation) will change the number that is returned by toString.https://github.com/tc39/proposal-bigint/pull/138 …
0 replies 0 retweets 0 likes -
This Tweet is unavailable.
-
You deleted a tweet about 4611686018427388000 converting to the same number as BigInt. I can't test it because Chrome is using an older version of the draft that forbids that, but nope. Converting what JS calls 4611686018427388000 to BigInt would yield 4611686018427387904n.
1 reply 0 retweets 0 likes -
This Tweet is unavailable.
-
Yes, I linked to that algorithm before in other threads. That algorithm is the problem, and it's stupid and nonsensical. The threshold to break out into e-notation (step 9) should be earlier, instead of padding with trailing zeroes (step 6). No other language does this.
1 reply 0 retweets 0 likes
This would all be much easier if people accepted the fact that the only reason it hasn't been changed is because of backwards compatibility, instead of arguing endlessly for the status quo. Some things are just stupid. Yes, we're stuck with them. That doesn't make them not stupid
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.