53bit for ints, so Math.pow(2,53) is the largest int it can rep accurately
-
-
Replying to @jasonmulligan
Wrong. The largest int that can be represented exactly in a 64-bit IEEE 754 floating point format is 0x1.fffffffffffffp+1023, which is an exact 309-digit integer that doesn't fit in a tweet, but can be approximated as 1.7976931348623157e+308.
1 reply 0 retweets 1 like -
Replying to @marcan42
64bit internal, 53bit external... this has been known for like 20yr
1 reply 0 retweets 0 likes -
Replying to @jasonmulligan @marcan42
here, 6yr ago... http://2ality.com/2012/07/large-integers.html …
1 reply 0 retweets 0 likes -
Replying to @jasonmulligan
You do not understand floating point numbers. 2^53 is not the largest integer that can be represented accurately in 64-bit floats. *All* the integers *from zero to 2^53* can be represented, but *many more larger than that* can too. Just not all of them.
2 replies 0 retweets 4 likes -
Replying to @marcan42
just read the URL i linked, it explains things very well
1 reply 0 retweets 0 likes -
Replying to @jasonmulligan @marcan42
Jason Mulligan Retweeted BrendanEich
or... i dunno, argue with brendanhttps://twitter.com/brendaneich/status/526826278377099264?lang=en …
Jason Mulligan added,
2 replies 0 retweets 0 likes -
Replying to @jasonmulligan
Yes, the URL you linked explains it: beyond 53 bits, you can only represent every 2 integers (and then every 4, then every 8, etc). But *you can still represent those integers*. The integer I'm using as an example is one such integer you *can* represent. Read it yourself again.
1 reply 0 retweets 0 likes -
Replying to @marcan42
yeah, you can, and you can also get rounding errors based entirely on the engine... you can't do that in production, so most don't consider it an option
2 replies 0 retweets 0 likes -
Replying to @jasonmulligan @marcan42
making "53bit for ints, so Math.pow(2,53) is the largest int it can rep accurately" a truthful statement
1 reply 0 retweets 0 likes
No, it's not a truthful statement. Read the damn IEEE 754 spec. BY SPEC there are many, many, MANY more integers that can be accurately represented beyond 53 bits. Not *all* of them, but it's *always the same ones*, and it is *repeatable* and precisely defined.
-
-
Replying to @marcan42
i think you've gone off reality rails a little, have a good day
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.