Hacker News new | past | comments | ask | show | jobs | submit login

Doing astronomy work in JS?



Very useful for spreadsheets and other financial calculations as well I believe, as well as some forms of custom Crypto.


Definitely (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

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.


Aren'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).


Bignums 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.


Without bignum it's hard to implement Decimal




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: