Documentation for 53a6c16730

This commit is contained in:
github-actions
2022-01-16 16:05:19 +00:00
parent 778f1be9e5
commit 2cab28c905
3620 changed files with 52045 additions and 41188 deletions

View File

@@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Algorithms_in_C++: math/inv_sqrt.cpp File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
@@ -30,8 +30,8 @@ MathJax.Hub.Config({
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">Algorithms_in_C++<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">Set of algorithms implemented in C++.</div>
@@ -41,7 +41,7 @@ MathJax.Hub.Config({
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.2 -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search",'Search','.html');
@@ -172,26 +172,26 @@ template&lt;typename T = double, char iterations = 2&gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the inverse square root </dd></dl>
<div class="fragment"><div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> {</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keyword">using</span> Tint = <span class="keyword">typename</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/conditional.html">std::conditional</a>&lt;<span class="keyword">sizeof</span>(T) == 8, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int64_t</a>,</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a>&gt;::type;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> T y = x;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> T x2 = y * 0.5;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> Tint i =</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> *<span class="keyword">reinterpret_cast&lt;</span>Tint *<span class="keyword">&gt;</span>(&amp;y); <span class="comment">// Store floating-point bits in integer</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> i = (<span class="keyword">sizeof</span>(T) == 8 ? 0x5fe6eb50c7b537a9 : 0x5f3759df) -</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> (i &gt;&gt; 1); <span class="comment">// Initial guess for Newton&#39;s method</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> y = *<span class="keyword">reinterpret_cast&lt;</span>T *<span class="keyword">&gt;</span>(&amp;i); <span class="comment">// Convert new bits into float</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> y = y * (1.5 - (x2 * y * y)); <span class="comment">// 1st iteration Newton&#39;s method</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <span class="keywordflow">if</span> (iterations == 2) {</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> y = y * (1.5 - (x2 * y * y)); <span class="comment">// 2nd iteration, the more exact result</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> }</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <span class="keywordflow">return</span> y;</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 28</span> {</div>
<div class="line"><span class="lineno"> 29</span> <span class="keyword">using</span> Tint = <span class="keyword">typename</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/conditional.html">std::conditional</a>&lt;<span class="keyword">sizeof</span>(T) == 8, <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int64_t</a>,</div>
<div class="line"><span class="lineno"> 30</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/types/integer.html">std::int32_t</a>&gt;::type;</div>
<div class="line"><span class="lineno"> 31</span> T y = x;</div>
<div class="line"><span class="lineno"> 32</span> T x2 = y * 0.5;</div>
<div class="line"><span class="lineno"> 33</span> </div>
<div class="line"><span class="lineno"> 34</span> Tint i =</div>
<div class="line"><span class="lineno"> 35</span> *<span class="keyword">reinterpret_cast&lt;</span>Tint *<span class="keyword">&gt;</span>(&amp;y); <span class="comment">// Store floating-point bits in integer</span></div>
<div class="line"><span class="lineno"> 36</span> </div>
<div class="line"><span class="lineno"> 37</span> i = (<span class="keyword">sizeof</span>(T) == 8 ? 0x5fe6eb50c7b537a9 : 0x5f3759df) -</div>
<div class="line"><span class="lineno"> 38</span> (i &gt;&gt; 1); <span class="comment">// Initial guess for Newton&#39;s method</span></div>
<div class="line"><span class="lineno"> 39</span> </div>
<div class="line"><span class="lineno"> 40</span> y = *<span class="keyword">reinterpret_cast&lt;</span>T *<span class="keyword">&gt;</span>(&amp;i); <span class="comment">// Convert new bits into float</span></div>
<div class="line"><span class="lineno"> 41</span> </div>
<div class="line"><span class="lineno"> 42</span> y = y * (1.5 - (x2 * y * y)); <span class="comment">// 1st iteration Newton&#39;s method</span></div>
<div class="line"><span class="lineno"> 43</span> <span class="keywordflow">if</span> (iterations == 2) {</div>
<div class="line"><span class="lineno"> 44</span> y = y * (1.5 - (x2 * y * y)); <span class="comment">// 2nd iteration, the more exact result</span></div>
<div class="line"><span class="lineno"> 45</span> }</div>
<div class="line"><span class="lineno"> 46</span> <span class="keywordflow">return</span> y;</div>
<div class="line"><span class="lineno"> 47</span>}</div>
<div class="ttc" id="aconditional_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/conditional.html">std::conditional</a></div></div>
<div class="ttc" id="ainteger_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/types/integer.html">std::int64_t</a></div></div>
</div><!-- fragment -->
@@ -215,23 +215,23 @@ template&lt;typename T = double, char iterations = 2&gt; </div>
<p>Main function. </p>
<dl class="section return"><dt>Returns</dt><dd>0 on exit </dd></dl>
<div class="fragment"><div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Fast inverse square root of 36 is: &quot;</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> &lt;&lt; Fast_InvSqrt&lt;float, 1&gt;(36.0f) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Fast inverse square root of 36 is: &quot;</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> &lt;&lt; Fast_InvSqrt&lt;double, 2&gt;(36.0f) &lt;&lt; <span class="stringliteral">&quot; (2 iterations)&quot;</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Fast inverse square root of 100 is: &quot;</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> &lt;&lt; <a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#ad219034bf5fba657f5035ec5a1d50f52">Fast_InvSqrt</a>(100.0f)</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> &lt;&lt; <span class="stringliteral">&quot; (With default template type and iterations: double, 2)&quot;</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Standard inverse square root of 36 is: &quot;</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> &lt;&lt; Standard_InvSqrt&lt;float&gt;(36.0f) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Standard inverse square root of 100 is: &quot;</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> &lt;&lt; <a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#aa2703e5cf3fecde8becd9066b9666b97">Standard_InvSqrt</a>(100.0f)</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> &lt;&lt; <span class="stringliteral">&quot; (With default template type: double)&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 87</span> {</div>
<div class="line"><span class="lineno"> 88</span> <a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#aa8dca7b867074164d5f45b0f3851269d">test</a>(); <span class="comment">// run self-test implementations</span></div>
<div class="line"><span class="lineno"> 89</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Fast inverse square root of 36 is: &quot;</span></div>
<div class="line"><span class="lineno"> 90</span> &lt;&lt; Fast_InvSqrt&lt;float, 1&gt;(36.0f) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 91</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Fast inverse square root of 36 is: &quot;</span></div>
<div class="line"><span class="lineno"> 92</span> &lt;&lt; Fast_InvSqrt&lt;double, 2&gt;(36.0f) &lt;&lt; <span class="stringliteral">&quot; (2 iterations)&quot;</span></div>
<div class="line"><span class="lineno"> 93</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 94</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Fast inverse square root of 100 is: &quot;</span></div>
<div class="line"><span class="lineno"> 95</span> &lt;&lt; <a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#ad219034bf5fba657f5035ec5a1d50f52">Fast_InvSqrt</a>(100.0f)</div>
<div class="line"><span class="lineno"> 96</span> &lt;&lt; <span class="stringliteral">&quot; (With default template type and iterations: double, 2)&quot;</span></div>
<div class="line"><span class="lineno"> 97</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 98</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Standard inverse square root of 36 is: &quot;</span></div>
<div class="line"><span class="lineno"> 99</span> &lt;&lt; Standard_InvSqrt&lt;float&gt;(36.0f) &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 100</span> <a class="code hl_classRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a> &lt;&lt; <span class="stringliteral">&quot;The Standard inverse square root of 100 is: &quot;</span></div>
<div class="line"><span class="lineno"> 101</span> &lt;&lt; <a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#aa2703e5cf3fecde8becd9066b9666b97">Standard_InvSqrt</a>(100.0f)</div>
<div class="line"><span class="lineno"> 102</span> &lt;&lt; <span class="stringliteral">&quot; (With default template type: double)&quot;</span> &lt;&lt; <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a>;</div>
<div class="line"><span class="lineno"> 103</span>}</div>
<div class="ttc" id="abasic_ostream_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/basic_ostream.html">std::cout</a></div></div>
<div class="ttc" id="aendl_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/io/manip/endl.html">std::endl</a></div><div class="ttdeci">T endl(T... args)</div></div>
<div class="ttc" id="ainv__sqrt_8cpp_html_aa2703e5cf3fecde8becd9066b9666b97"><div class="ttname"><a href="../../d6/db8/inv__sqrt_8cpp.html#aa2703e5cf3fecde8becd9066b9666b97">Standard_InvSqrt</a></div><div class="ttdeci">T Standard_InvSqrt(T number)</div><div class="ttdoc">This is the function that calculates the fast inverse square root. The following code is the fast inv...</div><div class="ttdef"><b>Definition:</b> inv_sqrt.cpp:59</div></div>
@@ -278,10 +278,10 @@ template&lt;typename T = double&gt; </div>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the inverse square root </dd></dl>
<div class="fragment"><div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> {</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> T squareRoot = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">sqrt</a>(number);</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> <span class="keywordflow">return</span> 1.0f / squareRoot;</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 59</span> {</div>
<div class="line"><span class="lineno"> 60</span> T squareRoot = <a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">sqrt</a>(number);</div>
<div class="line"><span class="lineno"> 61</span> <span class="keywordflow">return</span> 1.0f / squareRoot;</div>
<div class="line"><span class="lineno"> 62</span>}</div>
<div class="ttc" id="asqrt_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/sqrt.html">std::sqrt</a></div><div class="ttdeci">T sqrt(T... args)</div></div>
</div><!-- fragment -->
</div>
@@ -311,20 +311,20 @@ template&lt;typename T = double&gt; </div>
<p>Self-test implementations. </p>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>
<div class="fragment"><div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <span class="keyword">const</span> <span class="keywordtype">float</span> epsilon = 1e-3f;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> <span class="comment">/* Tests with multiple values */</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Standard_InvSqrt&lt;float&gt;(100.0f) - 0.0998449f) &lt; epsilon);</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Standard_InvSqrt&lt;double&gt;(36.0f) - 0.166667f) &lt; epsilon);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(<a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#aa2703e5cf3fecde8becd9066b9666b97">Standard_InvSqrt</a>(12.0f) - 0.288423f) &lt; epsilon);</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Standard_InvSqrt&lt;double&gt;(5.0f) - 0.447141f) &lt; epsilon);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Fast_InvSqrt&lt;float, 1&gt;(100.0f) - 0.0998449f) &lt; epsilon);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Fast_InvSqrt&lt;double, 1&gt;(36.0f) - 0.166667f) &lt; epsilon);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(<a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#ad219034bf5fba657f5035ec5a1d50f52">Fast_InvSqrt</a>(12.0f) - 0.288423) &lt; epsilon);</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Fast_InvSqrt&lt;double&gt;(5.0f) - 0.447141) &lt; epsilon);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span>}</div>
<div class="fragment"><div class="line"><span class="lineno"> 68</span> {</div>
<div class="line"><span class="lineno"> 69</span> <span class="keyword">const</span> <span class="keywordtype">float</span> epsilon = 1e-3f;</div>
<div class="line"><span class="lineno"> 70</span> </div>
<div class="line"><span class="lineno"> 71</span> <span class="comment">/* Tests with multiple values */</span></div>
<div class="line"><span class="lineno"> 72</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Standard_InvSqrt&lt;float&gt;(100.0f) - 0.0998449f) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 73</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Standard_InvSqrt&lt;double&gt;(36.0f) - 0.166667f) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 74</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(<a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#aa2703e5cf3fecde8becd9066b9666b97">Standard_InvSqrt</a>(12.0f) - 0.288423f) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 75</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Standard_InvSqrt&lt;double&gt;(5.0f) - 0.447141f) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 76</span> </div>
<div class="line"><span class="lineno"> 77</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Fast_InvSqrt&lt;float, 1&gt;(100.0f) - 0.0998449f) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 78</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Fast_InvSqrt&lt;double, 1&gt;(36.0f) - 0.166667f) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 79</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(<a class="code hl_function" href="../../d6/db8/inv__sqrt_8cpp.html#ad219034bf5fba657f5035ec5a1d50f52">Fast_InvSqrt</a>(12.0f) - 0.288423) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 80</span> assert(<a class="code hl_functionRef" target="_blank" href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a>(Fast_InvSqrt&lt;double&gt;(5.0f) - 0.447141) &lt; epsilon);</div>
<div class="line"><span class="lineno"> 81</span>}</div>
<div class="ttc" id="afabs_html"><div class="ttname"><a href="http://en.cppreference.com/w/cpp/numeric/math/fabs.html">std::fabs</a></div><div class="ttdeci">T fabs(T... args)</div></div>
</div><!-- fragment --><div class="dynheader">
Here is the call graph for this function:</div>
@@ -341,7 +341,7 @@ Here is the call graph for this function:</div>
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="../../dir_296d53ceaeaa7e099814a6def439fe8a.html">math</a></li><li class="navelem"><a class="el" href="../../d6/db8/inv__sqrt_8cpp.html">inv_sqrt.cpp</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2 </li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
</ul>
</div>
</body>