Search code examples
c#decimalmatharbitrary-precision

Need Arbitrary-Precision-Arithmetic in C#


I'm in need of floating point calculations for C# that can correctly store up to maybe 500 digits/decimals. Is there any built-in-type for this, do I have to create it myself, any library available or what is the best way to go?

Thanks


Solution

  • MPIR, a fork of the GMP project, has C# bindings. Personally, I've found them easier to deal with when raising problems, to the point that I no longer worry about GMP (primarily due to its tendency to exit violently when running out of memory).

    There are others listed here but I have no direct experience with them so can't comment on their usefulness.