
<?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 : 
  f07mwc</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/f07mwc.pdf">f07mwc (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_zhetri (f07mwc)</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_zhetri (f07mwc) computes the  inverse of a complex Hermitian indefinite matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>,  where <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;has been factorized by  <a class="rtnref" href="../F07/f07mrc.xml">nag_zhetrf (f07mrc)</a>.</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_zhetri</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>, Complex&#160;<a class="argref" href="#a">a</a>[], Integer&#160;<a class="argref" href="#pda">pda</a>, const&#160;Integer&#160;<a class="argref" href="#ipiv">ipiv</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">To compute the inverse of a complex Hermitian indefinite matrix  <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>, this function must be preceded by a call to  <a class="rtnref" href="../F07/f07mrc.xml">nag_zhetrf (f07mrc)</a>, which computes  the Bunch&#8211;Kaufman factorization of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>.</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_Upper</b>, <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>=</mo><mi>P</mi><mi>U</mi><mi>D</mi><msup><mi>U</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup></math>&#160; and <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>A</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>&#160;is computed by solving  <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>U</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup><mi>X</mi><mi>P</mi><mi>U</mi><mo>=</mo><msup><mi>D</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>&#160;for <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>X</mi></math>.</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>, <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>=</mo><mi>P</mi><mi>L</mi><mi>D</mi><msup><mi>L</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup></math>&#160; and <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>A</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>&#160;is computed by solving  <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>L</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup><mi>X</mi><mi>P</mi><mi>L</mi><mo>=</mo><msup><mi>D</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>&#160;for <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>X</mi></math>.</div>





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

<div class="paramtext">
<p><a name="ref359" id="ref359"/>Du Croz J J and Higham N J (1992) Stability of methods for matrix inversion <i>IMA J. Numer. Anal.</i> <b>12</b> 1&#8211;19 </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 how <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;has been 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>, <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>=</mo><mi>P</mi><mi>U</mi><mi>D</mi><msup><mi>U</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup></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>, <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi><mo>=</mo><mi>P</mi><mi>L</mi><mi>D</mi><msup><mi>L</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</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="a" id="a"/>4:
 &#160;&#160;&#8194;
 <b>a</b>[<math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="italic">dim</mi></math>] &#8211; Complex&#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="#a">a</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><mrow><maction actiontype="link" dsi:href="#pda" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">pda</mi></maction><mo>&#215;</mo><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></mfenced></mrow></mrow></mfenced></mrow></math>.</div>


<div class="paramtext"><i>On entry</i>: details of the factorization of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>, as returned by <a class="rtnref" href="../F07/f07mrc.xml">nag_zhetrf (f07mrc)</a>.</div>
<div class="paramtext"><i>On exit</i>: the factorization is overwritten by the <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi></math>&#160;by <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>n</mi></math>&#160;Hermitian matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>A</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>. 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 triangle of <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>A</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>&#160;is stored in the upper triangular part of the array; 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 triangle of <math xmlns="http://www.w3.org/1998/Math/MathML"><msup><mi>A</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></math>&#160;is stored in the lower triangular part of the array.</div>


</dd><dt class="paramhead"><a name="pda" id="pda"/>5:
 &#160;&#160;&#8194;
 <b>pda</b> &#8211; Integer&#160;<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: the stride separating row or column elements (depending on the value of 

 <a class="argref" href="#order">order</a>
) of the matrix  in the array 

 <a class="argref" href="#a">a</a>
 .</div>
<div class="paramtext"><i>Constraint</i>:
  <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#pda" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">pda</mi></maction><mo>&#8805;</mo><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></mfenced></mrow></math>.</div></dd><dt class="paramhead"><a name="ipiv" id="ipiv"/>6:
 &#160;&#160;&#8194;
 <b>ipiv</b>[<math xmlns="http://www.w3.org/1998/Math/MathML"><mi mathvariant="italic">dim</mi></math>] &#8211; const&#160;Integer&#160;<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><b>Note:</b>  
  the dimension, <span class="italic">dim</span>, of the array <a class="argref" href="#ipiv">ipiv</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></mfenced></mrow></math>.</div>

<div class="paramtext"><i>On entry</i>: details of the interchanges and the block structure of <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>D</mi></math>, as returned by <a class="rtnref" href="../F07/f07mrc.xml">nag_zhetrf (f07mrc)</a>.</div>

</dd><dt class="paramhead"><a name="fail" id="fail"/>7:
 &#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>
<dd style="margin-top: .2em;">
<div class="paramtext">On entry, <math xmlns="http://www.w3.org/1998/Math/MathML"><maction actiontype="link" dsi:href="#pda" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">pda</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="#pda" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">pda</mi></maction><mo>&gt;</mo><mn>0</mn></math>.</div>
</dd>




<dt class="errorhead"><a name="NE_INT_2" id="NE_INT_2"/><b>NE_INT_2</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="#pda" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">pda</mi></maction><mo>=</mo><mfenced open="&#9001;" close="&#9002;" separators=""><mtext mathvariant="italic">value</mtext></mfenced></math>, <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="#pda" dsi:type="simple"><mi mathcolor="#EE0000" mathvariant="bold">pda</mi></maction><mo>&#8805;</mo><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></mfenced></mrow></math>.</div>
</dd>



