This forum has been archived. All content is frozen. Please use KDE Discuss instead.

MPRealSupport module for multiple precision failing

Tags: None
(comma "," separated)
isaaci
Registered Member
Posts
2
Karma
0
Hello,

Thank you for your precious time. Until recently, the MPRealSupport module was compiling perfectly on Ubuntu with Code::Blocks, but today the compilation is giving error messages. I tried to reinstall MPFR 4, the latest version of Eigen, but nothing helped. I suspect that this is because I upgraded the Ubuntu 16 to version 18, but I don't know what to do. I will be grateful if you can help.

For instance, the sample code at the Eigen website is no longer compiling:
https://eigen.tuxfamily.org/dox/unsuppo ... odule.html
( I am getting error messages like "Undefined reference to mpfr_set4", etc, to many functions.)
///////////////////////////////////////////////////////////////////////////////////////
#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)
mpreal::set_default_prec(256);
// 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;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////
isaaci
Registered Member
Posts
2
Karma
0
MY APOLOGIES!

At long last I fixed the problem. The compiler settings were changed due to the upgraded Ubuntu operating system.
Multiple Precision is finally working again!


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell