javascript中的大整数(更多2 ^ 53-1)

时间:2021-07-29 16:57:07

What is general principals to operate with large integers in javascript? Like in libraries for bigint? How i do it by myself?

在javascript中使用大整数操作的一般原则是什么?就像bigint的图书馆一样?我自己怎么做?

2 个解决方案

#1


2  

You may take a look at this implementation. You may also find other implementations useful.

您可以查看此实现。您可能还会发现其他实现很有用。

#2


0  

Another option I've used in the past, is to hand off those operations to a calculation server via jsonp. If you're working with such large numbers, you likely want the improved performance and precision this can give you.

我过去使用的另一个选项是通过jsonp将这些操作交给计算服务器。如果您正在处理如此大的数字,您可能希望提高性能和精度。

#1


2  

You may take a look at this implementation. You may also find other implementations useful.

您可以查看此实现。您可能还会发现其他实现很有用。

#2


0  

Another option I've used in the past, is to hand off those operations to a calculation server via jsonp. If you're working with such large numbers, you likely want the improved performance and precision this can give you.

我过去使用的另一个选项是通过jsonp将这些操作交给计算服务器。如果您正在处理如此大的数字,您可能希望提高性能和精度。