Mitch Richling: Example GMP Programs
Author: | Mitch Richling |
Updated: | 2023-11-15 |
Table of Contents
1. Introduction
Here you will find several examples of source code intended to illustrate some basic applications of GMP – the GNU multi-precision arithmetic library. While mostly intended to illustrate some applications, this code might also be of use to someone learning how to use GMP.
Get it all on github: https://github.com/richmit/ex-GMP/
2. 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!