
<?xml-stylesheet type="text/xsl" href="../styles/pmathml.xsl"?>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:dsi="http://www.w3.org/1999/xlink" xml:space="preserve"><head><title>
  NAG C Library, Mark 7 : 
  f07gdc</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 href="../../pdf/F07/f07gdc.pdf">f07gdc (pdf version)</a></div><div><a href="f07_conts.xml">Chapter Contents</a></div><div><a href="f07_intro.xml">Chapter Introduction</a></div>
<div><a href="../mark7.xml">NAG C Library Contents</a></div><hr/><h1 class="libdoc">NAG C Library Function Document<br/><br/>nag_dpptrf (f07gdc)</h1>


<div class="htmltoc">
<h2><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">&#160;1&#160;<b>Purpose</b></a>
<div class="htmltocitem" id="tocpurpose"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#specification">&#160;2&#160;<b>Specification</b></a>
<div class="htmltocitem" id="tocspecification"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#description">&#160;3&#160;<b>Description</b></a>
<div class="htmltocitem" id="tocdescription"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#references">&#160;4&#160;<b>References</b></a>
<div class="htmltocitem" id="tocreferences"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#parameters">&#160;5&#160;<b>Parameters</b></a>
<div class="htmltocitem" id="tocparameters"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#errors">&#160;6&#160;<b>Error Indicators and Warnings</b></a>
<div class="htmltocitem" id="tocerrors"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#accuracy">&#160;7&#160;<b>Accuracy</b></a>
<div class="htmltocitem" id="tocaccuracy"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#fcomments">&#160;8&#160;<b>Further Comments</b></a>
<div class="htmltocitem" id="tocfcomments"/>
</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">&#160;9&#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">&#160;9.1&#160;<b>Program Text</b></a>
<div class="htmltocitem" id="tocexamtext"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examdata">&#160;9.2&#160;<b>Program Data</b></a>
<div class="htmltocitem" id="tocexamdata"/>
</div>

<div class="htmltoc">
<span class="htmltocplus">&#160;&#160;&#160;</span>
<a class="htmltoc" href="#examresults">&#160;9.3&#160;<b>Program Results</b></a>
<div class="htmltocitem" id="tocexamresults"/>
</div>
</div>
</div>
</div>
</div>




<h2><a name="purpose" id="purpose"/>1&#160;&#160;Purpose</h2>

<div class="paramtext">nag_dpptrf (f07gdc) computes the  Cholesky factorization of a real symmetric positive-definite matrix,  using packed storage.</div>





<h2><a name="specification" id="specification"/>2&#160;&#160;Specification</h2>


<table class="cspec">
<tr><td class="tdcspec" colspan="2">#include &lt;nag.h&gt;<br/>
#include &lt;nagf07.h&gt;<br/><br/></td></tr>
<tr><td class="tdcspec">
void&#160;nag_dpptrf</td><td class="tdcspec">(Nag_OrderType&#160;<a class="argref" href="#order">order</a>, Nag_UploType&#160;<a class="argref" href="#uplo">uplo</a>, Integer&#160;<a class="argref" href="#n">n</a>, double&#160;<a class="argref" href="#ap">ap</a>[], NagError&#160;*<a class="argref" href="#fail">fail</a>)

   
</td></tr>
</table>





<h2><a name="description" id="description"/>3&#160;&#160;Description</h2>

<div class="paramtext">nag_dpptrf (f07gdc) forms the Cholesky factorization of a real symmetric positive-definite matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;either as <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>=</mo><msup><mi>U</mi><mi mathvariant="italic">T</mi></msup><mi>U</mi></math>&#160; if <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Upper</b>, or <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>=</mo><mi>L</mi><msup><mi>L</mi><mi mathvariant="italic">T</mi></msup></math>&#160;if <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Lower</b>, where <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>U</mi></math>&#160;is an upper triangular  matrix and <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>L</mi></math>&#160;is lower triangular, using packed storage.</div>





