Is there any way to check correctness of the mpz_mul()
function from GMP.
Asked
Active
Viewed 204 times
-3

John Ledbetter
- 13,557
- 1
- 61
- 80

user1299759
- 23
-
3We 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
-
1Maybe 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
-
1You 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 Answers
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