Registry / utility / mpfr
library4.2.2vcpkgunverified

The MPFR library is a C library for multiple-precision floating-point computations with correct rounding.

vcpkg install mpfr
INSTALL
IMPORT
SIG · MPFR
M
mpfr
utilitycppv4.2.2
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.

mpfr.h
#include <mpfr.h>

Compute square root of pi with high precision

#include <mpfr.h> #include <iostream> int main() { mpfr_t x; mpfr_init2(x, 256); mpfr_set_str(x, "3.14159265358979323846264338327950288419716939937510", 10, MPFR_RNDN); mpfr_t y; mpfr_init2(y, 256); mpfr_sqrt(y, x, MPFR_RNDN); mpfr_printf("sqrt(pi) = %.20Rf\n", y); mpfr_clear(x); mpfr_clear(y); return 0; }
Debug
Known issues
gotchaMPFR requires GMP (GNU Multiple Precision Arithmetic Library) as a dependency.
fix
Ensure GMP is installed and linked before using MPFR.
affects: all
Upgrade
Version history
4.2.2latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources

No resource links recorded.

mpfr — pip install mpfr · libregistry