Question

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

Was it helpful?

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.

OTHER TIPS

Another alternative that is more liberally licensed than MPIR is the BigInteger class available in the source code for the Bouncycastle C# library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top