C 或 C++ 中的大整数
我正在开发一个阶乘程序,当试图找到 1000 的阶乘时,该程序不起作用。我认为大整数是解决方案;它们是如何工作的? (在 C 或 C++ 中)
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++)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
GMP 可以为 C 和 C++ 执行
bigint
运算。该网站上的文档是一个很好的介绍,如果您使用 C++ 类,它们的行为几乎与内置基本类型完全相同。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.寻找 GMP。请参阅有关此主题的另一个问题:
Look for the GMP. See the other question regarding this topic: