5 ms·
Very useful for spreadsheets and other financial calculations as well I believe, as well as some forms of custom Crypto.
by bhouston 12y ago
Very useful for spreadsheets and other financial calculations as well I believe, as well as some forms of custom Crypto.
- BrendanEich 12y agoDefinitely (and I'm happy to write a friendlier comment reply, believe me!). Bignums are good, in Dart as in other languages. On the agenda for "Harmony-era" ECMAScript, going back to 2009: http://wiki.ecmascript.org/doku.php?id=strawman:bignums http://wiki.ecmascript.org/doku.php?id=strawman:bignums More recent work generalizes value types into an extension mechanism for JS, so you can have built-in and user-defined numeric types with operators and literals.
- coldtea 12y agoAren't decimals better suited for financial applications? That's what I've used in the past in Java land (BigDecimal). Or are bignums and decimals the same thing? (not sure).
- dragonwriter 12y agoBignums are closely related to arbitrary precision decimals (aka BigDecimals; "decimal" without more is somewhat ambiguous since sometimes those are fixed size or decimal floating point.) Most financial applications deal with currencies each of which had a smallest indivisible unit in the application, which makes bignums most appropriate. But bigdecimals (or even arbitrary precision rationals) may be preferred in certain financial applications.