Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. GMP and Windows

GMP and Windows

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++visual-studioquestioncareer
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BobInNJ
    wrote on last edited by
    #1

    I would like to use a "Big Number" package for my application which I am writing on Windows using Visual Studio and C++. Therefore, I thought I would use GMP. However, I get the impression that compiling it under Windows is going to be a big job. Therefore, I am wondering if it is worth doing. Could somebody suggest a different package that is more geared towards the windows environment? Thanks Bob

    P 1 Reply Last reply
    0
    • B BobInNJ

      I would like to use a "Big Number" package for my application which I am writing on Windows using Visual Studio and C++. Therefore, I thought I would use GMP. However, I get the impression that compiling it under Windows is going to be a big job. Therefore, I am wondering if it is worth doing. Could somebody suggest a different package that is more geared towards the windows environment? Thanks Bob

      P Offline
      P Offline
      pasztorpisti
      wrote on last edited by
      #2

      Depending on what you need libtommath[^] may do the job for you. It's a C library I've used in several projects along with libtomcrypt. These are in ansi C. Their source is clean. Public domain. Check out the libs of this guy, they are excellent. The LICENSE file:

      LibTomMath is hereby released into the Public Domain.

      -- Tom St Denis

      R 1 Reply Last reply
      0
      • P pasztorpisti

        Depending on what you need libtommath[^] may do the job for you. It's a C library I've used in several projects along with libtomcrypt. These are in ansi C. Their source is clean. Public domain. Check out the libs of this guy, they are excellent. The LICENSE file:

        LibTomMath is hereby released into the Public Domain.

        -- Tom St Denis

        R Offline
        R Offline
        rashin ghodratzade
        wrote on last edited by
        #3

        -1 down vote favorite I have this program that needs to handle large numbers to factorize a number into primes.. Just like the RSA factorization challenge. I got this list in a txt file with prime numbers. this is the piece of code I use to make that list: int export_list (int lim = 50) { int last_in_txt = 0; { ifstream infile ("Primes.txt"); int k; while(infile >> k) { last_in_txt = k; } } // Now last_in_txt is assigned properly, and Primes.txt is closed cout << "\nLast number in \"Primes.txt\": " << last_in_txt << endl << endl; cout << "Press to start appending primes... "; cin.get(); cout << "\nAppend started:\n"; last_in_txt++; ofstream file ("Primes.txt" , ios::app); int x, counter; if (file.is_open()) // if it opens correctly { for (x = last_in_txt , counter = 0 ; counter < lim ; x++ , counter++) { if (check_prime (x)) // returns 1 when x is prime, returns 0 when not { cout << "Appending " << x << "\t\t" << "Estimated time remaining: " << (lim - counter) / 1000 <

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups