比ULLONG_MAX数值越大 [英] numeric values bigger than ULLONG_MAX

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

问题描述

我需要存储和使用比 ULLONG_MAX 更大的数值。

I need to store and use numeric values bigger than ULLONG_MAX.

我将需要进行算术运算使用这些值,所以我觉得店作为的char ** 不是一个选项。

I will need to make arithmetic operations with those values, so I think store as char** is not a option.

有没有一种方法可以动态地创建一个额外的 preFIX在这种情况下?

Is there a way to dynamically create an additional long prefix in those cases?

感谢大家。基于响应,非常有帮助的,但我怀疑有关的最佳性能选择。 piokuc引用一个表演环节,但目前还不清楚。在这个时候,我GMP或MPIR之间是有一些的速度更快?

Thank you all. Based on responses, Very helpful but I doubt about the best performance option. piokuc quote a performance link, but it's unclear. In this time I'm between GMP or MPIR, there is some one faster?

推荐答案

您需要使用任意precision运算库之一,喜欢的 GMP ,也见<一href=\"http://stackoverflow.com/questions/4486882/whats-the-best-for-speed-arbitrary-$p$pcision-library-for-c\">What's最好的(速度)arbitrary- precision库C ++?

You need to use one of the arbitrary precision arithmetic libraries, like GMP, see also What's the best (for speed) arbitrary-precision library for C++?

这篇关于比ULLONG_MAX数值越大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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