5

Until BCL finally ships System.Numeric.BigInt, what do you guys use for arbitrary precision integers?

GEOCHET
  • 21,119
  • 15
  • 74
  • 98
ripper234
  • 222,824
  • 274
  • 634
  • 905

4 Answers4

8

You could try mine on codeplex: BigInteger

Or here's another: codeproject

Scott
  • 850
  • 7
  • 13
4

F# has Microsoft.FSharp.Math.BigInt and Microsoft.FSharp.Math.BigNum.

Richard
  • 106,783
  • 21
  • 203
  • 265
  • What's the difference, do you know? – nawfal Dec 05 '12 at 17:43
  • 1
    From the [docs](http://msdn.microsoft.com/en-us/library/ee620695.aspx): "This type is provided for use only with the F# Core Library Versions that targets .NET Framework 2.0. If you are using .NET Framework 4, use the .NET Framework 4 type with the same name, BigInteger." – Richard Dec 06 '12 at 08:17
  • Thanks, but I was asking what's the difference between FSharp.BigInt and BigNum. – nawfal Dec 06 '12 at 09:47
  • @nawfal I think they're both obsolete, but for information: `BigInt`: integers, `BigNum`: rationals. – Richard Dec 06 '12 at 10:07
  • Ok I get it. Should have been obvious for me from the name! :) – nawfal Dec 06 '12 at 10:11
3

Also, the J# library includes a BigInt type.

Thankfully, all this will be sorted out when the BCL finally ships a standardized BigInt.

UPDATE 2012 System.Numberics.BigInteger is now included in the .NET framework.

Community
  • 1
  • 1
Judah Gabriel Himango
  • 58,906
  • 38
  • 158
  • 212
1

Have a look at

IronRuby.StandardLibrary.BigDecimal.BigDecimal

Sam Saffron
  • 128,308
  • 78
  • 326
  • 506