]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | <html> |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> | |
4 | <title>Advancing a floating-point Value by a Specific Representation Distance (ULP) float_advance</title> | |
5 | <link rel="stylesheet" href="../../math.css" type="text/css"> | |
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.77.1"> | |
7 | <link rel="home" href="../../index.html" title="Math Toolkit 2.5.1"> | |
8 | <link rel="up" href="../next_float.html" title="Floating-Point Representation Distance (ULP), and Finding Adjacent Floating-Point Values"> | |
9 | <link rel="prev" href="float_distance.html" title="Calculating the Representation Distance Between Two floating-point Values (ULP) float_distance"> | |
10 | <link rel="next" href="ulp.html" title="Obtaining the Size of a Unit In the Last Place - ULP"> | |
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="float_distance.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../next_float.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="ulp.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.next_float.float_advance"></a><a class="link" href="float_advance.html" title="Advancing a floating-point Value by a Specific Representation Distance (ULP) float_advance">Advancing a floating-point | |
28 | Value by a Specific Representation Distance (ULP) float_advance</a> | |
29 | </h3></div></div></div> | |
30 | <p> | |
31 | Function <code class="computeroutput"><span class="identifier">float_advance</span></code> advances | |
32 | a floating-point number by a specified number of ULP. | |
33 | </p> | |
34 | <h5> | |
35 | <a name="math_toolkit.next_float.float_advance.h0"></a> | |
36 | <span class="phrase"><a name="math_toolkit.next_float.float_advance.synopsis"></a></span><a class="link" href="float_advance.html#math_toolkit.next_float.float_advance.synopsis">Synopsis</a> | |
37 | </h5> | |
38 | <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">special_functions</span><span class="special">/</span><span class="identifier">next</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span> | |
39 | </pre> | |
40 | <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">math</span><span class="special">{</span> | |
41 | ||
42 | <span class="keyword">template</span> <span class="special"><</span><span class="keyword">class</span> <span class="identifier">FPT</span><span class="special">></span> | |
43 | <span class="identifier">FPT</span> <span class="identifier">float_advance</span><span class="special">(</span><span class="identifier">FPT</span> <span class="identifier">val</span><span class="special">,</span> <span class="keyword">int</span> <span class="identifier">distance</span><span class="special">);</span> | |
44 | ||
45 | <span class="special">}}</span> <span class="comment">// namespaces</span> | |
46 | </pre> | |
47 | <h5> | |
48 | <a name="math_toolkit.next_float.float_advance.h1"></a> | |
49 | <span class="phrase"><a name="math_toolkit.next_float.float_advance.description_float_advance"></a></span><a class="link" href="float_advance.html#math_toolkit.next_float.float_advance.description_float_advance">Description | |
50 | - float_advance</a> | |
51 | </h5> | |
52 | <p> | |
53 | Returns a floating-point number <span class="emphasis"><em>r</em></span> such that <code class="computeroutput"><span class="identifier">float_distance</span><span class="special">(</span><span class="identifier">val</span><span class="special">,</span> <span class="identifier">r</span><span class="special">)</span> <span class="special">==</span> <span class="identifier">distance</span></code>. | |
54 | </p> | |
55 | </div> | |
56 | <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> | |
57 | <td align="left"></td> | |
58 | <td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012-2014 Nikhar Agrawal, | |
59 | Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert | |
60 | Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan Råde, Gautam Sewani, | |
61 | Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p> | |
62 | Distributed under the Boost Software License, Version 1.0. (See accompanying | |
63 | 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>) | |
64 | </p> | |
65 | </div></td> | |
66 | </tr></table> | |
67 | <hr> | |
68 | <div class="spirit-nav"> | |
69 | <a accesskey="p" href="float_distance.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../next_float.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="ulp.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> | |
70 | </div> | |
71 | </body> | |
72 | </html> |