MPIR
MPIR is a free, portable library for arbitrary-precision arithmetic, with a focus on integers and rational numbers. It originated as a fork of the GNU Multiple Precision Arithmetic Library (GMP) intended to maintain compatibility with GMP’s API while preserving independence and portability. MPIR provides data types for big integers and rational numbers and supports a wide range of operations, including addition, subtraction, multiplication, division, modular arithmetic, and conversion between representations. It is designed to be a drop-in replacement for GMP in many projects, enabling developers to compile against libmpir and link with mpz_t and mpq_t types with minimal changes.
The library emphasizes portability across architectures and operating systems and is implemented in C with attention
MPIR is maintained independently and has been adopted by software projects as an alternative to GMP in