22 ms·
Isn't Javascript terrible for dealing with numerics (floats in particular)?
by oliv__ 5y ago
Isn't Javascript terrible for dealing with numerics (floats in particular)?
- anoncake 5y agoDealing with integers is what it's terrible at because it doesn't have them.
- ralusek 5y agoBigInt(5) or 5n would give you an integer. You can only operate with other integers. 2n ** 256n === 115792089237316195423570985008687907853269984665640564039457584007913129639936n Can also work with integers with the likes of: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- rzilleruelo 5y ago"terrible" depends of what you are trying to do. In this case I would said is good enough to make it work.