<dt class="errorhead"><a name="NE_SINGULAR" id="NE_SINGULAR"/><b>NE_SINGULAR</b></dt>
<dd style="margin-top: .2em;">
<div class="paramtext">
The block diagonal matrix <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>D</mi></math>&#160;is exactly singular.

</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">The computed inverse <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>X</mi></math>&#160;satisfies a bound of the form
</div><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>, <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="|" close="|" separators=""><mi>D</mi><msup><mi>U</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup><mi>X</mi><mi>P</mi><mi>U</mi><mo>-</mo><mi>I</mi></mfenced><mo>&#8804;</mo><mi>c</mi><mfenced separators=""><mi>n</mi></mfenced><mi>&#949;</mi><mfenced separators=""><mfenced open="|" close="|" separators=""><mi>D</mi></mfenced><mfenced open="|" close="|" separators=""><msup><mi>U</mi><mi mathvariant="italic">H</mi></msup></mfenced><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup><mfenced open="|" close="|" separators=""><mi>X</mi></mfenced><mi>P</mi><mfenced open="|" close="|" separators=""><mi>U</mi></mfenced><mo>+</mo><mfenced open="|" close="|" separators=""><mi>D</mi></mfenced><mfenced open="|" close="|" separators=""><msup><mi>D</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></mfenced></mfenced></math>;</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>, <math xmlns="http://www.w3.org/1998/Math/MathML"><mfenced open="|" close="|" separators=""><mi>D</mi><msup><mi>L</mi><mi mathvariant="italic">H</mi></msup><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup><mi>X</mi><mi>P</mi><mi>L</mi><mo>-</mo><mi>I</mi></mfenced><mo>&#8804;</mo><mi>c</mi><mfenced separators=""><mi>n</mi></mfenced><mi>&#949;</mi><mfenced separators=""><mfenced open="|" close="|" separators=""><mi>D</mi></mfenced><mfenced open="|" close="|" separators=""><msup><mi>L</mi><mi mathvariant="italic">H</mi></msup></mfenced><msup><mi>P</mi><mi mathvariant="italic">T</mi></msup><mfenced open="|" close="|" separators=""><mi>X</mi></mfenced><mi>P</mi><mfenced open="|" close="|" separators=""><mi>L</mi></mfenced><mo>+</mo><mfenced open="|" close="|" separators=""><mi>D</mi></mfenced><mfenced open="|" close="|" separators=""><msup><mi>D</mi><mrow><mo>-</mo><mn>1</mn></mrow></msup></mfenced></mfenced></math>,</li></ul><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>





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

<div class="paramtext">The total number of real floating-point operations is approximately <math xmlns="http://www.w3.org/1998/Math/MathML"><mfrac><mn>8</mn><mn>3</mn></mfrac><msup><mi>n</mi><mn>3</mn></msup></math>.</div>
<div class="paramtext">The real analogue of this function is <a class="rtnref" href="../F07/f07mjc.xml">nag_dsytri (f07mjc)</a>.</div>





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

<div class="paramtext">To compute the inverse 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><mrow><mo>-</mo><mn>1.36</mn></mrow><mo>+</mo><mn>0.00</mn><mi>i</mi></mtd>
   <mtd><mn>1.58</mn><mo>+</mo><mn>0.90</mn><mi>i</mi></mtd>
   <mtd><mn>2.21</mn><mo>-</mo><mn>0.21</mn><mi>i</mi></mtd>
   <mtd><mn>3.91</mn><mo>+</mo><mn>1.50</mn><mi>i</mi></mtd>
  </mtr><mtr columnalign="right">
   <mtd><mn>1.58</mn><mo>-</mo><mn>0.90</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>8.87</mn></mrow><mo>+</mo><mn>0.00</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>1.84</mn></mrow><mo>-</mo><mn>0.03</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>1.78</mn></mrow><mo>+</mo><mn>1.18</mn><mi>i</mi></mtd>
  </mtr><mtr columnalign="right">
   <mtd><mn>2.21</mn><mo>+</mo><mn>0.21</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>1.84</mn></mrow><mo>+</mo><mn>0.03</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>4.63</mn></mrow><mo>+</mo><mn>0.00</mn><mi>i</mi></mtd>
   <mtd><mn>0.11</mn><mo>+</mo><mn>0.11</mn><mi>i</mi></mtd>
  </mtr><mtr columnalign="right">
   <mtd><mn>3.91</mn><mo>-</mo><mn>1.50</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>1.78</mn></mrow><mo>-</mo><mn>1.18</mn><mi>i</mi></mtd>
   <mtd><mn>0.11</mn><mo>-</mo><mn>0.11</mn><mi>i</mi></mtd>
   <mtd><mrow><mo>-</mo><mn>1.84</mn></mrow><mo>+</mo><mn>0.00</mn><mi>i</mi></mtd>
  </mtr>
 </mtable>
</mfenced>
<mtext>.</mtext>
</math></td><td class="formula2"/></tr></table></div>
<div class="paramtext">
Here <math xmlns="http://www.w3.org/1998/Math/MathML"><mi>A</mi></math>&#160;is Hermitian indefinite and must first be factorized  by <a class="rtnref" href="../F07/f07mrc.xml">nag_zhetrf (f07mrc)</a>.</div>



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





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

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





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

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


<hr/><div><a href="../../pdf/F07/f07mwc.pdf">f07mwc (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>
