C语言中的BigInteger? [英] BigInteger in C?
问题描述
在C语言中处理大量数字的最简单方法是什么?我需要将值存储在 1000 ^ 900
区域中,或以更易于理解的形式存储在 10 ^ 2700
中.
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!
推荐答案
使用 libgmp :
GMP是一个用于任意精度算术的免费库,可处理带符号整数,有理数和浮点数.对精度没有实际的限制,除了GMP机器上的可用内存所暗示的精度以外...
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...
从版本6开始,GMP在双重许可( GNU LGPL v3 和 GNU GPL v2 ...
Since version 6, GMP is distributed under the dual licenses, GNU LGPL v3 and GNU GPL v2...
GMP的主要目标平台是Unix类型的系统,例如GNU/Linux,Solaris,HP-UX,Mac OS X/Darwin,BSD,AIX等.它还可以在Windows 32位系统上工作和64位模式...
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...
这篇关于C语言中的BigInteger?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!