如何在javascript中处理大数字 [英] How to deal with big numbers in javascript

查看:240
本文介绍了如何在javascript中处理大数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个数学解决方案,处理真正(长,大,巨大,风暴)的数字。我还没有找到任何东西,但我不想这个问题在这个时候还没有解决。我正在寻找一个简单的数字解决方案,如Microsoft Excel Precision(十进制30)或BigInteger(Java)解决方案。在Javascript当然。

解决方案



什么是JavaScript中处理大数字的标准解决方案(BigNum) ?



http:// jsfromhell。 com / classes / bignumber

http://www-cs-students.stanford.edu/~tjw/jsbn/

如果你只需要整数你可以使用 BigInteger.js


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.

这篇关于如何在javascript中处理大数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