What is general principals to operate with large integers in javascript? Like in libraries for bigint? How i do it by myself?
You may take a look at this implementation. You may also find other implementations useful.
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.
来源:https://stackoverflow.com/questions/3579153/large-integers-in-javascript-more-the-253-1