summaryrefslogtreecommitdiff
path: root/libs/math/doc/html/math_toolkit/overview.html
blob: 6ecfc559a8c46e21d26d28dbfb43c65304442ad1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Overview</title>
<link rel="stylesheet" href="../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="../index.html" title="Math Toolkit 2.2.0">
<link rel="up" href="../cstdfloat.html" title="Chapter&#160;3.&#160;Specified-width floating-point typedefs">
<link rel="prev" href="../cstdfloat.html" title="Chapter&#160;3.&#160;Specified-width floating-point typedefs">
<link rel="next" href="rationale.html" title="Rationale">
</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="../cstdfloat.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cstdfloat.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="rationale.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="math_toolkit.overview"></a><a class="link" href="overview.html" title="Overview">Overview</a>
</h2></div></div></div>
<p>
      The header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">cstdfloat</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span></code>
      provides <span class="bold"><strong>optional</strong></span> standardized floating-point
      <code class="computeroutput"><span class="keyword">typedef</span></code>s having <span class="bold"><strong>specified
      widths</strong></span>. These are useful for writing portable code because they
      should behave identically on all platforms. These <code class="computeroutput"><span class="keyword">typedef</span></code>s
      are the floating-point analog of specified-width integers in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cstdint</span><span class="special">&gt;</span></code> and <code class="computeroutput"><span class="identifier">stdint</span><span class="special">.</span><span class="identifier">h</span></code>.
    </p>
<p>
      The <code class="computeroutput"><span class="keyword">typedef</span></code>s are based on <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3626.pdf" target="_top">N3626</a>
      proposed for a new C++14 standard header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">cstdfloat</span><span class="special">&gt;</span></code>
      and <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1703.pdf" target="_top">N1703</a>
      proposed for a new C language standard header <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">stdfloat</span><span class="special">.</span><span class="identifier">h</span><span class="special">&gt;</span></code>.
    </p>
<p>
      All <code class="computeroutput"><span class="keyword">typedef</span></code>s are in <code class="computeroutput"><span class="keyword">namespace</span> <span class="identifier">boost</span></code>
      (would be in namespace <code class="computeroutput"><span class="identifier">std</span></code>
      if eventually standardized).
    </p>
<p>
      The <code class="computeroutput"><span class="keyword">typedef</span></code>s include <code class="computeroutput"><span class="identifier">float16_t</span><span class="special">,</span> <span class="identifier">float32_t</span><span class="special">,</span> <span class="identifier">float64_t</span><span class="special">,</span> <span class="identifier">float80_t</span><span class="special">,</span> <span class="identifier">float128_t</span></code>, their corresponding least and
      fast types, and the corresponding maximum-width type. The <code class="computeroutput"><span class="keyword">typedef</span></code>s
      are based on underlying built-in types such as <code class="computeroutput"><span class="keyword">float</span></code>,
      <code class="computeroutput"><span class="keyword">double</span></code>, or <code class="computeroutput"><span class="keyword">long</span>
      <span class="keyword">double</span></code>, or based on other compiler-specific
      non-standardized types such as <code class="computeroutput"><span class="identifier">__float128</span></code>.
      The underlying types of these <code class="computeroutput"><span class="keyword">typedef</span></code>s
      must conform with the corresponding specifications of binary16, binary32, binary64,
      and binary128 in <a href="http://en.wikipedia.org/wiki/IEEE_floating_point" target="_top">IEEE_floating_point</a>
      floating-point format.
    </p>
<p>
      The 128-bit floating-point type (of great interest in scientific and numeric
      programming) is not required in the Boost header, and may not be supplied for
      all platforms/compilers, because compiler support for a 128-bit floating-point
      type is not mandated by either the C standard or the C++ standard.
    </p>
<p>
      See <a class="link" href="examples.html#math_toolkit.examples.je_lambda">Jahnke-Emden-Lambda function
      example</a> for an example using both a CMath function and a Boost.Math
      function to evaluate a moderately interesting function, the <a href="http://mathworld.wolfram.com/LambdaFunction.html" target="_top">Jahnke-Emden-Lambda
      function</a> and <a class="link" href="examples.html#math_toolkit.examples.normal_table">normal
      distribution</a> an example of a statistical distribution from Boost.Math
    </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 &#169; 2006-2010, 2012-2014 Nikhar Agrawal,
      Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
      Holin, Bruno Lalande, John Maddock, Johan R&#229;de, Gautam Sewani, Benjamin Sobotta,
      Thijs van den Berg, Daryle Walker and Xiaogang Zhang<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="../cstdfloat.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../cstdfloat.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="rationale.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>