• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Using NTL Library</title>
5<link rel="stylesheet" href="../../math.css" type="text/css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="../../index.html" title="Math Toolkit 2.12.0">
8<link rel="up" href="../high_precision.html" title="Using Boost.Math with High-Precision Floating-Point Libraries">
9<link rel="prev" href="e_float.html" title="Using e_float Library">
10<link rel="next" href="using_test.html" title="Using without expression templates for Boost.Test and others">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<table cellpadding="2" width="100%"><tr>
14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15<td align="center"><a href="../../../../../../index.html">Home</a></td>
16<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20</tr></table>
21<hr>
22<div class="spirit-nav">
23<a accesskey="p" href="e_float.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../high_precision.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="using_test.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h3 class="title">
27<a name="math_toolkit.high_precision.use_ntl"></a><a class="link" href="use_ntl.html" title="Using NTL Library">Using NTL Library</a>
28</h3></div></div></div>
29<p>
30        <a href="http://shoup.net/ntl/doc/RR.txt" target="_top">NTL::RR</a> (an arbitrarily-fixed
31        precision floating-point number type), can be used via the bindings in <a href="../../../../../../boost/math/bindings/rr.hpp" target="_top">boost/math/bindings/rr.hpp</a>.
32        For details, see <a href="http://shoup.net/ntl/" target="_top">NTL: A Library for doing
33        Number Theory by Victor Shoup</a>.
34      </p>
35<p>
36        <span class="bold"><strong>New projects are recommended to use <a href="../../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
37        instead.</strong></span>
38      </p>
39<p>
40        Unfortunately <code class="computeroutput"><span class="identifier">NTL</span><span class="special">::</span><span class="identifier">RR</span></code> doesn't quite satisfy our conceptual
41        requirements, so there is a very thin wrapper class <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">math</span><span class="special">::</span><span class="identifier">ntl</span><span class="special">::</span><span class="identifier">RR</span></code> defined in <a href="../../../../../../boost/math/bindings/rr.hpp" target="_top">boost/math/bindings/rr.hpp</a>
42        that you should use in place of <code class="computeroutput"><span class="identifier">NTL</span><span class="special">::</span><span class="identifier">RR</span></code>. The
43        class is intended to be a drop-in replacement for the "real" NTL::RR
44        that adds some syntactic sugar to keep this library happy, plus some of the
45        standard library functions not implemented in NTL.
46      </p>
47<p>
48        For those functions that are based upon the <a class="link" href="../lanczos.html" title="The Lanczos Approximation">Lanczos
49        approximation</a>, the bindings defines a series of approximations with
50        up to 61 terms and accuracy up to approximately 3e-113. This therefore sets
51        the upper limit for accuracy to the majority of functions defined this library
52        when used with <code class="computeroutput"><span class="identifier">NTL</span><span class="special">::</span><span class="identifier">RR</span></code>.
53      </p>
54<p>
55        There is a concept checking test program for NTL support <a href="../../../../../../libs/math/test/ntl_concept_check.cpp" target="_top">here</a>.
56      </p>
57</div>
58<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
59<td align="left"></td>
60<td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar
61      Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
62      Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
63      Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
64      Daryle Walker and Xiaogang Zhang<p>
65        Distributed under the Boost Software License, Version 1.0. (See accompanying
66        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
67      </p>
68</div></td>
69</tr></table>
70<hr>
71<div class="spirit-nav">
72<a accesskey="p" href="e_float.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../high_precision.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="using_test.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
73</div>
74</body>
75</html>
76