3 ms·
Well, bigints are fine as array indices. However they are not interoperable with numbers in any type of arithmetic. I don't think it's reasonable to expect to
by recursive 7y ago
Well, bigints are fine as array indices. However they are not interoperable with numbers in any type of arithmetic. I don't think it's reasonable to expect to use bigints in any place where one uses numbers.
"Regular int" is not a distinct type in javascript. There are now two numeric types: 64-bit floating point, and bigint.
- IggleSniggle 7y agoObligatory informational: JavaScript numbers are IEEE-754 standard. You get 53 bits of precision, but can still represent other numbers outside that range, and there are the usual issues relating to dealing with floats. Math.pow(2,53) // 9007199254740992 Math.pow(2,53)+1 // 9007199254740992 Math.pow(2,53)+2 // 9007199254740994 0.1 + 0.2 // 0.30000000000000004