Huge Integer JavaScript Library
Asked Answered
P

4

10

Is there any JavaScript library that can be used for calculations involving 700+ Digits? Also, how about the same thing in C++?

Pimp answered 8/6, 2009 at 9:54 Comment(0)
C
10

JavaScript:

  • Leemon Baird's BigInt library. This seems to be popular. It's made specifically for cryptographic uses.
  • My own BigInteger library. Similar to the Java BigInteger class, but all calculations are done in base-10.
  • jsbn. Another BigInteger class similar to Java's. I've never used this one, but the API looks similar to mine.

C++:

  • Most people use GMP.
  • CLN - Class Library for Numbers. I've used this in the past and it has a pretty nice API.
Capsule answered 8/6, 2009 at 16:35 Comment(0)
M
3

For JS: How about BigInt?

For C++: Google found me this.

Mealie answered 8/6, 2009 at 9:58 Comment(0)
P
1

For C++ GMP has served me very well in the past for large numbers, it claims to be the fastest bignum library out there too, which is bound to be helpful for 700 digits.

Partiality answered 8/6, 2009 at 10:5 Comment(0)
M
0

And then there is MAPM (Arbitrary Precision Math Library) in C with C++ bindings. I incooperated it some years ago for testing. Was very simple thanks to C++ bindings.

Menorrhagia answered 8/6, 2009 at 11:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.