Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to represent very long numbers? [duplicate]

Tags:

c#

.net

Possible Duplicate:
working with incredibly large numbers in .NET

I'm working on a simple project which has to use basic arithmetic functions such as +,-,*,/. The numbers that used by are too large to be stored in a 64 bit Integer.

I wondered if there is any way to store these numbers so i can use them to perform arithmetic functions.

Thank you!

like image 567
Koosbara Avatar asked Dec 02 '22 00:12

Koosbara


1 Answers

The BigInteger (.NET 4.0+) structure to the rescue!

Represents an arbitrarily large signed integer.

If you are on a version pre-dating 4.0, check out the BigNumbers library.

like image 88
Oded Avatar answered Dec 05 '22 06:12

Oded