gpt4 book ai didi

c - C 中的大整数?

转载 作者:太空狗 更新时间:2023-10-29 16:24:03 25 4
gpt4 key购买 nike

在 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/565150/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com