<?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>D01BCF : 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/d01bcf.pdf">D01BCF (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/>D01BCF</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">D01BCF returns the weights (normal or adjusted) and abscissae for a Gaussian integration rule with a specified number of abscissae.  Six different types of Gauss rule are allowed.</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;D01BCF&#160;(</td><td class="tdfspec2"><a class="arg" href="#ITYPE">ITYPE</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#C">C</a>, <a class="arg" href="#D">D</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#WEIGHT">WEIGHT</a>, <a class="arg" href="#ABSCIS">ABSCIS</a>, <a class="arg" href="#IFAIL">IFAIL</a>)</td></tr><tr><td class="tdfspec1">INTEGER</td><td class="tdfspec2">ITYPE, N, IFAIL</td></tr><tr><td class="tdfspec1"><b><i>double&#160;precision</i></b></td><td class="tdfspec2">A, B, C, D, WEIGHT(N), ABSCIS(N)</td></tr></table><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">D01BCF returns the weights <m:math><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;and abscissae  <m:math><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:math>&#160;for use in the summation

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>=</m:mo><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn></m:mrow><m:mi>n</m:mi></m:munderover><m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:mi>f</m:mi><m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mfenced>
</m:math></td><td class="formula2"/></tr></table></div>

which approximates a definite integral (see <a class="ref" href="#ref201">Davis and Rabinowitz (1975)</a> or <a class="ref" href="#ref019">Stroud and Secrest (1966)</a>).  The following types are provided:
<table class="standard-100"><tr>
<td style="width:2.1em;" valign="baseline">(a)</td>
<td valign="top">Gauss&#8211;Legendre

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div><span class="italic">Constraint:</span>
<m:math><m:mi>b</m:mi><m:mo>&gt;</m:mo><m:mi>a</m:mi></m:math>.</td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(b)</td>
<td valign="top">Gauss&#8211;Jacobi
 <div class="paramtext">normal weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover><m:msup><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>d</m:mi></m:msup><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

adjusted weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msup><m:mfenced separators=""><m:mi>b</m:mi><m:mo>-</m:mo><m:mi>x</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>d</m:mi></m:msup> <m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div><span class="italic">Constraint:</span>
<m:math><m:mi>c</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mi>d</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mi>b</m:mi><m:mo>&gt;</m:mo><m:mi>a</m:mi></m:math>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(c)</td>
<td valign="top">Gauss&#8211;Exponential
 <div class="paramtext">normal weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>&#8771;</m:mo> 
 <m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover> 
 <m:msup>
  <m:mfenced open="|" close="|" separators="">
   <m:mi>x</m:mi><m:mo>-</m:mo> 
   <m:mfrac>
    <m:mrow><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mrow>
    <m:mn>2</m:mn>
   </m:mfrac>
  </m:mfenced>
 <m:mi>c</m:mi>
</m:msup><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

adjusted weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi> <m:mo>&#8771;</m:mo>
 <m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>b</m:mi></m:munderover> 
 <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced> <m:mo>=</m:mo>
 <m:msup>
  <m:mfenced open="|" close="|" separators="">
   <m:mi>x</m:mi><m:mo>-</m:mo><m:mfrac><m:mrow><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mrow><m:mn>2</m:mn></m:mfrac>
  </m:mfenced>
  <m:mi>c</m:mi>
 </m:msup> 
 <m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mrow></m:msub>
 <m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div><span class="italic">Constraint:</span>
<m:math><m:mi>c</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mi>b</m:mi><m:mo>&gt;</m:mo><m:mi>a</m:mi></m:math>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(d)</td>
<td valign="top">Gauss&#8211;Laguerre
 <div class="paramtext">normal weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="left">
 <m:mtr>
  <m:mtd><m:mi>S</m:mi></m:mtd>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:munderover><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>b</m:mi><m:mi>x</m:mi></m:mrow></m:msup><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:mi>b</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:mfenced><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd/>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mi>a</m:mi></m:munderover><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>b</m:mi><m:mi>x</m:mi></m:mrow></m:msup><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:mi>b</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:mfenced><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>,</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

adjusted weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="left">
 <m:mtr>
  <m:mtd><m:mi>S</m:mi></m:mtd>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced> <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext> <m:mfenced separators=""><m:mi>b</m:mi><m:mo>&gt;</m:mo> <m:mn>0</m:mn></m:mfenced><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd/>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mi>a</m:mi></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced> <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext> <m:mfenced separators=""><m:mi>b</m:mi><m:mo>&lt;</m:mo> <m:mn>0</m:mn></m:mfenced><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>b</m:mi><m:mi>x</m:mi></m:mrow></m:msup><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>.</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div><span class="italic">Constraint:</span>
<m:math><m:mi>c</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mi>b</m:mi><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(e)</td>
<td valign="top">Gauss&#8211;Hermite
 <div class="paramtext">normal weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow>
  <m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:munderover><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>b</m:mi><m:msup>
<m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced>
<m:mn>2</m:mn></m:msup></m:mrow></m:msup><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

adjusted weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mi>S</m:mi><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow>
  <m:mrow><m:mo>+</m:mo><m:mi>&#8734;</m:mi></m:mrow></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup> <m:msup><m:mi>e</m:mi><m:mrow><m:mo>-</m:mo><m:mi>b</m:mi><m:msup>
<m:mfenced separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced>
<m:mn>2</m:mn></m:msup></m:mrow></m:msup> <m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mtext>.</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div><span class="italic">Constraint:</span>
<m:math><m:mi>c</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mi>b</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.</div></td>
</tr><tr>
<td style="width:2.1em;" valign="baseline">(f)</td>
<td valign="top">Gauss&#8211;Rational
 <div class="paramtext">normal weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="left">
 <m:mtr>
  <m:mtd><m:mi>S</m:mi></m:mtd>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:munderover><m:mfrac><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mfenced><m:mi>d</m:mi></m:msup></m:mfrac><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:mfenced><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd/>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mi>a</m:mi></m:munderover><m:mfrac><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mfenced><m:mi>d</m:mi></m:msup></m:mfrac><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext><m:mfenced separators=""><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:mfenced><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub>
<m:mfenced separators=""><m:mfrac><m:mn>1</m:mn><m:mrow><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mrow>
 </m:mfrac></m:mfenced>
<m:mtext>,</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div>

adjusted weights:

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:mtable columnalign="left">
 <m:mtr>
  <m:mtd><m:mi>S</m:mi></m:mtd>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mi>a</m:mi><m:mi>&#8734;</m:mi></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced> <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext> <m:mfenced separators=""><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi><m:mo>&gt;</m:mo> <m:mn>0</m:mn></m:mfenced><m:mtext>,</m:mtext></m:mtd>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd/>
 </m:mtr><m:mtr>
  <m:mtd/>
  <m:mtd><m:mo>&#8771;</m:mo><m:munderover><m:mo>&#8747;</m:mo><m:mrow><m:mo>-</m:mo><m:mi>&#8734;</m:mi></m:mrow><m:mi>a</m:mi></m:munderover> <m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced> <m:mrow><m:mi>d</m:mi><m:mi>x</m:mi></m:mrow><m:mtext>&#8195;</m:mtext> <m:mfenced separators=""><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi><m:mo>&lt;</m:mo> <m:mn>0</m:mn></m:mfenced><m:mtext>, &#8195; exact for &#8203;</m:mtext><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced><m:mo>=</m:mo><m:mfrac><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>-</m:mo><m:mi>a</m:mi></m:mfenced><m:mi>c</m:mi></m:msup><m:msup><m:mfenced open="|" close="|" separators=""><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mfenced><m:mi>d</m:mi></m:msup></m:mfrac> <m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo> <m:mn>1</m:mn></m:mrow></m:msub>
<m:mfenced separators=""><m:mfrac><m:mn>1</m:mn><m:mrow><m:mi>x</m:mi><m:mo>+</m:mo><m:mi>b</m:mi></m:mrow>
 </m:mfrac></m:mfenced>
<m:mtext>.</m:mtext></m:mtd>
 </m:mtr>
</m:mtable>
</m:math></td><td class="formula2"/></tr></table></div><span class="italic">Constraint:</span>
<m:math><m:mi>c</m:mi><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <m:math><m:mi>d</m:mi><m:mo>&gt;</m:mo><m:mi>c</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:math>,  <m:math><m:mi>a</m:mi><m:mo>+</m:mo><m:mi>b</m:mi><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>.</div></td>
</tr></table>
</div><div class="paramtext">In the above formulae, <m:math><m:msub><m:mi>P</m:mi><m:mrow><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:msub><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;stands for any polynomial of degree <m:math><m:mn>2</m:mn><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:math>&#160;or less in <m:math><m:mi>x</m:mi></m:math>.</div><div class="paramtext">The method used to calculate the abscissae involves finding the eigenvalues of the appropriate tridiagonal matrix (see <a class="ref" href="#ref272">Golub and Welsch (1969)</a>).  The weights are then determined by the formula

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
<m:msub><m:mi>w</m:mi><m:mi>i</m:mi></m:msub><m:mo>=</m:mo><m:msup>
<m:mfenced open="{" close="}" separators=""><m:munderover><m:mo>&#8721;</m:mo><m:mrow><m:mi>j</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow>
  <m:mrow><m:mi>n</m:mi><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:munderover><m:msubsup><m:mi>P</m:mi><m:mi>j</m:mi><m:mo>*</m:mo></m:msubsup><m:msup>
<m:mfenced separators=""><m:msub><m:mi>x</m:mi><m:mi>i</m:mi></m:msub></m:mfenced>
<m:mn>2</m:mn></m:msup></m:mfenced>
<m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow>
</m:msup>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:msubsup><m:mi>P</m:mi><m:mi>j</m:mi><m:mo>*</m:mo></m:msubsup><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is the <m:math><m:mi>j</m:mi></m:math>th orthogonal polynomial with respect to the weight function over the appropriate interval.</div><div class="paramtext">The weights and abscissae produced by D01BCF may be passed to  <a class="rout" href="../D01/d01fbf.xml">D01FBF</a>, which will evaluate the summations in one or more dimensions.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref201" id="ref201"/>Davis P J and Rabinowitz P (1975)  <i>Methods of Numerical Integration</i> Academic Press </div>
<div class="paramtext"><a name="ref272" id="ref272"/>Golub G H and Welsch J H (1969)  Calculation of Gauss quadrature rules <i>Math. Comput.</i> <b>23</b> 221&#8211;230 </div>
<div class="paramtext"><a name="ref019" id="ref019"/>Stroud A H and Secrest D (1966)  <i>Gaussian Quadrature Formulas</i> Prentice&#8211;Hall </div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="ITYPE" id="ITYPE"/>1: &#160;&#160;&#8194; ITYPE &#8211; INTEGER<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: indicates the type of quadrature rule. 

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Gauss&#8211;Legendre.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>Gauss&#8211;Jacobi.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>Gauss&#8211;Exponential.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Gauss&#8211;Laguerre.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>Gauss&#8211;Hermite.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>Gauss&#8211;Rational.</dd></dl>
<div class="paramtext">The above values give the normal weights; the adjusted weights are obtained if the value of <a class="arg" href="#ITYPE">ITYPE</a> above is negated.</div>
</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>5</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="A" id="A"/>2: &#160;&#160;&#8194; A &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="B" id="B"/>3: &#160;&#160;&#8194; B &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="C" id="C"/>4: &#160;&#160;&#8194; C &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dt class="multi-paramhead"><a name="D" id="D"/>5: &#160;&#160;&#8194; D &#8211; <span class="bitalic">double precision</span><span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the parameters <m:math><m:mi>a</m:mi></m:math>, <m:math><m:mi>b</m:mi></m:math>, <m:math><m:mi>c</m:mi></m:math>&#160;and <m:math><m:mi>d</m:mi></m:math>&#160;which occur in the quadrature formulae. <a class="arg" href="#C">C</a> is not used if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>; <a class="arg" href="#D">D</a> is not used unless <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>1</m:mn></m:math>&#160;or <m:math><m:mtext/><m:mo>&#177;</m:mo><m:mn>5</m:mn></m:math>. For some rules <a class="arg" href="#C">C</a> and <a class="arg" href="#D">D</a> must not be too large (See <a class="sec" href="#errors">Section 6</a>.)</div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/><ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#D"><m:mi mathcolor="#EE0000" mathvariant="bold">D</m:mi></m:maction><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>2</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>3</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>4</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>5</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0</m:mn></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&gt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#D"><m:mi mathcolor="#EE0000" mathvariant="bold">D</m:mi></m:maction><m:mo>&gt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>+</m:mo><m:mn>1</m:mn></m:math>.</li>
</ul></div></dd><dt class="paramhead"><a name="N" id="N"/>6: &#160;&#160;&#8194; N &#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 weights and abscissae to be returned. If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>2</m:mn></m:mrow></m:math>&#160;or <m:math><m:mrow><m:mo>-</m:mo><m:mn>4</m:mn></m:mrow></m:math>&#160;and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0.0</m:mn></m:math>, an odd value of <a class="arg" href="#N">N</a> may raise problems (see <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="#IFeq6"><m:mn mathcolor="#003399" mathvariant="bold">6</m:mn></m:maction></m:math>).</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0</m:mn></m:math>.
</div></dd><dt class="paramhead"><a name="WEIGHT" id="WEIGHT"/>7: &#160;&#160;&#8194; WEIGHT(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the <a class="arg" href="#N">N</a> weights.</div></dd><dt class="paramhead"><a name="ABSCIS" id="ABSCIS"/>8: &#160;&#160;&#8194; ABSCIS(<a class="arg" href="#N">N</a>) &#8211; <span class="bitalic">double precision</span> array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: the <a class="arg" href="#N">N</a> abscissae.</div></dd><dt class="paramhead"><a name="IFAIL" id="IFAIL"/>9: &#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">The algorithm for computing eigenvalues of a tridiagonal matrix has failed to obtain convergence.  If the soft fail option is used, the values of the weights and abscissae on return are indeterminate.</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>
<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="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</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="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>&lt;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>5</m:mn></m:mrow></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="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>5</m:mn></m:math>.</td></tr></table>
<div class="paramtext">If the soft fail option is used, weights and abscissae are returned as zero.</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"><a class="arg" href="#A">A</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#C">C</a> or <a class="arg" href="#D">D</a> is not in the allowed range:
<ul class="listind"><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1.0</m:mn></m:mrow></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#D"><m:mi mathcolor="#EE0000" mathvariant="bold">D</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1.0</m:mn></m:mrow></m:math>&#160;or  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#D"><m:mi mathcolor="#EE0000" mathvariant="bold">D</m:mi></m:maction><m:mo>+</m:mo><m:mn>2.0</m:mn><m:mo>&gt;</m:mo><m:mi mathvariant="italic">gmax</m:mi></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>2</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1.0</m:mn></m:mrow></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>3</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1.0</m:mn></m:mrow></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>+</m:mo><m:mn>1.0</m:mn><m:mo>&gt;</m:mo><m:mi mathvariant="italic">gmax</m:mi></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>4</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>0.0</m:mn></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1.0</m:mn></m:mrow></m:math>&#160;or <m:math><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>+</m:mo><m:mn>1.0</m:mn><m:mo>/</m:mo><m:mn>2.0</m:mn></m:mfenced><m:mo>&gt;</m:mo><m:mi mathvariant="italic">gmax</m:mi></m:math>;</li><li class="listind">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#ITYPE"><m:mi mathcolor="#EE0000" mathvariant="bold">ITYPE</m:mi></m:maction><m:mo>=</m:mo><m:mo>&#177;</m:mo><m:mn>5</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#A"><m:mi mathcolor="#EE0000" mathvariant="bold">A</m:mi></m:maction><m:mo>+</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#B"><m:mi mathcolor="#EE0000" mathvariant="bold">B</m:mi></m:maction><m:mo>=</m:mo><m:mn>0.0</m:mn></m:math>&#160;or  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1.0</m:mn></m:mrow></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#D"><m:mi mathcolor="#EE0000" mathvariant="bold">D</m:mi></m:maction><m:mo>&#8804;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>+</m:mo><m:mn>1.0</m:mn></m:math>.</li></ul>
</div>
<div class="paramtext">Here <m:math><m:mi mathvariant="italic">gmax</m:mi></m:math>&#160;is the (machine-dependent) largest integer value such that <m:math><m:mi>&#915;</m:mi><m:mfenced separators=""><m:mi mathvariant="italic">gmax</m:mi></m:mfenced></m:math>&#160;can be computed without overflow (see the <a class="url" href="http://www.nag.co.uk/doc/inun/fl22.html">Users' Note</a> for your implementation  for <a class="rout" href="../S/s14aaf.xml">S14AAF</a>).</div>
<div class="paramtext">If the soft fail option is used, weights and abscissae are returned as zero.</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>
<div class="paramtext">One or more of the weights are larger than <m:math><m:mi mathvariant="italic">rmax</m:mi></m:math>, the largest floating-point number on this machine. <m:math><m:mi mathvariant="italic">rmax</m:mi></m:math>&#160;is given by the function <a class="rout" href="../X02/x02alf.xml">X02ALF</a>.  If the soft fail option is used, the overflowing weights are returned as <m:math><m:mi mathvariant="italic">rmax</m:mi></m:math>.  Possible solutions are to use a smaller value of <a class="arg" href="#N">N</a>; or, if using adjusted weights, to change to normal weights.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq5" id="IFeq5"/><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>5</m:mn></m:math></dt>
<dd>
<div class="paramtext">One or more of the weights are too small to be distinguished from zero on this machine.  If the soft fail option is used, the underflowing weights are returned as zero, which may be a usable approximation.  Possible solutions are to use a smaller value of <a class="arg" href="#N">N</a>; or, if using normal weights, to change to adjusted weights.</div>
</dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="IFeq6" id="IFeq6"/><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>6</m:mn></m:math></dt>
<dd>
<div class="paramtext">Gauss&#8211;Exponential or Gauss&#8211;Hermite adjusted weights with <a class="arg" href="#N">N</a> odd and <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mn>0.0</m:mn></m:math>.  Theoretically, in these cases:
<ul class="listind"><li class="listind">for <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&gt;</m:mo><m:mn>0.0</m:mn></m:math>, the central adjusted weight is infinite, and the exact function <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is zero at the central abscissa.</li><li class="listind">for <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#C"><m:mi mathcolor="#EE0000" mathvariant="bold">C</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0.0</m:mn></m:math>, the central adjusted weight is zero, and the exact function <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is infinite at the central abscissa.</li></ul>
</div>
<div class="paramtext">In either case, the contribution of the central abscissa to the summation is indeterminate.</div>
<div class="paramtext">In practice, the central weight may not have overflowed or underflowed, if there is sufficient rounding error in the value of the central abscissa.</div>
<div class="paramtext">If the soft fail option is used, the weights and abscissa returned may be usable; you must be particularly careful not to &#8216;round&#8217; the central abscissa to its true value without simultaneously &#8216;rounding&#8217; the central weight to zero or <m:math><m:mi>&#8734;</m:mi></m:math>&#160;as appropriate, or the summation will suffer.  It would be preferable to use normal weights, if possible.</div>
<div class="paramtext"><b>Note:</b>&#160; remember that, when switching from normal weights to adjusted weights or vice versa, redefinition of <m:math><m:mi>f</m:mi><m:mfenced separators=""><m:mi>x</m:mi></m:mfenced></m:math>&#160;is involved.</div>
</dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">The accuracy depends mainly on <m:math><m:mi>n</m:mi></m:math>, with increasing loss of accuracy for larger values of <m:math><m:mi>n</m:mi></m:math>.  Typically, one or two decimal digits may be lost from machine accuracy with <m:math><m:mi>n</m:mi><m:mo>&#8771;</m:mo><m:mn>20</m:mn></m:math>,  and three or four decimal digits may be lost for <m:math><m:mi>n</m:mi><m:mo>&#8771;</m:mo><m:mn>100</m:mn></m:math>.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">The major portion of the time is taken up during the calculation of the eigenvalues of the appropriate tridiagonal matrix, where the time is roughly proportional to <m:math><m:msup><m:mi>n</m:mi><m:mn>3</m:mn></m:msup></m:math>.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example returns the abscissae and (adjusted) weights for the seven-point Gauss&#8211;Laguerre formula.</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/d01bcfe.f">Program Text (d01bcfe.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/d01bcfe.r">Program Results (d01bcfe.r)</a></p><div class="figure"><a name="d01bcf-plot" id="d01bcf-plot"/><img src="../figures/d01bcf-plot.png" alt="Example Program Plot for d01bcf-plot"/></div>
<hr/><div><a class="rout" href="../../pdf/D01/d01bcf.pdf">D01BCF (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>
