| Home | Libraries | People | FAQ | More

### Using NTL Library

NTL::RR (an arbitrarily-fixed precision floating-point number type), can be used via the bindings in boost/math/bindings/rr.hpp. For details, see NTL: A Library for doing Number Theory by Victor Shoup.

New projects are recommended to use Boost.Multiprecision instead.

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.

For those functions that are based upon the Lanczos approximation, the bindings defines a series of approximations with up to 61 terms and accuracy up to approximately 3e-113. This therefore sets the upper limit for accuracy to the majority of functions defined this library when used with `NTL::RR`.

There is a concept checking test program for NTL support here.