]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/math/doc/html/math_toolkit/powers/sin_pi.html
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / math / doc / html / math_toolkit / powers / sin_pi.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>sin_pi</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="../powers.html" title="Basic Functions">
9 <link rel="prev" href="../powers.html" title="Basic Functions">
10 <link rel="next" href="cos_pi.html" title="cos_pi">
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="../powers.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../powers.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="cos_pi.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.powers.sin_pi"></a><a class="link" href="sin_pi.html" title="sin_pi">sin_pi</a>
28 </h3></div></div></div>
29 <pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</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">sin_pi</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
30 </pre>
31 <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>
32
33 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">&gt;</span>
34 <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">sin_pi</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">);</span>
35
36 <span class="keyword">template</span> <span class="special">&lt;</span><span class="keyword">class</span> <span class="identifier">T</span><span class="special">,</span> <span class="keyword">class</span> <a class="link" href="../../policy.html" title="Chapter&#160;15.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&gt;</span>
37 <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>calculated-result-type</em></span></a> <span class="identifier">sin_pi</span><span class="special">(</span><span class="identifier">T</span> <span class="identifier">x</span><span class="special">,</span> <span class="keyword">const</span> <a class="link" href="../../policy.html" title="Chapter&#160;15.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a><span class="special">&amp;);</span>
38
39 <span class="special">}}</span> <span class="comment">// namespaces</span>
40 </pre>
41 <p>
42 Returns the sine of <span class="emphasis"><em>&#960;x</em></span>.
43 </p>
44 <p>
45 The return type of this function is computed using the <a class="link" href="../result_type.html" title="Calculation of the Type of the Result"><span class="emphasis"><em>result
46 type calculation rules</em></span></a>: the return is <code class="computeroutput"><span class="keyword">double</span></code>
47 when <span class="emphasis"><em>x</em></span> is an integer type and T otherwise.
48 </p>
49 <p>
50 The final <a class="link" href="../../policy.html" title="Chapter&#160;15.&#160;Policies: Controlling Precision, Error Handling etc">Policy</a> argument is optional and can
51 be used to control the behaviour of the function: how it handles errors,
52 what level of precision to use etc. Refer to the <a class="link" href="../../policy.html" title="Chapter&#160;15.&#160;Policies: Controlling Precision, Error Handling etc">policy
53 documentation for more details</a>.
54 </p>
55 <p>
56 This function performs exact all-integer arithmetic argument reduction before
57 computing the sine of <span class="emphasis"><em>&#960;x</em></span>.
58 </p>
59 <div class="table">
60 <a name="math_toolkit.powers.sin_pi.table_sin_pi"></a><p class="title"><b>Table&#160;6.76.&#160;Error rates for sin_pi</b></p>
61 <div class="table-contents"><table class="table" summary="Error rates for sin_pi">
62 <colgroup>
63 <col>
64 <col>
65 <col>
66 <col>
67 <col>
68 </colgroup>
69 <thead><tr>
70 <th>
71 </th>
72 <th>
73 <p>
74 Microsoft Visual C++ version 12.0<br> Win32<br> double
75 </p>
76 </th>
77 <th>
78 <p>
79 GNU C++ version 5.1.0<br> linux<br> double
80 </p>
81 </th>
82 <th>
83 <p>
84 GNU C++ version 5.1.0<br> linux<br> long double
85 </p>
86 </th>
87 <th>
88 <p>
89 Sun compiler version 0x5130<br> Sun Solaris<br> long double
90 </p>
91 </th>
92 </tr></thead>
93 <tbody>
94 <tr>
95 <td>
96 <p>
97 sin_pi and cos_pi
98 </p>
99 </td>
100 <td>
101 <p>
102 <span class="blue">Max = 0.99&#949; (Mean = 0.328&#949;)</span>
103 </p>
104 </td>
105 <td>
106 <p>
107 <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span>
108 </p>
109 </td>
110 <td>
111 <p>
112 <span class="blue">Max = 0.996&#949; (Mean = 0.335&#949;)</span>
113 </p>
114 </td>
115 <td>
116 <p>
117 <span class="blue">Max = 0.996&#949; (Mean = 0.336&#949;)</span>
118 </p>
119 </td>
120 </tr>
121 <tr>
122 <td>
123 <p>
124 sin_pi and cos_pi near integers and half integers
125 </p>
126 </td>
127 <td>
128 <p>
129 <span class="blue">Max = 0.996&#949; (Mean = 0.343&#949;)</span>
130 </p>
131 </td>
132 <td>
133 <p>
134 <span class="blue">Max = 0&#949; (Mean = 0&#949;)</span>
135 </p>
136 </td>
137 <td>
138 <p>
139 <span class="blue">Max = 0.976&#949; (Mean = 0.293&#949;)</span>
140 </p>
141 </td>
142 <td>
143 <p>
144 <span class="blue">Max = 0.976&#949; (Mean = 0.293&#949;)</span>
145 </p>
146 </td>
147 </tr>
148 </tbody>
149 </table></div>
150 </div>
151 <br class="table-break">
152 </div>
153 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
154 <td align="left"></td>
155 <td align="right"><div class="copyright-footer">Copyright &#169; 2006-2010, 2012-2014 Nikhar Agrawal,
156 Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
157 Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan R&#229;de, Gautam Sewani,
158 Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p>
159 Distributed under the Boost Software License, Version 1.0. (See accompanying
160 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>)
161 </p>
162 </div></td>
163 </tr></table>
164 <hr>
165 <div class="spirit-nav">
166 <a accesskey="p" href="../powers.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../powers.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="cos_pi.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
167 </div>
168 </body>
169 </html>