在C ++中处理大量数字? [英] Handling large numbers in C++?

查看:138
本文介绍了在C ++中处理大量数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C ++中处理大量数字输入的最佳方法是什么(例如 10 ^ 100 )?

What is the best way to handle large numeric inputs in C++ (for example 10^100)?

对于算法我通常切换到ruby,我有时使用字符串。

For algorithms I usually switch over to ruby and I sometimes use strings.

/ p>

Any other good methods?

推荐答案

这听起来像是在寻找一种输入任意精度数字的方法。
这里是您可以使用的两个库: GMP MAPM

It sounds like you're looking for a way to enter Arbitrary Precision numbers. here are two libraries you could use: GMP and MAPM

这篇关于在C ++中处理大量数字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