0

I was working on a factorial program, and the program didn't work when trying to find the factorial of 1000. I think big integers are the solution; how do they work? (In either C or C++)

OmG
  • 18,337
  • 10
  • 57
  • 90
user507401
  • 2,809
  • 9
  • 25
  • 20

2 Answers2

7

GMP can do bigint operations for both C and C++. The documentation on that site is a good introduction, if you use the C++ classes they behave almost exactly like built-in primitive types.

Flexo
  • 87,323
  • 22
  • 191
  • 272
5

Look for the GMP. See the other question regarding this topic:

Community
  • 1
  • 1
Leonidas
  • 2,440
  • 15
  • 22