.NET Framework library for arbitrary digit precision

I am updating this question and making it more specific: is there a .NET Framework library that supports numbers with arbitrary precision digits?

+2
source share
9 answers

There are several options here.

A good option is W3b.Sine , which is native C # /. NET and supports floating point precision values.

If you are dealing only with integer values, IntX provides support for integer values โ€‹โ€‹of arbitrary precision. A potentially more mature option would be C # BigInt , but again, this will not support floating point operations.

+5
source

Can you wait for .NET 4.0? They cast BigInteger directly into the Framework .

On the other hand, if you cannot wait, then J # runtime includes native support for java.math.BigInteger and BigDecimal . It is redistributable like everyone else in the .NET Framework.

+6
source

You can try the old mantissa method. Basically, you can have a 64-bit integer to store the number, and then a 64-bit integer to store the exponent (which can be negative). You can create your own type of object and overload arithmetic operators, so it will be considered as one number. It will take some work, but I think it will be your best option.

+3
source

GnuMpDotNet: http://www.emilstefanov.net/Projects/GnuMpDotNet/

If you need pure .NET, consider this question: http://www.codeplex.com/IntX/

+3
source

Perhaps surprisingly, the Bailey-Borwane-Pluffe formula provides an incremental procedure for calculating the next binary or hexadecimal digit pi without having to save all previous digits.

+2
source

If you need a really fast library, try:

http://www.emilstefanov.net/Projects/GnuMpDotNet/

+2
source

You can use the decimal type, which gives you 28-29 significant digits

+1
source

Check this link http://jsfromhell.com/classes/bignumber your javascript code, but you can easily convert it to your own in any language or C #.

+1
source

Source: https://habr.com/ru/post/975966/


All Articles