On Wed, Jan 16, 2013 at 11:25 AM, Cheng Shao <
dgkan...@gmail.com> wrote:
> I'm trying out nodejs as a TCP server. i want to read unsigned 64bit integer
> from Buffer. find not similar function. why not to be added?
JS numbers are 64 bits doubles. That means you can't represent 64 bit
integers with them because they're only exact for integers up to 2^53.
To illustrate:
$ node
> Math.pow(2, 53) === Math.pow(2, 53) - 1
false
> Math.pow(2, 53) === Math.pow(2, 53)
true
> Math.pow(2, 53) === Math.pow(2, 53) + 1
true