How to make Int1024

how to declare int1024 in c #? I can use VB or C ++ Too.


Best regards Behrooz

+2


source to share


4 answers


See this question: Large Integers in C #

From the answer to this question:



MS is about to introduce the System.Numerics.BigInteger class in .NET 4.0

Until then, review the IntX class.

IntX is an arbitrary integer library written in pure C # 2.0 with an implementation of fast O (N * log N) multiplications / divisions. It provides all the basic operations on integers like addition, multiplication, comparison, bitwise offset, etc.

+8


source


And by that you mean a 1024 bit integer? Better wait until BigInteger

4.0
. Until then, the most awkward thing you can do with the main libraries is to use (ab) decimal

, which has 96 bits for the integer part. Or use a third party DLL.



+4


source


Just to avoid doubts:

public int int1024 = 1024;

      

+3


source


If I understand you correctly, you want a 1024 bit integer.

Unfortunately .net does not have a built-in 1024-bit integer type. You will need to find a specialized library for this kind of thing or write one yourself.

There is an article on large integers here .

0


source







All Articles