如何解决Mathf.Pow在C#上显示无穷大
我正在尝试使用Mathf.Pow()
计算一个大数,但是当我放置一个断点显示无穷大时,我已经尝试使用System.Numerics.BigInteger
,但是它显示了 Big Integer无法显示无穷大
这是我的代码
using System;
using System.Numerics;
namespace TestConsole
{
class Program
{
static void Main(string[] args)
{
//43
BigInteger res = new BigInteger(MathF.Pow(43,27));
Console.WriteLine(res);
}
}
}
解决方法
如杰里米所说
您可以改用BigInteger.Pow
我使用了BigInteger res = BigInteger.Pow(43,27);
,效果很好,谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。