BigInteger.ModPow()的替代方法;在C#中 [英] Alternative to BigInteger.ModPow(); in C#

查看:303
本文介绍了BigInteger.ModPow()的替代方法;在C#中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找NET 4.x中引入的C#BigInteger软件包的替代方案.

i'm looking for an alternative to the BigInteger package of C# which has been introduced with NET 4.x.

此对象的数学运算非常慢,我猜这是由于以下事实造成的:算术比原始类型的运算级别更高-或优化程度很差,无论如何.

The mathematical operations with this object are terribly slow, I guess this is caused by the fact that the arithmetics are done on a higher level than the primitive types - or badly optimized, whatever.

Int64/long/ulong或其他64位数字很小,无法正确计算-我说的是64位整数到64位整数的幂.

Int64/long/ulong or other 64bit-numbers are way to small and won't calculate correctly - I'm talking about 64bit-integer to the power of 64-bit integers.

希望有人可以建议我一些事情.预先感谢.

Hopefully someone can suggest my something. Thanks in advance.

推荐答案

老实说,如果您的数字非常大并且需要对它们进行大量计算,并且BigInteger库仍然不能满足您的需求,为什么不这样做呢?使用您知道的最好的语言或工具包将其卸载到外部流程中是最好的?您是否真的要写完全要用C#编写的内容?

Honestly, if you have extremely large numbers and need to do heavy computations with them and the BigInteger library still isn't cutting it for you, why not offload it onto an external process using whatever language or toolkit you know of that does it best? Are you truly constrained to write whatever it is you're trying to accomplish entirely in C#?

例如,您可以卸载到C#中的 MATLAB .

For example, you can offload to MATLAB in C#.

这篇关于BigInteger.ModPow()的替代方法;在C#中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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