Mathf.Pow 在 C# 上显示无穷大
Mathf.Pow Shows Infinity on C#
我正在尝试使用 Mathf.Pow()
计算一个大数,但是当我放置断点时它显示无穷大,我已经尝试使用 System.Numerics.BigInteger
但它显示 Big Integer cannot显示无穷大
这是我的代码
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);
}
}
}
正如杰里米所说
You could try BigInteger.Pow instead
我使用了 BigInteger res = BigInteger.Pow(43,27);
并且有效,谢谢!
我正在尝试使用 Mathf.Pow()
计算一个大数,但是当我放置断点时它显示无穷大,我已经尝试使用 System.Numerics.BigInteger
但它显示 Big Integer cannot显示无穷大
这是我的代码
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);
}
}
}
正如杰里米所说
You could try BigInteger.Pow instead
我使用了 BigInteger res = BigInteger.Pow(43,27);
并且有效,谢谢!