-3

Is there any way to check correctness of the mpz_mul() function from GMP.

John Ledbetter
  • 13,557
  • 1
  • 61
  • 80
  • 3
    We would tell you but first you would have to tell us what `mpz_mul ()` function is and what it does. AFAIK it is not a standard c function, perhaps some function from the library you use? – Alok Save Apr 25 '12 at 06:20
  • 1
    Maybe try multiplying numbers with it and check if it outputs the expected results? Or do you have a corner case in mind? – RedX Apr 25 '12 at 06:28
  • 1
    You did run the QA suite for GMP before installing and using it, didn't you? If the QA suite gave it the thumbs up, the chances of there being an error in it are very slight. – Jonathan Leffler Apr 25 '12 at 06:29

1 Answers1

2

The way to check is to run the GMP test suite. The INSTALL instructions state:

Here are some brief instructions on how to install GMP. First you need to compile. Since you're impatient, try this

./configure
make
make check      <= VERY IMPORTANT!!

If that fails [...] you need to read the full instructions in the chapter "Installing GMP" in the manual.

Notice that it says 'VERY IMPORTANT!'

GoZoner
  • 67,920
  • 20
  • 95
  • 145