<h2><a name="references" id="references"/>4&#160;&#160;References</h2>

<div class="paramtext">
<p><a name="ref121" id="ref121"/>Demmel J W (1989) On floating-point errors in Cholesky <i>LAPACK Working Note No. 14</i> University of Tennessee, Knoxville </p>
<p><a name="ref105" id="ref105"/>Golub G H and Van Loan C F (1996) <i>Matrix Computations</i> (3rd Edition) Johns Hopkins University Press, Baltimore </p>
</div>





<h2><a name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>


<dl><dt class="paramhead"><a name="order" id="order"/>1:
 &#160;&#160;&#8194;
 <b>order</b> &#8211; Nag_OrderType<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the 
  <a class="argref" href="#order">order</a>
  parameter specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by 
  <a class="argref" href="#order">order</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_RowMajor</b>. 
  See Section <a class="secref" href="../genint/essint.xml#usingarrayrefs">2.2.1.4</a> of the Essential Introduction for a more detailed explanation of the use of this parameter.</div>
<div class="paramtext"><i>Constraint</i>:
  <a class="argref" href="#order">order</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_RowMajor</b> 
  or <b>Nag_ColMajor</b>.</div>
</dd><dt class="paramhead"><a name="uplo" id="uplo"/>2:
 &#160;&#160;&#8194;
 <b>uplo</b> &#8211; Nag_UploType&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: indicates whether the upper or lower triangular part of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is stored and how <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is factorized, as follows:
<ul class="listind"><li class="listind">if <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Upper</b>, the upper triangular part of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is stored and <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is factorized as <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>U</mi><mi mathvariant="italic">T</mi></msup><mi>U</mi></math>, where <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>U</mi></math>&#160;is upper triangular;</li><li class="listind">if <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Lower</b>, the lower triangular part of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is stored and <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is factorized as <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>L</mi><msup><mi>L</mi><mi mathvariant="italic">T</mi></msup></math>, where <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>L</mi></math>&#160;is lower triangular.</li></ul>
</div>

<div class="paramtext"><i>Constraint</i>:
  <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Upper</b> or <b>Nag_Lower</b>.</div>

</dd><dt class="paramhead"><a name="n" id="n"/>3:
 &#160;&#160;&#8194;
 <b>n</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi></math>, the order of the matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>.</div>

<div class="paramtext"><i>Constraint</i>:
  <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#n" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">n</mi></maction><mo>&#8805;</mo><mn>0</mn></math>.</div>

</dd><dt class="paramhead"><a name="ap" id="ap"/>4:
 &#160;&#160;&#8194;
 <b>ap</b>[<math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="italic">dim</mi></math>] &#8211; double&#160;<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b>  
  the dimension, <span class="italic">dim</span>, of the array <a class="argref" href="#ap">ap</a> must be at least <math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mi>max</mi><mo>&#8289;</mo><mfenced separators=""><mn>1</mn><mo>,</mo><maction actiontype="link" dsi:href="#n" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">n</mi></maction><mo>&#215;</mo><mfenced separators=""><maction actiontype="link" dsi:href="#n" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">n</mi></maction><mo>+</mo><mn>1</mn></mfenced><mo>/</mo><mn>2</mn></mfenced></mrow></math>.</div><div class="paramtext"><i>On entry</i>: the symmetric positive-definite matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>, packed by rows or columns. The storage of elements <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mi>a</mi></mrow><mrow><mi>i</mi><mi>j</mi></mrow></msub></math>&#160;depends on the 
<a class="argref" href="#order">order</a> and <a class="argref" href="#uplo">uplo</a>
parameters as follows:
 
