Unlimited-precision integer library

Discussion in 'C++' started by Dave Theese, Aug 26, 2003.

  1. Dave Theese

    Dave Theese Guest

    Hello all,

    Can anybody recommend a freely-available library that provides
    unlimited-precision integers? All of the standard arithmetic operations
    would need to be supported as well as construction from a std::string and
    representation as a std::string. For example, something along these lines:

    unlimited_int
    foo("68234626834978347342978234978432967234843857234582346234982437984237894
    23798234982439842398");
    cout << foo + 1 << endl;

    Thanks in advance!
    Dave

    P.S. I believe such a library is under development in Boost, but is not yet
    available. My desire would be to use this with the rational number library
    from Boost, and then in turn use that with a matrix manipulation library to
    do unlimited-precision matrix operations. Taking inverses, doing Gaussian
    elimination, etc... can result in some mighty ugly rationals...
    Dave Theese, Aug 26, 2003
    #1
    1. Advertising

  2. "Dave Theese" <> writes:

    > Hello all,
    >
    > Can anybody recommend a freely-available library that provides
    > unlimited-precision integers? All of the standard arithmetic operations
    > would need to be supported as well as construction from a std::string and
    > representation as a std::string. For example, something along these lines:
    >
    > unlimited_int
    > foo("68234626834978347342978234978432967234843857234582346234982437984237894
    > 23798234982439842398");
    > cout << foo + 1 << endl;


    Have you checked the Available C++ Libraries FAQ? It's posted here regularly.
    Also, you might want to check out GMP (http://www.swox.com/gmp/).

    HTH & kind regards
    frank

    --
    Frank Schmitt
    4SC AG phone: +49 89 700763-0
    e-mail: frank DOT schmitt AT 4sc DOT com
    Frank Schmitt, Aug 26, 2003
    #2
    1. Advertising

  3. "Frank Schmitt" <> wrote in message
    news:4cad9wsxh9.fsf@scxw21.4sc...
    > "Dave Theese" <> writes:
    >
    > > Hello all,
    > >
    > > Can anybody recommend a freely-available library that provides
    > > unlimited-precision integers? All of the standard arithmetic operations
    > > would need to be supported as well as construction from a std::string

    and
    > > representation as a std::string. For example, something along these

    lines:
    > >
    > > unlimited_int
    > >

    foo("68234626834978347342978234978432967234843857234582346234982437984237894
    > > 23798234982439842398");
    > > cout << foo + 1 << endl;

    >
    > Have you checked the Available C++ Libraries FAQ? It's posted here

    regularly.
    > Also, you might want to check out GMP (http://www.swox.com/gmp/).
    >
    > HTH & kind regards
    > frank
    >


    NTL is another possibility. http://www.shoup.net/ntl/

    john
    John Harrison, Aug 26, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cxcodexc
    Replies:
    6
    Views:
    428
    Gianni Mariani
    Nov 28, 2003
  2. Dan Pop
    Replies:
    0
    Views:
    1,168
    Dan Pop
    Jun 24, 2003
  3. cyberdude
    Replies:
    2
    Views:
    5,104
    Keith Thompson
    Jun 25, 2003
  4. John Friedland
    Replies:
    0
    Views:
    334
    John Friedland
    Jul 21, 2006
  5. Alasdair
    Replies:
    15
    Views:
    745
    Steven D'Aprano
    Mar 9, 2008
Loading...

Share This Page