MPFR 是一个开源的多精度浮点运算库(GNU MPFR Library),用于进行任意精度(多精度)的浮点计算,并提供可控舍入与高可靠性的结果(常用于数值计算、科学计算与高精度验证)。
/ˌɛm.piː.ɛfˈɑːr/
I used MPFR to compute π with 1,000 digits.
我用 MPFR 计算了圆周率的 1000 位小数。
Because MPFR supports correctly rounded arithmetic, the results are reproducible across platforms when the same precision and rounding mode are used.
由于 MPFR 支持正确舍入运算,只要使用相同的精度与舍入模式,结果就能在不同平台上保持可复现。
MPFR 是一个首字母缩略词,来源于 Multiple Precision Floating-Point Reliable(“可靠的多精度浮点”)。它最初作为 GNU 生态中的数学库之一发展起来,强调“多精度 + 可证明/可控的舍入行为”,以满足严谨数值计算的需求。