<ul><li class="listhanging">if 
<a class="argref" href="#order">order</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_ColMajor</b> 
and 
<a class="argref" href="#uplo">uplo</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Upper</b>,
<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mi>a</mi></mrow><mrow><mi>i</mi><mi>j</mi></mrow></msub></math>&#160;is stored in 
<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><maction actiontype="link" dsi:href="#ap" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">ap</mi></maction><mfenced open="[" close="]"><mrow><mfenced separators=""><mi>j</mi><mo>-</mo><mn>1</mn></mfenced><mo>&#215;</mo><mi>j</mi><mo>/</mo><mn>2</mn><mo>+</mo><mi>i</mi><mo>-</mo><mn>1</mn></mrow></mfenced></mrow></math>, 
for <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>i</mi><mo>&#8804;</mo><mi>j</mi></math>;</li><li class="listhanging">if 
<a class="argref" href="#order">order</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_ColMajor</b> 
and 
<a class="argref" href="#uplo">uplo</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Lower</b>,
<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mi>a</mi></mrow><mrow><mi>i</mi><mi>j</mi></mrow></msub></math>&#160;is stored in 
<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><maction actiontype="link" dsi:href="#ap" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">ap</mi></maction><mfenced open="[" close="]"><mrow><mfenced separators=""><mn>2</mn><mi>n</mi><mo>-</mo><mi>j</mi></mfenced><mo>&#215;</mo><mfenced separators=""><mi>j</mi><mo>-</mo><mn>1</mn></mfenced><mo>/</mo><mn>2</mn><mo>+</mo><mi>i</mi><mo>-</mo><mn>1</mn></mrow></mfenced></mrow></math>, 
for <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>i</mi><mo>&#8805;</mo><mi>j</mi></math>;</li><li class="listhanging">if 
<a class="argref" href="#order">order</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_RowMajor</b> 
and 
<a class="argref" href="#uplo">uplo</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Upper</b>,
<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mi>a</mi></mrow><mrow><mi>i</mi><mi>j</mi></mrow></msub></math>&#160;is stored in 
<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><maction actiontype="link" dsi:href="#ap" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">ap</mi></maction><mfenced open="[" close="]"><mrow><mfenced separators=""><mn>2</mn><mi>n</mi><mo>-</mo><mi>i</mi></mfenced><mo>&#215;</mo><mfenced separators=""><mi>i</mi><mo>-</mo><mn>1</mn></mfenced><mo>/</mo><mn>2</mn><mo>+</mo><mi>j</mi><mo>-</mo><mn>1</mn></mrow></mfenced></mrow></math>,
 for <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>i</mi><mo>&#8804;</mo><mi>j</mi></math>;</li><li class="listhanging">if 
<a class="argref" href="#order">order</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_RowMajor</b> 
and 
<a class="argref" href="#uplo">uplo</a>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Lower</b>,
<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
 <math xmlns="http://www.w3.org/1998/Math/MathML"><msub><mrow><mi>a</mi></mrow><mrow><mi>i</mi><mi>j</mi></mrow></msub></math>&#160;is stored in 
<math xmlns="http://www.w3.org/1998/Math/MathML"><mrow><maction actiontype="link" dsi:href="#ap" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">ap</mi></maction><mfenced open="[" close="]"><mrow><mfenced separators=""><mi>i</mi><mo>-</mo><mn>1</mn></mfenced><mo>&#215;</mo><mi>i</mi><mo>/</mo><mn>2</mn><mo>+</mo><mi>j</mi><mo>-</mo><mn>1</mn></mrow></mfenced></mrow></math>,
 for <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>i</mi><mo>&#8805;</mo><mi>j</mi></math>.</li></ul>
</div><div class="paramtext"><i>On exit</i>: the upper or lower triangle of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is overwritten by the Cholesky factor <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>U</mi></math>&#160;or <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>L</mi></math>&#160;as specified by <a class="argref" href="#uplo">uplo</a>, using the same packed storage format as described above.</div></dd><dt class="paramhead"><a name="fail" id="fail"/>5:
 &#160;&#160;&#8194;
 <b>fail</b> &#8211; NagError&#160;*<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext">The NAG error parameter (see the <a class="secref" href="../genint/essint.xml">Essential Introduction</a>).</div>
