小编abd*_*_ab的帖子

C#Math.pow()返回Infinity?

我在c#return infinity中遇到Math.pow问题,例如:

  double a=65;
  double b=331;
  Console.Write(Math.Pow(a,b));
  //but return infinty 
Run Code Online (Sandbox Code Playgroud)

但我的电脑计算器不返回65 ^ 331无穷大有实数返回此:1.1866456424809823888425970808655e + 600

我使用强制转换为(长)但结果不同于Windows计算器请我需要变量类型返回相同的窗口计算器

c# double casting return floating-point-precision

2
推荐指数
2
解决办法
1917
查看次数

标签 统计

c# ×1

casting ×1

double ×1

floating-point-precision ×1

return ×1