3 ms·
So how does the latest darling of the webapp world, nodejs, handle this? In javascript, the only numeric type is float.
by ams6110 13y ago
So how does the latest darling of the webapp world, nodejs, handle this? In javascript, the only numeric type is float.
- bryanlarsen 13y agoThe same way you do it in Perl: you store rounded millicents. If there's never any fraction in your float, your math will never have floating point issues, and your Javascript VM will use integers internally.