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.