What is the easiest way to handle huge numbers in C? I need to store values in the Area 1000^900
, or in more human readable form 10^2700
.
Does anybody know of an easy way to do that? Any help would really be appreciated!
Question&Answers:osWhat is the easiest way to handle huge numbers in C? I need to store values in the Area 1000^900
, or in more human readable form 10^2700
.
Does anybody know of an easy way to do that? Any help would really be appreciated!
Question&Answers:osUse libgmp:
GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating-point numbers. There is no practical limit to the precision except the ones implied by the available memory in the machine GMP runs on...
Since version 6, GMP is distributed under the dual licenses, GNU LGPL v3 and GNU GPL v2...
GMP's main target platforms are Unix-type systems, such as GNU/Linux, Solaris, HP-UX, Mac OS X/Darwin, BSD, AIX, etc. It also is known to work on Windows in both 32-bit and 64-bit mode...