BigInt for C++

Revision en3, by Arpa, 2016-01-03 14:48:39

Hi!

One of the C++ programmers problems is to save integers more than '2^64-1'(we can save 0 to 2^64-1 in unsigned long long int).

It is the best bignum I ever have seen: Link.

  1. It has operation: + , - , / , * , % , ^(pow) , gcd , lcp , abs.

  2. Can work with ostream(cout), istream(cin).

  3. Can convert to long long, string.

  4. It uses fast multiplication.

Tags bignum, bignumber, c++

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en14 English Arpa 2022-07-08 18:42:55 8 Tiny change: 'aster/cpp/bigint.cp' -> 'aster/cpp/numeric/bigint.cp'
en13 English Arpa 2016-09-12 21:25:35 2 Tiny change: ' 2016):** bug in `voi' -> ' 2016):** Bug in `voi'
en12 English Arpa 2016-09-12 21:19:51 116 Tiny change: '\n**UPD1 (september 2016)** bug in ' -> '\n**UPD1 (September 2016):** bug in '
en11 English Arpa 2016-01-14 10:48:22 138 Tiny change: 'gint.cpp).**' -> 'gint.cpp).(but I have edited that and added `pow` and `size()`.)**'
en10 English Arpa 2016-01-03 21:37:07 2 Tiny change: 'gcd` , `lcp` , `abs`.' -> 'gcd` , `lcm` , `abs`.'
en9 English Arpa 2016-01-03 21:30:54 4 Tiny change: 't data to long long, string.\n\n- It ' -> 't data to `long long`, `string`.\n\n- It '
en8 English Arpa 2016-01-03 18:13:01 0 (published)
en7 English Arpa 2016-01-03 18:12:20 205
en6 English Arpa 2016-01-03 15:40:29 8 Tiny change: ' bignum I ever have seen: [Li' -> ' bignum I have ever seen: [Li'
en5 English Arpa 2016-01-03 14:49:51 5
en4 English Arpa 2016-01-03 14:49:23 12
en3 English Arpa 2016-01-03 14:48:39 36
en2 English Arpa 2016-01-03 14:46:58 7 Tiny change: 'oblems is saving integers ' -> 'oblems is to save integers '
en1 English Arpa 2016-01-03 14:46:28 479 Initial revision (saved to drafts)