Challenge: what's the smallest positive integer for which this doesn't workhttps://twitter.com/jdan/status/1232738079921856512 …
-
-
-
Replying to @sigbrutal
So, I would argue that the two expressions 9007199254740993 [9, 0, 0, 7, 1, 9, 9, 2, 5, 4, 7, 4, 0, 9, 9, 3].reduce((a, b) => a * (9 + 1) + b) in fact evaluate to identical values
1 reply 0 retweets 0 likes -
Replying to @qntm
In which case it's 18014398509481993 == 2**54 + 9, which evaluates to 18014398509481990 normally and [1, 8, 0, 1, 4, 3, 9, 8, 5, 0, 9, 4, 8, 1, 9, 9, 3].reduce((a,b)=>a*(9+1)+b) evaluates to 18014398509481996
1 reply 0 retweets 3 likes -
Replying to @sigbrutal @qntm
also, the answer may or may not depend on the browser, the above is in Chrome 80.0
1 reply 0 retweets 0 likes
Excellent work! I doubt it's browser-dependent, this is a function of IEEE 754 floating point behaviour, which is far lower-level than the JavaScript engine
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.
RT!