开发者

C# - problem with very small numbers - not enough digits in double datatype

开发者 https://www.devze.com 2022-12-18 08:03 出处:网络
I\'m writing a program in C# which suppose to calculate very small numbers. However, all my calculations are getting NaN value because they are too sm开发者_StackOverflowall for the \'double\' datatyp

I'm writing a program in C# which suppose to calculate very small numbers. However, all my calculations are getting NaN value because they are too sm开发者_StackOverflowall for the 'double' datatype.

Is there an option in C# to deal with such situations?

Thanks, Eden.


try decimal

Edit: Also, .NET 4 introduces BigInteger which could probably be used to represent whatever floating point values\data range you are trying to represent.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号