2

What arbitrary-precision integers (and or rationals) library are there for compilers running on Microsoft Windows, and which would you recommend?

Please state license type / cost, supported compilers (i.e. GCC and or VC++) for the library.

KTC
  • 8,967
  • 5
  • 33
  • 38

4 Answers4

6

GMP.

LGPL. Standard download from official website is designed for GCC. VC++ port is available from here.

KTC
  • 8,967
  • 5
  • 33
  • 38
  • 2
    I can't in all honesty recommend GMP for serious work since it has the nasty habit of exiting violently on out-of-memory problems. This is, in my opinion, unforgivable in what's supposed to be a general purpose library. Don't get me wrong, it's still good and blindingly fast, but only for personal or non-production stuff where you can put up with crashes. – paxdiablo Feb 03 '11 at 17:58
4

I have not used it, so I'm pointing you here blind:

LibTomMath by Tom St Denis: http://libtom.org/

Public Domain license. Website mentions that the library builds out of the box with GCC 2.95 [and up] as well as Visual C++ v6.00 [with SP5] without configuration.

A companion book is available: http://www.amazon.com/dp/1597491128

Mankarse
  • 39,818
  • 11
  • 97
  • 141
Michael Burr
  • 333,147
  • 50
  • 533
  • 760
3

OpenSSL BN type. BSD-style license, pretty sure it's available for windows.

robottobor
  • 11,595
  • 11
  • 39
  • 37
1

Best bignum library to solve Project Euler problems in C++ ?

Community
  • 1
  • 1
Khaled Alshaya
  • 94,250
  • 39
  • 176
  • 234