Here you will find several examples of source code intended to illustrate some basic applications of GMP -- the GNU multi-precession arithmetic library. While mostly intended to illustrate some applications, this code might also be of use to someone learning how to use GMP. The makefile is here.
Containers
- gmpLCG.c
- General LCG implementation with GMP.
- gmpRandEx.c
- Simple use of the random functions in the GMP.
- fndFactor.c
- GMP benchmark program (for integer divisibility tests). Finds a factor of a number.
- piWallis.c
- Use a Wallis formula to compute Pi (very slowly)!
- randPi.c
- Compute the value of Pi with random numbers!