<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:space="preserve"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><title>S17ACF : NAG Library, Mark 22</title><link rel="stylesheet" href="../styles/libdoc.css" type="text/css"/><script type="text/javascript">
   function showLevel(_levelId){
    var thisLevel = document.getElementById(_levelId);
    var thisplus = document.getElementById( _levelId.concat('plus'));
    var thisminus = document.getElementById( _levelId.concat('minus'));
    if(thisLevel.style.display != "block"){
     thisLevel.style.display = "block";
     thisplus.style.display = "none";
     thisminus.style.display = "inline";
     }
    else{
     thisLevel.style.display = "none";
     thisminus.style.display = "none";
     thisplus.style.display = "inline";
     }
    }
  </script></head><body><hr/><div><a class="rout" href="../../pdf/S/s17acf.pdf">S17ACF (PDF version)</a></div><div><a class="chap" href="sconts.xml">S Chapter Contents</a></div><div><a class="chapint" href="sintro.xml">S Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div><hr/><h1 class="libdoc">NAG Library Routine Document<br/><br/>S17ACF</h1><div class="paramtext"><div class="header"><b>Note:</b>&#160; before using this routine, please read the Users' Note for your implementation to check the interpretation of <span class="bitalic">bold italicised</span> terms and other implementation-dependent details.</div></div> 
<div class="htmltoc">
<h2 class="htmltoc"><span class="htmltochead" onclick="showLevel('htmltoc');"><span class="htmltocplus" id="htmltocplus">+</span><span class="htmltocminus" id="htmltocminus">&#8722;</span></span>&#160;Contents</h2>
<div class="htmltocitem" id="htmltoc">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#purpose">1&#160;&#160;<b>Purpose</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">2&#160;&#160;<b>Specification</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">3&#160;&#160;<b>Description</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">4&#160;&#160;<b>References</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">5&#160;&#160;<b>Parameters</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">6&#160;&#160;<b>Error Indicators and Warnings</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">7&#160;&#160;<b>Accuracy</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments">8&#160;&#160;<b>Further Comments</b></a>
</div><div class="htmltoc">
<span class="htmltoc" onclick="showLevel('tocexample');"><span class="htmltocplus" id="tocexampleplus">+</span><span class="htmltocminus" id="tocexampleminus">&#8722;</span></span>
<a class="htmltoc" href="#example">9&#160;&#160;<b>Example</b></a>
<div class="htmltocitem" id="tocexample">
<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examtext">9.1&#160;&#160;<b>Program Text</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">9.2&#160;&#160;<b>Program Data</b></a>
</div><div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">9.3&#160;&#160;<b>Program Results</b></a>
</div>
</div>
</div>
</div>
</div><h2 class="standard"><a class="sec" name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>
<div class="paramtext">S17ACF returns the value of the Bessel Function <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>, via the routine name.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b>&#160;FUNCTION&#160;S17ACF&#160;(</td><td class="tdfspec2"><a class="arg" href="#X">X</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">X</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">S17ACF evaluates an approximation to the Bessel Function of the second kind <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>.</div><div class="paramtext"><b>Note:</b>&#160; <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is undefined for <m:math><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mn>0</m:mn></m:math>&#160;and the routine will fail for such arguments.</div><div class="paramtext">The routine is based on four Chebyshev expansions:</div><div class="paramtext">For <m:math><m:mn>0</m:mn><m:mo>&lt;</m:mo><m:mi>x</m:mi><m:mo>&#8804;</m:mo><m:mn>8</m:mn></m:math>,

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mfrac><m:mn>2</m:mn><m:mi>&#960;</m:mi>
 </m:mfrac><m:mrow><m:mi>ln</m:mi><m:mo>&#8289;</m:mo><m:mi>x</m:mi></m:mrow><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>r</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow><m:mo>&#8242;</m:mo></m:munderover><m:msub><m:mi>a</m:mi><m:mi>r</m:mi></m:msub><m:msub><m:mi>T</m:mi><m:mi>r</m:mi></m:msub><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mo>+</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>r</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow><m:mo>&#8242;</m:mo></m:munderover><m:msub><m:mi>b</m:mi><m:mi>r</m:mi></m:msub><m:msub><m:mi>T</m:mi><m:mi>r</m:mi></m:msub><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mo>,</m:mo><m:mi mathvariant="normal">with</m:mi>  <m:mi>t</m:mi><m:mo>=</m:mo><m:mn>2</m:mn>
<m:msup>
<m:mfenced separators=""><m:mfrac><m:mi>x</m:mi><m:mn>8</m:mn></m:mfrac></m:mfenced>
<m:mn>2</m:mn></m:msup><m:mo>-</m:mo><m:mn>1</m:mn><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

For <m:math><m:mi>x</m:mi><m:mo>&gt;</m:mo><m:mn>8</m:mn></m:math>,

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msqrt><m:mfrac><m:mn>2</m:mn><m:mrow><m:mi>&#960;</m:mi><m:mi>x</m:mi></m:mrow>
 </m:mfrac></m:msqrt>
<m:mfenced open="{" close="}" separators=""><m:msub><m:mi>P</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac><m:mi>&#960;</m:mi><m:mn>4</m:mn></m:mfrac></m:mfenced></m:mrow><m:mo>+</m:mo><m:msub><m:mi>Q</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>cos</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac><m:mi>&#960;</m:mi><m:mn>4</m:mn></m:mfrac></m:mfenced></m:mrow>
</m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>P</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mstyle displaystyle="true"><m:munder><m:msup><m:mo>&#8721;</m:mo><m:mo>'</m:mo></m:msup><m:mrow><m:mi>r</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow></m:munder></m:mstyle><m:mspace width="0.25em"/><m:msub><m:mi>c</m:mi><m:mi>r</m:mi></m:msub><m:msub><m:mi>T</m:mi><m:mi>r</m:mi></m:msub><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced></m:math>,</div><div class="paramtext">and <m:math><m:msub><m:mi>Q</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mfrac other="display">
  <m:mn>8</m:mn><m:mi>x</m:mi></m:mfrac><m:mstyle displaystyle="true"><m:munder><m:msup><m:mo>&#8721;</m:mo><m:mo>'</m:mo></m:msup><m:mrow><m:mi>r</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow></m:munder></m:mstyle><m:mspace width="0.25em"/><m:msub><m:mi>d</m:mi><m:mi>r</m:mi></m:msub><m:msub><m:mi>T</m:mi><m:mi>r</m:mi></m:msub><m:mfenced separators=""><m:mi>t</m:mi></m:mfenced><m:mo>,</m:mo><m:mtext>with &#8203;</m:mtext>  <m:mi>t</m:mi><m:mo>=</m:mo><m:mn>2</m:mn>
<m:msup>
<m:mfenced separators=""><m:mfrac other="display">
  <m:mn>8</m:mn><m:mi>x</m:mi></m:mfrac></m:mfenced>
<m:mn>2</m:mn></m:msup><m:mo>-</m:mo><m:mn>1</m:mn><m:mtext>.</m:mtext></m:math></div><div class="paramtext">For <m:math><m:mi>x</m:mi></m:math>&#160;near zero, <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>&#8771;</m:mo><m:mfrac><m:mn>2</m:mn><m:mi>&#960;</m:mi>
 </m:mfrac>
<m:mfenced separators=""><m:mrow><m:mi>ln</m:mi><m:mfenced separators=""><m:mfrac><m:mi>x</m:mi><m:mn>2</m:mn></m:mfrac></m:mfenced></m:mrow><m:mo>+</m:mo><m:mi>&#947;</m:mi></m:mfenced>
</m:math>, where <m:math><m:mi>&#947;</m:mi></m:math>&#160;denotes Euler's constant.  This approximation is used when <m:math><m:mi>x</m:mi></m:math>&#160;is sufficiently small for the result to be correct to <span class="bitalic">machine precision</span>.</div><div class="paramtext">For very large <m:math><m:mi>x</m:mi></m:math>, it becomes impossible to provide results with any reasonable accuracy (see <a class="sec" href="#accuracy">Section 7</a>), hence the routine fails.  Such arguments contain insufficient information to determine the phase of oscillation of <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>; only the amplitude, <m:math><m:msqrt><m:mfrac><m:mn>2</m:mn><m:mrow><m:mi>&#960;</m:mi><m:mi>n</m:mi></m:mrow>
 </m:mfrac></m:msqrt></m:math>, can be determined and this is returned on soft failure.  The range for which this occurs is roughly related to <span class="bitalic">machine precision</span>; the routine will fail if <m:math><m:mi>x</m:mi><m:mo>&#8819;</m:mo><m:mn>1</m:mn><m:mo>/</m:mo><m:mi mathvariant="bold-italic">machine&#160;precision</m:mi></m:math>&#160;(see the <a class="url" href="http://www.nag.co.uk/doc/inun/fl22.html">Users' Note</a> for your implementation for details).</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref126" id="ref126"/>Abramowitz M and Stegun I A (1972)  <i>Handbook of Mathematical Functions</i> (3rd Edition) Dover Publications </div>
<div class="paramtext"><a name="ref177" id="ref177"/>Clenshaw C W (1962)  Chebyshev Series for Mathematical Functions <i>Mathematical tables</i> HMSO </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="X" id="X"/>1: &#160;&#160;&#8194; X &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the argument <m:math><m:mi>x</m:mi></m:math>&#160;of the function.</div>
<div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>2: &#160;&#160;&#8194; IFAIL &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <a class="arg" href="#IFAIL">IFAIL</a> must be set to <m:math><m:mn>0</m:mn></m:math>, <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>. If you are unfamiliar with this parameter you should refer to <a class="sec" href="../GENINT/essint.xml#library3">Section 3.3</a> in  the Essential Introduction for details.</div>
<div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>). <div class="paramtext">For environments where it might be inappropriate to halt program execution when an error is detected, the value <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn>1</m:mn></m:math>&#160;is recommended.  If the output of error messages is undesirable, then the value <m:math><m:mn>1</m:mn></m:math>&#160;is recommended.  Otherwise, if you are not familiar with this parameter, the recommended value is <m:math><m:mn>0</m:mn></m:math>.  <b>When the value <m:math><m:mrow><m:mo>-</m:mo><m:mn mathvariant="bold">1</m:mn></m:mrow><m:mtext>&#8203; or &#8203;</m:mtext><m:mn mathvariant="bold">1</m:mn></m:math>&#160;is used it is essential to test the value of <a class="arg" href="#IFAIL">IFAIL</a> on exit.</b></div></div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">If on entry <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">0</m:mn></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#errors"><m:mn mathcolor="#003399" mathvariant="bold">-1</m:mn></m:maction></m:math>, explanatory error messages are output on the current error message unit (as defined by <a class="rout" href="../X04/x04aaf.xml">X04AAF</a>).</div><div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="IFeq1" id="IFeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>
<div class="paramtext"><a class="arg" href="#X">X</a> is too large.  On soft failure the routine returns the amplitude of the <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;oscillation, <m:math><m:msqrt><m:mn>2</m:mn><m:mo>/</m:mo><m:mfenced separators=""><m:mi>&#960;</m:mi><m:mi>x</m:mi></m:mfenced></m:msqrt></m:math>.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq2" id="IFeq2"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IFAIL"><m:mi mathcolor="#EE0000" mathvariant="bold">IFAIL</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>
<div class="paramtext"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#X"><m:mi mathcolor="#EE0000" mathvariant="bold">X</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>, <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub></m:math>&#160;is undefined.  On soft failure the routine returns zero.</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">Let <m:math><m:mi>&#948;</m:mi></m:math>&#160;be the relative error in the argument and <m:math><m:mi>E</m:mi></m:math>&#160;be the absolute error in the result.  (Since <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;oscillates about zero, absolute error and not relative error is significant, except for very small <m:math><m:mi>x</m:mi></m:math>.)</div><div class="paramtext">If <m:math><m:mi>&#948;</m:mi></m:math>&#160;is somewhat larger than the machine representation error (e.g., if <m:math><m:mi>&#948;</m:mi></m:math>&#160;is due to data errors etc.), then <m:math><m:mi>E</m:mi></m:math>&#160;and <m:math><m:mi>&#948;</m:mi></m:math>&#160;are approximately related by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>E</m:mi><m:mo>&#8771;</m:mo><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:msub><m:mi>Y</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:mfenced><m:mi>&#948;</m:mi>
</m:math></td><td class="formula2"/></tr></table></div>

(provided <m:math><m:mi>E</m:mi></m:math>&#160;is also within machine bounds).  <a class="fig" href="#S17ACF1">Figure 1</a> displays the behaviour of the amplification factor <m:math><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:msub><m:mi>Y</m:mi><m:mn>1</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:mfenced></m:math>.</div><div class="paramtext">However, if <m:math><m:mi>&#948;</m:mi></m:math>&#160;is of the same order as the machine representation errors, then rounding errors could make <m:math><m:mi>E</m:mi></m:math>&#160;slightly larger than the above relation predicts.</div><div class="paramtext">For very small <m:math><m:mi>x</m:mi></m:math>, the errors are essentially independent of <m:math><m:mi>&#948;</m:mi></m:math>&#160;and the routine should provide relative accuracy bounded by the <span class="bitalic">machine precision</span>.</div><div class="paramtext">For very large <m:math><m:mi>x</m:mi></m:math>, the above relation ceases to apply.  In this region, <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>&#8771;</m:mo><m:msqrt><m:mfrac other="display">
  <m:mn>2</m:mn><m:mrow><m:mi>&#960;</m:mi><m:mi>x</m:mi></m:mrow>
 </m:mfrac></m:msqrt><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac other="display">
  <m:mi>&#960;</m:mi><m:mn>4</m:mn></m:mfrac></m:mfenced></m:mrow></m:math>.  The amplitude <m:math><m:msqrt><m:mfrac other="display">
  <m:mn>2</m:mn><m:mrow><m:mi>&#960;</m:mi><m:mi>x</m:mi></m:mrow>
 </m:mfrac></m:msqrt></m:math>&#160;can be calculated with reasonable accuracy for all <m:math><m:mi>x</m:mi></m:math>, but <m:math><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac><m:mi>&#960;</m:mi><m:mn>4</m:mn></m:mfrac></m:mfenced></m:mrow></m:math>&#160;cannot.  If <m:math><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac other="display">
  <m:mi>&#960;</m:mi><m:mn>4</m:mn></m:mfrac>
</m:math>&#160;is written as <m:math><m:mn>2</m:mn><m:mi>N</m:mi><m:mi>&#960;</m:mi><m:mo>+</m:mo><m:mi>&#952;</m:mi></m:math>&#160;where <m:math><m:mi>N</m:mi></m:math>&#160;is an integer and <m:math><m:mn>0</m:mn><m:mo>&#8804;</m:mo><m:mi>&#952;</m:mi><m:mo>&lt;</m:mo><m:mn>2</m:mn><m:mi>&#960;</m:mi></m:math>, then <m:math><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac other="display">
  <m:mi>&#960;</m:mi><m:mn>4</m:mn></m:mfrac></m:mfenced></m:mrow></m:math>&#160;is determined by <m:math><m:mi>&#952;</m:mi></m:math>&#160;only.  If <m:math><m:mi>x</m:mi><m:mo>&#8819;</m:mo><m:msup><m:mi>&#948;</m:mi><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msup></m:math>, <m:math><m:mi>&#952;</m:mi></m:math>&#160;cannot be determined with any accuracy at all.  Thus if <m:math><m:mi>x</m:mi></m:math>&#160;is greater than, or of the order of the inverse of <span class="bitalic">machine precision</span>, it is impossible to calculate the phase of <m:math><m:msub><m:mi>Y</m:mi><m:mn>0</m:mn></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;and the routine must fail.</div><div class="paramtext">
<div class="figure"><a name="S17ACF1" id="S17ACF1"/><img src="../figures/S17ACF1fl17.png" style="height: 33em" alt="Figure 1"/></div><div class="figure"><b>Figure 1</b></div>
</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">None.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example reads values of the argument <m:math><m:mi>x</m:mi></m:math>&#160;from a file, evaluates the function at each value of <m:math><m:mi>x</m:mi></m:math>&#160;and prints the results.</div><h3 class="standard"><a class="sec" name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
<p><a class="verbatimref" href="../../examples/source/s17acfe.f">Program Text (s17acfe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/s17acfe.d">Program&#160;Data (s17acfe.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/s17acfe.r">Program Results (s17acfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/S/s17acf.pdf">S17ACF (PDF version)</a></div><div><a class="chap" href="sconts.xml">S Chapter Contents</a></div><div><a class="chapint" href="sintro.xml">S Chapter Introduction</a></div>
<div><a class="htmltoc" href="../FRONTMATTER/manconts.xml">NAG Library Manual</a></div>
<div><hr/><a class="genint" href="../FRONTMATTER/copyright.xml">&#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2009</a></div></body></html>