<?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>D01EAF : 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/D01/d01eaf.pdf">D01EAF (PDF version)</a></div><div><a class="chap" href="d01conts.xml">D01 Chapter Contents</a></div><div><a class="chapint" href="d01intro.xml">D01 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/>D01EAF</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">D01EAF computes approximations to the integrals of a vector of similar functions, each defined over the same multi-dimensional hyper-rectangular region.  The routine uses an adaptive subdivision strategy, and also computes absolute error estimates.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2>
<table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;D01EAF&#160;(</td><td class="tdfspec2"><a class="arg" href="#NDIM">NDIM</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#MINCLS">MINCLS</a>, <a class="arg" href="#MAXCLS">MAXCLS</a>, <a class="arg" href="#NFUN">NFUN</a>, <a class="arg" href="#FUNSUB">FUNSUB</a>, <a class="arg" href="#ABSREQ">ABSREQ</a>, <a class="arg" href="#RELREQ">RELREQ</a>, <a class="arg" href="#LENWRK">LENWRK</a>, <a class="arg" href="#WRKSTR">WRKSTR</a>, <a class="arg" href="#FINEST">FINEST</a>, <a class="arg" href="#ABSEST">ABSEST</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NDIM, MINCLS, MAXCLS, NFUN, LENWRK, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A(NDIM), B(NDIM), ABSREQ, RELREQ, WRKSTR(LENWRK), FINEST(NFUN), ABSEST(NFUN)</td></tr><tr><td class="tdfspec1">EXTERNAL</td><td class="tdfspec2">FUNSUB</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D01EAF uses a globally adaptive method based on the algorithm described by  <a class="ref" href="#ref020">van Dooren and de Ridder (1976)</a> and <a class="ref" href="#ref021">Genz and Malik (1980)</a>.  It is implemented for integrals in the form:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>1</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>1</m:mn></m:msub></m:munderover><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mn>2</m:mn></m:msub><m:msub><m:mi>b</m:mi><m:mn>2</m:mn></m:msub></m:munderover><m:mo>&#8230;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:msub><m:mi>a</m:mi><m:mi>n</m:mi></m:msub><m:msub><m:mi>b</m:mi><m:mi>n</m:mi></m:msub></m:munderover><m:mfenced separators=""><m:msub><m:mi>f</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mi>m</m:mi></m:msub></m:mfenced><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mrow><m:mo>&#8230;</m:mo><m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>x</m:mi><m:mi>n</m:mi></m:msub></m:mfenced></m:math>, for  <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>m</m:mi></m:math>.</div><div class="paramtext">Upon entry, unless <a class="arg" href="#MINCLS">MINCLS</a> has been set to a value less than or equal to <m:math><m:mn>0</m:mn></m:math>, D01EAF divides the integration region into a number of subregions with randomly selected volumes.  Inside each subregion the integrals and their errors are estimated.  The initial number of subregions is chosen to be as large as possible without using more than <a class="arg" href="#MINCLS">MINCLS</a> calls to <a class="arg" href="#FUNSUB">FUNSUB</a>.  The results are stored in a partially ordered list (a heap).  The routine then proceeds in stages.  At each stage the subregion with the largest error (measured using the maximum norm) is halved along the co-ordinate axis where the integrands have largest absolute fourth differences.  The basic rule is applied to each half of this subregion and the results are stored in the list.  The results from the two halves are used to update the global integral and error estimates (<a class="arg" href="#FINEST">FINEST</a> and <a class="arg" href="#ABSEST">ABSEST</a>) and the routine continues unless <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSEST"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSEST</m:mi></m:maction></m:mfenced><m:mo>&#8804;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSREQ</m:mi></m:maction><m:mo>,</m:mo><m:mrow><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#FINEST"><m:mi mathcolor="#EE0000" mathvariant="bold">FINEST</m:mi></m:maction></m:mfenced><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#RELREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">RELREQ</m:mi></m:maction></m:mrow></m:mfenced></m:mrow></m:math>&#160;where the norm <m:math><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mo>.</m:mo></m:mfenced></m:math>&#160;is the maximum norm, or further subdivision would use more than <a class="arg" href="#MAXCLS">MAXCLS</a> calls to <a class="arg" href="#FUNSUB">FUNSUB</a>.  If at some stage there is insufficient working storage to keep the results for the next subdivision, the routine switches to a less efficient mode;  only if this mode of operation breaks down is insufficient storage reported.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref021" id="ref021"/>Genz A C and Malik A A (1980)  An Adaptive Algorithm for Numerical Integration over an N-dimensional Rectangular Region <i>J. Comput. Appl. Math.</i> <b>6</b> 295&#8211;302 </div>
<div class="paramtext"><a name="ref020" id="ref020"/>van Dooren P and de Ridder L (1976)  An adaptive algorithm for numerical integration over an N-dimensional cube <i>J. Comput. Appl. Math.</i> <b>2</b> 207&#8211;217 </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="NDIM" id="NDIM"/>1: &#160;&#160;&#8194; NDIM &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:mi>n</m:mi></m:math>, the number of dimensions of the integrals.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NDIM"><m:mi mathcolor="#EE0000" mathvariant="bold">NDIM</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="A" id="A"/>2: &#160;&#160;&#8194; A(<a class="arg" href="#NDIM">NDIM</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the lower limits of integration, <m:math><m:msub><m:mi>a</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="B" id="B"/>3: &#160;&#160;&#8194; B(<a class="arg" href="#NDIM">NDIM</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the upper limits of integration, <m:math><m:msub><m:mi>b</m:mi><m:mi>i</m:mi></m:msub></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="MINCLS" id="MINCLS"/>4: &#160;&#160;&#8194; MINCLS &#8211; INTEGER<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: must be set either to the minimum number of <a class="arg" href="#FUNSUB">FUNSUB</a> calls to be allowed, in which case <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0</m:mn></m:math>&#160;or to a negative value. In this case, the routine continues the calculation started in a previous call with the same integrands and integration limits: no parameters other than <a class="arg" href="#MINCLS">MINCLS</a>, <a class="arg" href="#MAXCLS">MAXCLS</a>, <a class="arg" href="#ABSREQ">ABSREQ</a>, <a class="arg" href="#RELREQ">RELREQ</a> or <a class="arg" href="#IFAIL">IFAIL</a> must be changed between the calls.</div>
<div class="paramtext"><i>On exit</i>: gives the number of <a class="arg" href="#FUNSUB">FUNSUB</a> calls actually used by D01EAF. For the continuation case (<m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>&#160;on entry) this is the number of new <a class="arg" href="#FUNSUB">FUNSUB</a> calls on the current call to D01EAF.</div></dd><dt class="paramhead"><a name="MAXCLS" id="MAXCLS"/>5: &#160;&#160;&#8194; MAXCLS &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the maximum number of <a class="arg" href="#FUNSUB">FUNSUB</a> calls to be allowed. In the continuation case this is the number of new <a class="arg" href="#FUNSUB">FUNSUB</a> calls to be allowed.</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCLS</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction></m:math>;</li>
<li class="listcons"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCLS</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mi>r</m:mi></m:math>;</li>
<li class="listcons"><m:math><m:mtext>where &#8203;</m:mtext><m:mi>r</m:mi><m:mo>=</m:mo><m:msup><m:mn>2</m:mn><m:mi>n</m:mi></m:msup><m:mo>+</m:mo><m:mn>2</m:mn><m:mo>&#8290;</m:mo><m:msup><m:mi>n</m:mi><m:mn>2</m:mn></m:msup><m:mo>+</m:mo><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>1</m:mn><m:mtext>, if &#8203;</m:mtext><m:mi>n</m:mi><m:mo>&lt;</m:mo><m:mn>11</m:mn><m:mtext>, or &#8203;</m:mtext><m:mi>r</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>n</m:mi><m:mfenced separators=""><m:mn>4</m:mn><m:mo>&#8290;</m:mo><m:msup><m:mi>n</m:mi><m:mn>2</m:mn></m:msup><m:mo>-</m:mo><m:mn>6</m:mn><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>14</m:mn></m:mfenced><m:mo>/</m:mo><m:mn>3</m:mn><m:mtext>, if &#8203;</m:mtext><m:mi>n</m:mi><m:mo>&#8805;</m:mo><m:mn>11</m:mn></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="NFUN" id="NFUN"/>6: &#160;&#160;&#8194; NFUN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: 

<m:math><m:mi>m</m:mi></m:math>, the number of integrands.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NFUN"><m:mi mathcolor="#EE0000" mathvariant="bold">NFUN</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="FUNSUB" id="FUNSUB"/>7: &#160;&#160;&#8194; FUNSUB &#8211; SUBROUTINE, supplied by the user.<span class="pclass">External Procedure</span></dt><dd><div class="paramtext"><a class="arg" href="#FUNSUB">FUNSUB</a> must evaluate the integrands <m:math><m:msub><m:mi>f</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;at a given point.</div><div class="subprog">
<div class="paramtext">The specification of <a class="arg" href="#FUNSUB">FUNSUB</a> is:</div><table class="fspec"><tr><td class="tdfspec1">SUBROUTINE&#160;FUNSUB&#160;(</td><td class="tdfspec2"><a class="arg" href="../D01/d01eaf.xml#FUNSUB_NDIM">NDIM</a>, <a class="arg" href="../D01/d01eaf.xml#FUNSUB_Z">Z</a>, <a class="arg" href="../D01/d01eaf.xml#FUNSUB_NFUN">NFUN</a>, <a class="arg" href="../D01/d01eaf.xml#FUNSUB_F">F</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">NDIM, NFUN</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">Z(NDIM), F(NFUN)</td></tr></table>
<dl><dt class="paramhead"><a name="FUNSUB_NDIM" id="FUNSUB_NDIM"/>1: &#160;&#160;&#8194; NDIM &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mi>n</m:mi></m:math>, the number of dimensions of the integrals.</div></dd><dt class="paramhead"><a name="FUNSUB_Z" id="FUNSUB_Z"/>2: &#160;&#160;&#8194; Z(<a class="arg" href="../D01/d01eaf.xml#FUNSUB_NDIM">NDIM</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the co-ordinates of the point at which the integrands must be evaluated.</div></dd><dt class="paramhead"><a name="FUNSUB_NFUN" id="FUNSUB_NFUN"/>3: &#160;&#160;&#8194; NFUN &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: <m:math><m:mi>m</m:mi></m:math>, the number of integrands.</div></dd><dt class="paramhead"><a name="FUNSUB_F" id="FUNSUB_F"/>4: &#160;&#160;&#8194; F(<a class="arg" href="../D01/d01eaf.xml#FUNSUB_NFUN">NFUN</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the value of the <m:math><m:mi>i</m:mi></m:math>th integrand at the given point.</div></dd></dl>
</div>
<div class="paramtext"><a class="arg" href="#FUNSUB">FUNSUB</a> must be declared as EXTERNAL in the (sub)program from which D01EAF is called. Parameters denoted as <span class="italic">Input</span>  must <b>not</b>  be changed by this procedure.</div>
</dd><dt class="paramhead"><a name="ABSREQ" id="ABSREQ"/>8: &#160;&#160;&#8194; ABSREQ &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the absolute accuracy required by you.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSREQ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0.0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="RELREQ" id="RELREQ"/>9: &#160;&#160;&#8194; RELREQ &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the relative accuracy required by you.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#RELREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">RELREQ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>0.0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="LENWRK" id="LENWRK"/>10: &#8194; LENWRK &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the dimension of the array <a class="arg" href="#WRKSTR">WRKSTR</a> as declared in the (sub)program from which D01EAF is called.</div>
<div class="paramtext"><i>Suggested value</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LENWRK"><m:mi mathcolor="#EE0000" mathvariant="bold">LENWRK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>6</m:mn><m:mi>n</m:mi><m:mo>+</m:mo><m:mn>9</m:mn><m:mi>m</m:mi><m:mo>+</m:mo><m:mfenced separators=""><m:mi>n</m:mi><m:mo>+</m:mo><m:mi>m</m:mi><m:mo>+</m:mo><m:mn>2</m:mn></m:mfenced><m:mfenced separators=""><m:mn>1</m:mn><m:mo>+</m:mo><m:mi>p</m:mi><m:mo>/</m:mo><m:mi>r</m:mi></m:mfenced></m:math>, where <m:math><m:mi>p</m:mi></m:math>&#160;is the value of <a class="arg" href="#MAXCLS">MAXCLS</a> and <m:math><m:mi>r</m:mi></m:math>&#160;is defined under <a class="arg" href="#MAXCLS">MAXCLS</a>. If <a class="arg" href="#LENWRK">LENWRK</a> is significantly smaller than this, the routine will not work as efficiently and may even fail.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LENWRK"><m:mi mathcolor="#EE0000" mathvariant="bold">LENWRK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>8</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NDIM"><m:mi mathcolor="#EE0000" mathvariant="bold">NDIM</m:mi></m:maction><m:mo>+</m:mo><m:mn>11</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NFUN"><m:mi mathcolor="#EE0000" mathvariant="bold">NFUN</m:mi></m:maction><m:mo>+</m:mo><m:mn>3</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="WRKSTR" id="WRKSTR"/>11: &#8194; WRKSTR(<a class="arg" href="#LENWRK">LENWRK</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Input/Output</span></dt><dd><div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#WRKSTR">WRKSTR</a> must be unchanged from the previous call of D01EAF.</div>
<div class="paramtext"><i>On exit</i>: contains information about the current subdivision which could be used in a continuation call.</div></dd><dt class="paramhead"><a name="FINEST" id="FINEST"/>12: &#8194; FINEST(<a class="arg" href="#NFUN">NFUN</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FINEST"><m:mi mathcolor="#EE0000" mathvariant="bold">FINEST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;specifies the best estimate obtained from the <m:math><m:mi>i</m:mi></m:math>th integral, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>m</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="ABSEST" id="ABSEST"/>13: &#8194; ABSEST(<a class="arg" href="#NFUN">NFUN</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSEST"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSEST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>&#160;specifies the estimated absolute accuracy of <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FINEST"><m:mi mathcolor="#EE0000" mathvariant="bold">FINEST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:math>, for <m:math><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>m</m:mi></m:math>.</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>14: &#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, because for this routine the values of the output parameters may be useful even if <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>&#8800;</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;on exit, the recommended value is <m:math><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></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>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="#MAXCLS">MAXCLS</a> was too small for D01EAF to obtain the required accuracy.  The arrays <a class="arg" href="#FINEST">FINEST</a> and <a class="arg" href="#ABSEST">ABSEST</a> respectively contain current estimates for the integrals and errors.</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"><a class="arg" href="#LENWRK">LENWRK</a> is too small for the routine to continue.  The arrays <a class="arg" href="#FINEST">FINEST</a> and <a class="arg" href="#ABSEST">ABSEST</a> respectively contain current estimates for the integrals and errors.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq3" id="IFeq3"/><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>3</m:mn></m:math></dt>
<dd>
<div class="paramtext">On a continuation call, <a class="arg" href="#MAXCLS">MAXCLS</a> was set too small to make any progress.  Increase <a class="arg" href="#MAXCLS">MAXCLS</a> before calling D01EAF again.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq4" id="IFeq4"/><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>4</m:mn></m:math></dt>
<dd>
<table class="ifail"><tr><td class="ifail1">On&#160;entry,</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NDIM"><m:mi mathcolor="#EE0000" mathvariant="bold">NDIM</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NFUN"><m:mi mathcolor="#EE0000" mathvariant="bold">NFUN</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>1</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCLS</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MAXCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MAXCLS</m:mi></m:maction><m:mo>&lt;</m:mo><m:mi>r</m:mi></m:math>&#160;(see <a class="arg" href="#MAXCLS">MAXCLS</a>),</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSREQ</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#RELREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">RELREQ</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>,</td></tr><tr><td class="ifail1">or</td><td class="ifail2-90"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LENWRK"><m:mi mathcolor="#EE0000" mathvariant="bold">LENWRK</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>8</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NDIM"><m:mi mathcolor="#EE0000" mathvariant="bold">NDIM</m:mi></m:maction><m:mo>+</m:mo><m:mn>11</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#NFUN"><m:mi mathcolor="#EE0000" mathvariant="bold">NFUN</m:mi></m:maction><m:mo>+</m:mo><m:mn>3</m:mn></m:math>.</td></tr></table>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">An absolute error estimate for each integrand is output in the array <a class="arg" href="#ABSEST">ABSEST</a>.  The routine exits with <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;if

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:munder><m:mi mathvariant="normal">max</m:mi><m:mi>i</m:mi></m:munder><m:mspace width="0.25em"/><m:mfenced separators=""><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSEST"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSEST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:mfenced><m:mo>&#8804;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#ABSREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">ABSREQ</m:mi></m:maction><m:mo>,</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#RELREQ"><m:mi mathcolor="#EE0000" mathvariant="bold">RELREQ</m:mi></m:maction><m:mo>&#215;</m:mo><m:munder><m:mi mathvariant="normal">max</m:mi><m:mi>i</m:mi></m:munder><m:mspace width="0.25em"/><m:mfenced open="|" close="|" separators=""><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#FINEST"><m:mi mathcolor="#EE0000" mathvariant="bold">FINEST</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>i</m:mi></m:mfenced></m:mrow></m:mfenced></m:mrow></m:mfenced></m:mrow><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div></div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">Usually the running time for D01EAF will be dominated by the time in <a class="arg" href="#FUNSUB">FUNSUB</a>, so the maximum time that could be used by D01EAF will be proportional to <a class="arg" href="#MAXCLS">MAXCLS</a> multiplied by the cost of a call to <a class="arg" href="#FUNSUB">FUNSUB</a>.</div><div class="paramtext">On a normal call, you should set <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;on entry.</div><div class="paramtext">For some integrands, particularly those that are poorly behaved in a small part of the integration region, D01EAF may terminate prematurely with values of <a class="arg" href="#ABSEST">ABSEST</a> that are significantly smaller than the actual absolute errors.  This behaviour should be suspected if the returned value of <a class="arg" href="#MINCLS">MINCLS</a> is small relative to the expected difficulty of the integrals.  When this occurs D01EAF should be called again, but with an entry value of <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mi>r</m:mi></m:math>,  (see specification of <a class="arg" href="#MAXCLS">MAXCLS</a>) and the results compared with those from the previous call.</div><div class="paramtext">If the routine is called with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#MINCLS"><m:mi mathcolor="#EE0000" mathvariant="bold">MINCLS</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn><m:mi>r</m:mi></m:math>,  the exact values of <a class="arg" href="#FINEST">FINEST</a> and <a class="arg" href="#ABSEST">ABSEST</a> on return will depend (within statistical limits) on the sequence of random numbers generated internally within D01EAF by calls to <a class="rout" href="../G05/g05saf.xml">G05SAF</a>.  Separate runs will produce identical answers unless the part of the program executed prior to calling D01EAF also calls (directly or indirectly)  routines from <a class="chap" href="../G05/g05conts.xml">Chapter G05</a>, and, in addition, the series of such calls differs between runs.</div><div class="paramtext">Because of moderate instability in the application of the basic integration rule, approximately the last <m:math><m:mn>1</m:mn><m:mo>+</m:mo><m:mrow><m:msub><m:mi mathvariant="normal">log</m:mi><m:mn>10</m:mn></m:msub><m:mfenced separators=""><m:msup><m:mi>n</m:mi><m:mn>3</m:mn></m:msup></m:mfenced></m:mrow></m:math>&#160;decimal digits may be inaccurate when using D01EAF for large values of <m:math><m:mi>n</m:mi></m:math>.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example computes

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mn>1</m:mn></m:munderover>
 <m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mn>1</m:mn></m:munderover>
 <m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mn>1</m:mn></m:munderover>
 <m:munderover><m:mo>&#8747;</m:mo><m:mn>0</m:mn><m:mn>1</m:mn></m:munderover>
 <m:mfenced separators=""><m:msub><m:mi>f</m:mi><m:mn>1</m:mn></m:msub><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mn>2</m:mn></m:msub><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:msub><m:mi>f</m:mi><m:mn>10</m:mn></m:msub></m:mfenced>
 <m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:mrow>
 <m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub></m:mrow>
 <m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow>
 <m:mrow><m:mi>d</m:mi><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub></m:mrow>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where, for <m:math><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mn>10</m:mn></m:math>, <m:math><m:msub><m:mi>f</m:mi><m:mi>j</m:mi></m:msub><m:mo>=</m:mo><m:mrow><m:mi>ln</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>+</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>+</m:mo><m:mn>3</m:mn><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub><m:mo>+</m:mo><m:mn>4</m:mn><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:mfenced></m:mrow><m:mrow><m:mi>sin</m:mi><m:mfenced separators=""><m:mi>j</m:mi><m:mo>+</m:mo><m:msub><m:mi>x</m:mi><m:mn>1</m:mn></m:msub><m:mo>+</m:mo><m:mn>2</m:mn><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub><m:mo>+</m:mo><m:mn>3</m:mn><m:msub><m:mi>x</m:mi><m:mn>3</m:mn></m:msub><m:mo>+</m:mo><m:mn>4</m:mn><m:msub><m:mi>x</m:mi><m:mn>4</m:mn></m:msub></m:mfenced></m:mrow></m:math>.  The program is intended to show how to exploit the continuation facility provided with D01EAF: the routine exits with  <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="#IFeq1"><m:mn mathcolor="#003399" mathvariant="bold">1</m:mn></m:maction></m:math>&#160;(printing an explanatory error message) and is re-entered with <a class="arg" href="#MAXCLS">MAXCLS</a> reset to a larger value.  The program can be used with any values of <a class="arg" href="#NDIM">NDIM</a> and <a class="arg" href="#NFUN">NFUN</a>, except that the expression for <m:math><m:mi>r</m:mi></m:math>&#160;must be changed if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#NDIM"><m:mi mathcolor="#EE0000" mathvariant="bold">NDIM</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>10</m:mn></m:math>&#160;(see specification of <a class="arg" href="#MAXCLS">MAXCLS</a>).</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/d01eafe.f">Program Text (d01eafe.f)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<div class="paramtext">None.</div><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/d01eafe.r">Program Results (d01eafe.r)</a></p><div class="figure"><a name="d01eaf1-plot" id="d01eaf1-plot"/><img src="../figures/d01eaf1-plot.png" alt="Example Program Plot for d01eaf1-plot"/></div><div class="figure"><a name="d01eaf2-plot" id="d01eaf2-plot"/><img src="../figures/d01eaf2-plot.png" alt="Example Program Plot for d01eaf2-plot"/></div>
<hr/><div><a class="rout" href="../../pdf/D01/d01eaf.pdf">D01EAF (PDF version)</a></div><div><a class="chap" href="d01conts.xml">D01 Chapter Contents</a></div><div><a class="chapint" href="d01intro.xml">D01 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>
