Arbitrary precision type
Is there such a type\implementation in C#?
It is needed to calcula开发者_如何学编程te figures up to 1010,000 magnitude.
Your question body suggests you need to hold numbers that are arbitrarily large, and for that question, then yes, there are various Big Integer libraries available (I believe .NET 4 includes one in the Framework).
However, your question title refers to 'precision', which suggests you want to hold an arbitrary number of figures to the right of the decimal point - and for that, you'd need either a Rational class (combined with a Big Integer) if you were only dealing with rationals, or a clever symbolic manipulator (such as for example Mathematica has) if you were going to be leaving the rationals.
There is a new BigInt class in Fx4: System.Numerical.BigInteger
But no floating point type as far as I'm aware of.
精彩评论