如何在变量中保留一个大数字?

编程入门 行业动态 更新时间:2024-10-23 09:27:50
本文介绍了如何在变量中保留一个大数字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨。 我需要持有并处理大到10 ^ 32的数字。似乎system.int64不足以容纳这样的数字。我可以使用哪种变量或其他解决方案?两种语言的解决方案都很受欢迎,但最好是在VB中,特别是最简单的方法。

Hi. I need to hold and do processing on numbers as big as 10^32. It seems system.int64 is not wide enough to hold such numbers. What variable or other solution can I use? Solution in both languages is appreciated but better to be in VB, Specially the most simple approach.

推荐答案

使用 BigInteger [ ^ ] 它允许的数字大小仅受你的限制RAM ^^ 在.NET 4中引入的 use BigInteger[^] its allows numbers size only limited by your RAM ^^ introduced in .NET 4

我认为你必须将它存储在Long $ b $中b 点击此处查看说明 msdn.microsoft/en-us/library/ae55hdtk.aspx [ ^ ] I think you must store it in Long Click here for Explanation msdn.microsoft/en-us/library/ae55hdtk.aspx[^]

更多推荐

如何在变量中保留一个大数字?

本文发布于:2023-10-23 02:09:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519428.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   数字   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!