Large integers in javascript (more the 2^53-1)

前端 未结 2 1639
-上瘾入骨i
-上瘾入骨i 2020-12-11 07:50

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

相关标签:
2条回答
  • 2020-12-11 08:35

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

    0 讨论(0)
  • 2020-12-11 08:46

    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.

    0 讨论(0)
提交回复
热议问题