...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The special functions and tools in this library can be used with NTL::RR (an arbitrary precision number type), via the bindings in boost/math/bindings/rr.hpp. See also NTL: A Library for doing Number Theory by Victor Shoup
Unfortunately NTL::RR
doesn't quite satisfy our conceptual
requirements, so there is a very thin wrapper class boost::math::ntl::RR
defined in boost/math/bindings/rr.hpp
that you should use in place of NTL::RR
. The
class is intended to be a drop-in replacement for the "real" NTL::RR
that adds some syntactic sugar to keep this library happy, plus some of the
standard library functions not implemented in NTL.
Finally there is a high precision Lanczos
approximation suitable for use with boost::math::ntl::RR
, used at 1000-bit precision in libs/math/tools/ntl_rr_lanczos.hpp.
The approximation has a theoretical precision of > 90 decimal digits,
and an experimental precision of > 100 decimal digits. To use that approximation,
just include that header before any of the special function headers (if you
don't use it, you'll get a slower, but fully generic implementation for all
of the gamma-like functions).