Registry / utility / mpir
library3.0.0vcpkgunverified

Multiple Precision Integers and Rationals library (fork of GMP).

vcpkg install mpir
INSTALL
IMPORT
SIG · MPIR
M
mpir
utilitycppv3.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mpir.h
#include <mpir.h>

Add two large integers using MPIR

#include <mpir.h> #include <stdio.h> int main() { mpz_t a, b, sum; mpz_init_set_str(a, "12345678901234567890", 10); mpz_init_set_str(b, "98765432109876543210", 10); mpz_init(sum); mpz_add(sum, a, b); gmp_printf("%Zd\n", sum); mpz_clear(a); mpz_clear(b); mpz_clear(sum); return 0; }
Debug
Known issues
breakingMPIR is a fork of GMP; some APIs differ slightly. Ensure you use MPIR-specific headers.
fix
Use #include <mpir.h> instead of <gmp.h> and link against MPIR.
affects: *
Upgrade
Version history
3.0.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources

No resource links recorded.

mpir — pip install mpir · libregistry