Eigen-unsupported  3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)
Eigen::NumTraits< mpfr::mpreal > Struct Reference

Detailed Description

\defgroup MPRealSupport_Module MPFRC++ Support module
#include <Eigen/MPRealSupport>

This module provides support for multi precision floating point numbers
via the <a href="http://www.holoborodko.com/pavel/mpfr">MPFR C++</a>
library which itself is built upon <a href="http://www.mpfr.org/">MPFR</a>/<a href="http://gmplib.org/">GMP</a>.

\warning MPFR C++ is licensed under the GPL.

You can find a copy of MPFR C++ that is known to be compatible in the unsupported/test/mpreal folder.

Here is an example:
#include <iostream>
#include <Eigen/MPRealSupport>
#include <Eigen/LU>
using namespace mpfr;
using namespace Eigen;
int main()
// set precision to 256 bits (double has only 53 bits)
// Declare matrix and vector types with multi-precision scalar type
typedef Matrix<mpreal,Dynamic,Dynamic> MatrixXmp;
typedef Matrix<mpreal,Dynamic,1> VectorXmp;
MatrixXmp A = MatrixXmp::Random(100,100);
VectorXmp b = VectorXmp::Random(100);
// Solve Ax=b using LU
VectorXmp x = A.lu().solve(b);
std::cout << "relative error: " << (A*x - b).norm() / b.norm() << std::endl;
return 0;
Namespace containing all symbols from the Eigen library.

Inherits GenericNumTraits< mpfr::mpreal >.

The documentation for this struct was generated from the following file: