81 lines
7.4 KiB
HTML
81 lines
7.4 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>mpfr_float_backend</title>
|
|
<link rel="stylesheet" href="../../multiprecision.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
|
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Multiprecision">
|
|
<link rel="up" href="../ref.html" title="Reference">
|
|
<link rel="prev" href="mpf_ref.html" title="gmp_float">
|
|
<link rel="next" href="cpp_bin_float_ref.html" title="cpp_bin_float">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
|
|
<td align="center"><a href="../../../../../../index.html">Home</a></td>
|
|
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
|
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="mpf_ref.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="cpp_bin_float_ref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h3 class="title">
|
|
<a name="boost_multiprecision.ref.mpfr_ref"></a><a class="link" href="mpfr_ref.html" title="mpfr_float_backend">mpfr_float_backend</a>
|
|
</h3></div></div></div>
|
|
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">multiprecision</span><span class="special">{</span>
|
|
|
|
<span class="keyword">template</span> <span class="special"><</span><span class="keyword">unsigned</span> <span class="identifier">Digits10</span><span class="special">></span>
|
|
<span class="keyword">class</span> <span class="identifier">mpfr_float_backend</span><span class="special">;</span>
|
|
|
|
<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special"><</span><span class="identifier">mpfr_float_backend</span><span class="special"><</span><span class="number">50</span><span class="special">></span> <span class="special">></span> <span class="identifier">mpfr_float_50</span><span class="special">;</span>
|
|
<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special"><</span><span class="identifier">mpfr_float_backend</span><span class="special"><</span><span class="number">100</span><span class="special">></span> <span class="special">></span> <span class="identifier">mpfr_float_100</span><span class="special">;</span>
|
|
<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special"><</span><span class="identifier">mpfr_float_backend</span><span class="special"><</span><span class="number">500</span><span class="special">></span> <span class="special">></span> <span class="identifier">mpfr_float_500</span><span class="special">;</span>
|
|
<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special"><</span><span class="identifier">mpfr_float_backend</span><span class="special"><</span><span class="number">1000</span><span class="special">></span> <span class="special">></span> <span class="identifier">mpfr_float_1000</span><span class="special">;</span>
|
|
<span class="keyword">typedef</span> <span class="identifier">number</span><span class="special"><</span><span class="identifier">mpfr_float_backend</span><span class="special"><</span><span class="number">0</span><span class="special">></span> <span class="special">></span> <span class="identifier">mpfr_float</span><span class="special">;</span>
|
|
|
|
<span class="special">}}</span> <span class="comment">// namespaces</span>
|
|
</pre>
|
|
<p>
|
|
Class template <code class="computeroutput"><span class="identifier">mpfr_float_backend</span></code>
|
|
fulfils all of the requirements for a <a class="link" href="backendconc.html" title="Backend Requirements">Backend</a>
|
|
type. Its members and non-member functions are deliberately not documented:
|
|
these are considered implementation details that are subject to change.
|
|
</p>
|
|
<p>
|
|
The class takes a single template parameter - <code class="computeroutput"><span class="identifier">Digits10</span></code>
|
|
- which is the number of decimal digits precision the type should support.
|
|
When this parameter is zero, then the precision can be set at runtime via
|
|
<code class="computeroutput"><span class="identifier">number</span><span class="special">::</span><span class="identifier">default_precision</span></code> and <code class="computeroutput"><span class="identifier">number</span><span class="special">::</span><span class="identifier">precision</span></code>.
|
|
Note that this type does not in any way change the GMP or MPFR library's
|
|
global state (for example it does not change the default precision of the
|
|
mpfr_t data type), therefore you can safely mix this type with existing code
|
|
that uses GMP or MPFR, and also mix <code class="computeroutput"><span class="identifier">mpfr_float_backend</span></code>s
|
|
of differing precision.
|
|
</p>
|
|
<p>
|
|
The type of <code class="computeroutput"><span class="identifier">number_category</span><span class="special"><</span><span class="identifier">cpp_int</span><span class="special"><</span><span class="identifier">Args</span><span class="special">...></span> <span class="special">>::</span><span class="identifier">type</span></code> is <code class="computeroutput"><span class="identifier">mpl</span><span class="special">::</span><span class="identifier">int_</span><span class="special"><</span><span class="identifier">number_kind_floating_point</span><span class="special">></span></code>.
|
|
</p>
|
|
<p>
|
|
More information on this type can be found in the <a class="link" href="../tut/floats/mpfr_float.html" title="mpfr_float">tutorial</a>.
|
|
</p>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2002-2019 John Maddock
|
|
and Christopher Kormanyos<p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
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>)
|
|
</p>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="mpf_ref.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="cpp_bin_float_ref.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|