3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Using Boost.Math with High-Precision Floating-Point Libraries</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.11.0">
8 <link rel="up" href="../using_udt.html" title="Chapter 19. Use with User-Defined Floating-Point Types - Boost.Multiprecision and others">
9 <link rel="prev" href="../using_udt.html" title="Chapter 19. Use with User-Defined Floating-Point Types - Boost.Multiprecision and others">
10 <link rel="next" href="high_precision/why_high_precision.html" title="Why use a high-precision library rather than built-in floating-point types?">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../using_udt.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../using_udt.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="high_precision/why_high_precision.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
27 <a name="math_toolkit.high_precision"></a><a class="link" href="high_precision.html" title="Using Boost.Math with High-Precision Floating-Point Libraries">Using Boost.Math with High-Precision
28 Floating-Point Libraries</a>
29 </h2></div></div></div>
30 <div class="toc"><dl class="toc">
31 <dt><span class="section"><a href="high_precision/why_high_precision.html">Why use
32 a high-precision library rather than built-in floating-point types?</a></span></dt>
33 <dt><span class="section"><a href="high_precision/use_multiprecision.html">Using
34 Boost.Multiprecision</a></span></dt>
35 <dt><span class="section"><a href="high_precision/float128.html">Using with GCC's
36 __float128 datatype</a></span></dt>
37 <dt><span class="section"><a href="high_precision/use_mpfr.html">Using With MPFR
38 or GMP - High-Precision Floating-Point Library</a></span></dt>
39 <dt><span class="section"><a href="high_precision/e_float.html">Using e_float Library</a></span></dt>
40 <dt><span class="section"><a href="high_precision/use_ntl.html">Using NTL Library</a></span></dt>
41 <dt><span class="section"><a href="high_precision/using_test.html">Using without
42 expression templates for Boost.Test and others</a></span></dt>
45 The special functions, distributions, constants and tools in this library can
46 be used with a number of high-precision libraries, including:
48 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
50 <a href="../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
53 <a href="http://calgo.acm.org/910.zip" target="_top">e_float (TOMS Algorithm 910)</a>
56 <a href="http://www.shoup.net/ntl/" target="_top">NTL A Library for doing Number Theory</a>
59 <a href="http://gmplib.org/" target="_top">GNU Multiple Precision Arithmetic Library</a>
62 <a href="http://www.mpfr.org/" target="_top">GNU MPFR library</a>
65 <a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/libquadmath/index.html" target="_top">GCC
66 128-bit floating-point type</a>
73 The last four have some license restrictions; only <a href="../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
74 when using the <code class="computeroutput"><span class="identifier">cpp_float</span></code> backend
75 can provide an unrestricted <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">Boost</a>
79 At present, the price of a free license is slightly lower speed.
82 Of course, the main cost of higher precision is very much decreased (usually
83 at least hundred-fold) computation speed, and big increases in memory use.
86 Some libraries offer true <a href="http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic" target="_top">arbitrary-precision
87 arithmetic</a> where the precision is limited only by available memory
88 and compute time, but most are used at some arbitrarily-fixed precision, say
89 100 decimal digits, like <a href="../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
90 <code class="computeroutput"><span class="identifier">cpp_dec_float_100</span></code>.
93 <a href="../../../../../libs/multiprecision/doc/html/index.html" target="_top">Boost.Multiprecision</a>
94 can operate in both ways, but the most popular choice is likely to be about
95 a hundred decimal digits, though examples of computing about a million digits
96 have been demonstrated.
99 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
100 <td align="left"></td>
101 <td align="right"><div class="copyright-footer">Copyright © 2006-2019 Nikhar
102 Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
103 Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
104 Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
105 Daryle Walker and Xiaogang Zhang<p>
106 Distributed under the Boost Software License, Version 1.0. (See accompanying
107 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>)
112 <div class="spirit-nav">
113 <a accesskey="p" href="../using_udt.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../using_udt.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="high_precision/why_high_precision.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>