Seb
Seb

Reputation: 2016

Using extremely large integer holding 3001 digits

For example, how can I use the result of 1000^1000 for arithmetic? I don't think there's a library that can accommodate that, all I see at most is 100 number digits.

Upvotes: 0

Views: 171

Answers (2)

meyumer
meyumer

Reputation: 5064

What you are looking for is a library like GMP or Boost-Multiprecision or TTmath.

Or, you might challenge yourself to write a low level representation that handles longer than standard bit representations, and do arithmetic with it.

Stick with the first option though, if it does the job you have in mind.

Upvotes: 2

genpfault
genpfault

Reputation: 52084

Use an arbitrary-precision arithmetic library like GMP or Boost.Multiprecision.

Upvotes: 5

Related Questions