c - C语言中的大整数?

标签 c variables data-storage bigint

在 C 中处理大数的最简单方法是什么?我需要将值存储在区域1000^900中,或者以更易于理解的形式10^2700

有人知道一个简单的方法吗?任何帮助将不胜感激!

最佳答案

使用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...

关于c - C语言中的大整数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35282558/

相关文章:

javascript - 将外部 html 加载到 JavaScript 中的字符串

xml - 存储数百万简单数据的最节省空间的方法?

hadoop - 仅在 Hadoop 集群中的特定节点上存储 HDFS 数据

excel - Python - XlsxWriter : Referring to columns by column name, 不是列字母(硬编码与动态变量)

titanium - 如何使用钛在应用程序中保存数据或一组列表?

c - 算法 - 对 "n"输入文件进行排序并生成单个输出文件的最佳方法是什么

c - C中void指针的指针算法

c - 这是数组的有效分配吗

c - 为什么结果不是预期的?

class - 对象、属性、变量和类实例之间的区别