3 ms·
++ yes. for those not aware, all numbers in javascript are 64bit floats. that said, you could still write your own bigint class if you need precision beyond
by novaleaf 13y ago
++ yes. for those not aware, all numbers in javascript are 64bit floats.
that said, you could still write your own bigint class if you need precision beyond that.
- tracker1 13y agoThey're 64bit floats, but you get 52 bits of integer precision... You're as likely to hit issues as you are with a 32bit int.. the big difference is you need to use Math.round() if you want to multiply/divide in order to get to a whole number again.. Even with a 64-bit integer, you can suffer from overflow, it's only a matter of where.. and even with 32bit environments there have been work arounds for larger numbers/precision.. with JS there are bignum libraries for this.