Hi,
I searched the boost mailing list archives on MPFR and the last query was in Feb 2010 so I think this may be worth a new thread.
I'm interested in using MPFR (C library for
multiple-precision floating-point computations with correct rounding - http://www.mpfr.org/) with some of the boost math libraries (vectors, matrices). Support is available to do this via the bindings in boost/math/bindings/mpfr.hpp. As per the documentation (http://www.boost.org/doc/libs/1_45_0/libs/math/doc/sf_and_dist/html/math_toolkit/using_udt/use_mpfr.html):
"In order to use these bindings you will need to have installed MPFR
plus it's dependency the GMP library
and the C++ wrapper for MPFR known as gmpfrxx
(or mpfr_class)."
However, when compiling the example listed in the documentation:
#include <boost/math/bindings/mpfr.hpp>I get a large number of compile errors (attached).
#include <boost/math/special_functions/gamma.hpp>
int main()
{
mpfr_class::set_dprec(500); // 500 bit precision
//
// Note that the argument to tgamma is an expression template,
// that's just fine here:
//
mpfr_class v = boost::math::tgamma(sqrt(mpfr_class(2)));
std::cout << std::setprecision(50) << v << std::endl;
}