3 ms·
Number type in JS is fp64 since forever (at least the interface, usually it's optimized to int32 by an engine, but if you use decimals you can be sure you have
by szatkus 7y ago
Number type in JS is fp64 since forever (at least the interface, usually it's optimized to int32 by an engine, but if you use decimals you can be sure you have fp64 under the hood) and BigInt[0] is supported in almost all modern browsers.
[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- hajile 7y agoSmall correction, but it's optimized to int31 by all the current engines with the last bit used for tagging. BigInt is now available on Firefox and Chrome (with JSC/Safari support in the works). That gives arbitrarily-large integers (with the JIT deciding the best size.