I am using Boost.Multiprecision for wrappers around the mpfr backend, and I am having some trouble creating pi (and e or any other math constant) to my desired precision. I fee
The constants embedded in the Boost headers have a limited precision, and you've hit that limit. If you need a higher-precision version of pi (for instance), you'll need to bring it yourself.
For instance, the definition of boost::math::constants::pi
in the headers is:
BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00")
— https://github.com/boostorg/math/blob/master/include/boost/math/constants/constants.hpp
(This definition only gives 110 digits past the decimal place, by the way. Any digits you're getting beyond that are likely to be incorrect!)