Weird | David B. | Observable
•ojs
Comments (7)
Aaron Kyle Dennis
Jul 31, 2020
This is super weird. How did you discover this?
David B.
Aug 1, 2020
I discovered it based on replies on this tweet
https://twitter.com/dbumbeishvili/status/1288815981683507201
Aaron Kyle Dennis
Aug 1, 2020
Looks like it might be related to this:
https://www.ecma-international.org/ecma-262/10.0/index.html#sec-ecmascript-language-types-string-type
> The String type is the set of all ordered sequences of zero or more 16-bit unsigned integer values (“elements”) up to a maximum length of 253 - 1 elements.
Fabian Iwand
Jan 28, 2021
@aaronkyle
No, that refers to UTF-16. The above is a number, not a string.
Aaron Kyle Dennis
Jan 28, 2021
Ah! My mistake! Was just trying to figure out why this is happening!
Jacob Rus
Jan 28, 2021
This is 2**53+1. Double-precision floating point only stores 53 bits of mantissa.
Jan 28, 2021
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
Reply
Add comment
Subscribe to notifications
Observable
Sign in
David B.
2
1
Weird | David B. | Observable