</dd></dl>





<h2><a name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
 

<dl>



<dt class="errorhead"><a name="NE_INT" id="NE_INT"/><b>NE_INT</b></dt>
<dd style="margin-top: .2em;">
<div class="paramtext">On entry, <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#n" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">n</mi></maction><mo>=</mo><mfenced open="&#9001;" close="&#9002;" separators=""><mtext mathvariant="italic">value</mtext></mfenced></math>.<br/>
Constraint: <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#n" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">n</mi></maction><mo>&#8805;</mo><mn>0</mn></math>.</div>
</dd>



<dt class="errorhead"><a name="NE_POS_DEF" id="NE_POS_DEF"/><b>NE_POS_DEF</b></dt>
<dd style="margin-top: .2em;">
<div class="paramtext">
The leading minor of order <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="&#9001;" close="&#9002;" separators=""><mtext mathvariant="italic">value</mtext></mfenced></math>&#160;is not positive-definite and the factorization could not be completed.  Hence <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;itself is not positive-definite.  This may indicate an error in forming the matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>.  To factorize a symmetric matrix which is not positive-definite, call <a class="rtnref" href="../F07/f07pdc.xml">nag_dsptrf (f07pdc)</a> instead.

</div>
</dd>


<dt class="errorhead"><a name="NE_ALLOC_FAIL" id="NE_ALLOC_FAIL"/><b>NE_ALLOC_FAIL</b></dt>
<dd style="margin-top: .2em;">
<div class="paramtext">Memory allocation failed.</div>
</dd>


<dt class="errorhead"><a name="NE_BAD_PARAM" id="NE_BAD_PARAM"/><b>NE_BAD_PARAM</b></dt>
<dd style="margin-top: .2em;">
<div class="paramtext">On entry, parameter <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="&#9001;" close="&#9002;" separators=""><mtext mathvariant="italic">value</mtext></mfenced></math>&#160;had an illegal value.</div>
</dd>



<dt class="errorhead"><a name="NE_INTERNAL_ERROR" id="NE_INTERNAL_ERROR"/><b>NE_INTERNAL_ERROR</b></dt>
<dd style="margin-top: .2em;">
<div class="paramtext">An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.</div>
</dd>

</dl>






<h2><a name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>

<div class="paramtext">If <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Upper</b>, the computed factor <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>U</mi></math>&#160;is the exact factor  of a perturbed matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>+</mo><mi>E</mi></math>, where
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mfenced open="|" close="|" separators=""><mi>E</mi></mfenced><mo>&#8804;</mo><mi>c</mi><mfenced separators=""><mi>n</mi></mfenced><mi>&#949;</mi><mfenced open="|" close="|" separators=""><msup><mi>U</mi><mi mathvariant="italic">T</mi></msup></mfenced><mfenced open="|" close="|" separators=""><mi>U</mi></mfenced><mtext>,</mtext>
</math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
<math xmlns="http://www.w3.org/1998/Math/MathML"><mi>c</mi><mfenced separators=""><mi>n</mi></mfenced></math>&#160;is a modest linear function of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi></math>, and  <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>&#949;</mi></math>&#160;is the <span class="bitalic">machine precision</span>.</div>
<div class="paramtext">If <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#uplo" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">uplo</mi></maction></math>&#160;<math xmlns="http://www.w3.org/1998/Math/MathML"><mo>=</mo></math>&#160;<b>Nag_Lower</b>, a similar  statement holds for the computed factor <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>L</mi></math>.  It follows that  <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="|" close="|" separators=""><msub><mi>e</mi><mrow><mi>i</mi><mi>j</mi></mrow></msub></mfenced><mo>&#8804;</mo><mi>c</mi><mfenced separators=""><mi>n</mi></mfenced><mi>&#949;</mi><msqrt><msub><mi>a</mi><mrow><mi>i</mi><mi>i</mi></mrow></msub><msub><mi>a</mi><mrow><mi>j</mi><mi>j</mi></mrow></msub></msqrt></math>.</div>





