Can I Use Big Integers in C# with GMP on Windows?

  • Thread starter Thread starter CodeMonkey
  • Start date Start date
  • Tags Tags
    Integers
AI Thread Summary
To work with arbitrarily long integers in C#, users can utilize third-party libraries since Microsoft does not provide a built-in solution. A recommended resource is the BigInteger class available on CodeProject, which offers functionality for handling large numbers. However, performance may be an issue, particularly for numbers exceeding 30 digits, similar to the Java BigNumber implementation. For improved performance, users can consider installing the GNU Multiple Precision Arithmetic Library (gmp), which can be compiled into a gmp.dll for use on Windows. This library is noted for its superior handling of large integers compared to other options.
CodeMonkey
Messages
11
Reaction score
0
I want to use arbitrarily long integers in Csharp, can you tell me how to declare and use this. Please explain the namespace, classes used as I'm very new to this. Thanks.
 
Technology news on Phys.org
I don't think Microsoft has anything for this at the moment. You should be able to Google up third-party classes for big numbers, though; http://www.codeproject.com/csharp/biginteger.asp would be an example.

Frankly, it's no better than the Java BigNumber implementation, which also has poor performance for large numbers (> 30 digits, say).
 
Last edited by a moderator:
You can backdoor install gmp - the GNU package for large numbers. It's possible to compile a gmp.dll that you can use in Windows. See:

http://cs.nyu.edu/exact/core/gmp/
 
jim mcnamara said:
You can backdoor install gmp - the GNU package for large numbers. It's possible to compile a gmp.dll that you can use in Windows.

Oh yes, this is much better.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top