How To Install mpfr on CentOS 7

In this tutorial we learn how to install mpfr on CentOS 7. mpfr is A C library for multiple-precision floating-point computations

Introduction

In this tutorial we learn how to install mpfr on CentOS 7.

What is mpfr

The MPFR library is a C library for multiple-precision floating-point computations with “correct rounding”. The MPFR is efficient and also has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit mantissa). MPFR is based on the GMP multiple-precision library. The MPFR library is a C library for multiple-precision floating-point computations with “correct rounding”. The MPFR is efficient and also has a well-defined semantics. It copies the good ideas from the ANSI/IEEE-754 standard for double-precision floating-point arithmetic (53-bit mantissa). MPFR is based on the GMP multiple-precision library.

We can use yum or dnf to install mpfr on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install mpfr.

Install mpfr on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install mpfr using yum by running the following command:

sudo yum -y install mpfr

Install mpfr on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install mpfr using dnf by running the following command:

sudo dnf -y install mpfr

How To Uninstall mpfr on CentOS 7

To uninstall only the mpfr package we can use the following command:

sudo dnf remove mpfr

References

Summary

In this tutorial we learn how to install mpfr on CentOS 7 using yum and dnf.