<h2><a name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>

<div class="paramtext">The total number of floating-point operations is approximately <math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>1</mn><mn>3</mn></mfrac><msup><mi>n</mi><mn>3</mn></msup></math>.</div>
<div class="paramtext">A call to this function may be followed by calls to the functions:
</div><ul class="listind"><li class="listind"><a class="rtnref" href="../F07/f07gec.xml">nag_dpptrs (f07gec)</a> to solve  <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mi>X</mi><mo>=</mo><mi>B</mi></math>;</li><li class="listind"><a class="rtnref" href="../F07/f07ggc.xml">nag_dppcon (f07ggc)</a> to estimate the  condition number of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>;</li><li class="listind"><a class="rtnref" href="../F07/f07gjc.xml">nag_dpptri (f07gjc)</a> to compute the  inverse of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>.</li></ul><div class="paramtext">
The complex analogue of this function is <a class="rtnref" href="../F07/f07grc.xml">nag_zpptrf (f07grc)</a>.</div>





<h2><a name="example" id="example"/>9&#160;&#160;Example</h2>

<div class="paramtext">To compute the Cholesky factorization of the matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>, where
</div>
<div class="formula"><table class="formula"><tr><td class="formula"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
<mi>A</mi><mo>=</mo><mfenced separators="">
 <mtable>
  <mtr columnalign="right">
   <mtd><mn>4.16</mn></mtd>
   <mtd><mrow><mo>-</mo><mn>3.12</mn></mrow></mtd>
   <mtd><mn>0.56</mn></mtd>
   <mtd><mrow><mo>-</mo><mn>0.10</mn></mrow></mtd>
  </mtr><mtr columnalign="right">
   <mtd><mrow><mo>-</mo><mn>3.12</mn></mrow></mtd>
   <mtd><mn>5.03</mn></mtd>
   <mtd><mrow><mo>-</mo><mn>0.83</mn></mrow></mtd>
   <mtd><mn>1.18</mn></mtd>
  </mtr><mtr columnalign="right">
   <mtd><mn>0.56</mn></mtd>
   <mtd><mrow><mo>-</mo><mn>0.83</mn></mrow></mtd>
   <mtd><mn>0.76</mn></mtd>
   <mtd><mn>0.34</mn></mtd>
  </mtr><mtr columnalign="right">
   <mtd><mrow><mo>-</mo><mn>0.10</mn></mrow></mtd>
   <mtd><mn>1.18</mn></mtd>
   <mtd><mn>0.34</mn></mtd>
   <mtd><mn>1.18</mn></mtd>
  </mtr>
 </mtable>
</mfenced>
<mtext>,</mtext>
</math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
using packed storage.</div>



<h3><a name="examtext" id="examtext"/>9.1&#160;&#160;Program Text</h3>
 
<div><a href="../../examples/source/f07gdce.c">Program Text (f07gdce.c)</a></div>





<h3><a name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>

<div><a href="../../examples/data/f07gdce.d">Program Data (f07gdce.d)</a></div>





<h3><a name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>

<div><a href="../../examples/baseresults/f07gdce.r">Program Results (f07gdce.r)</a></div>


<hr/><div><a href="../../pdf/F07/f07gdc.pdf">f07gdc (pdf version)</a></div><div><a href="f07_conts.xml">Chapter Contents</a></div><div><a href="f07_intro.xml">Chapter Introduction</a></div>
<div><a href="../mark7.xml">NAG C Library Contents</a></div>
<div><hr/>
  &#169; The Numerical Algorithms Group Ltd, Oxford, UK. 2004
  </div></body></html>
