broofa/node-int64

Is Int64.MAX_INT correct?

jeking3 opened this issue · 3 comments

According to documentation, Number.MAX_SAFE_INTEGER is (2^53)-1, however in Int64 the definition of MAX_INT is (2^53). Is that really correct?

It's "correct enough". 😸 (FWIW, MAX_SAFE_INTEGER wasn't a thing when I wrote this module.)

I'd fix it if I felt this module was worth maintaining, but now that BigInt's are thing, my plan is to deprecate this module.

Thanks. Work was just done to add node-int64 to javascript in Apache Thrift, and then I found later on it does not allow for 64-bit integer math. So I am recommending a move to bignum instead.