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

  • Thread starter Thread starter CodeMonkey
  • Start date Start date
  • Tags Tags
    Integers
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
3 replies · 3K views
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.
 
Physics 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.