I'm looking for a Mathematical solution that deals with really (long, big, huge, storms) numbers. I haven't found anything yet, But I don't wanna think that this problem hasn't be solve at this time. I'm looking for an easy Number solution, like Microsoft Excel Precision (30 decimals), or a BigInteger (Java) solution. in Javascript of course.
It looks like this has been solved before:
What is the standard solution in Javascript for handling big numbers (BigNum)?
http://jsfromhell.com/classes/bignumber
http://www-cs-students.stanford.edu/~tjw/jsbn/
If you only need integers you can use BigInteger.js.
While looking for an big integer library for an ElGamal crypto implementation I tested several libraries with the following results:
I recommend this one: Tom Wu's jsbn.js (http://www-cs-students.stanford.edu/~tjw/jsbn/)
Leemon Baird's big integer library (http://www.leemon.com/crypto/BigInt.js)
bignumber.js (https://github.com/MikeMcl/bignumber.js)
Scheme arithmetic library for JavaScript (https://github.com/jtobey/javascript-bignum)
I haven't tested this by myself: BigNumber (http://jsfromhell.com/classes/bignumber)
There's a BigInteger library for JavaScript available here:
(Note that I haven't used this myself. Try it and see what you think.)
There is also Silent Matt's library for Big Integers. It does not handle decimals.
©2020 All rights reserved.