存储C ++或C大数字 [英] storing big numbers in c++ or c

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

问题描述

我试图写一个code,但在那里我被困的地方是存储一个大数目

I am trying to write a code , but the place where I got stuck is that to store a big number

10的100次方。这个大是多少

10^100 . this big is the number

任何建议

推荐答案

使用的任意precision 的库。我想到的一个非常流行的是 GMP 。这是一个C ++库,但它有一个很好的C ++接口,太。它针对性能进行了优化,而且由于它被广泛使用,这大概是pretty强劲。

Use an arbitrary precision library. A very popular one that comes to mind is GMP. It is a C library, but it has a nice C++ interface, too. It is optimized for performance, and since it is widely used, it is probably pretty robust.

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

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