<?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>F08YGF (DTGSEN) : NAG Library, Mark 23</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/F08/f08ygf.pdf">F08YGF (DTGSEN) (PDF version)</a></div><div><a class="chap" href="f08conts.xml">F08 Chapter Contents</a></div><div><a class="chapint" href="f08intro.xml">F08 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/>F08YGF (DTGSEN)</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">F08YGF (DTGSEN) reorders the generalized Schur factorization of a matrix pair in real generalized Schur form, so that a selected cluster of eigenvalues appears in the leading elements, or blocks on the diagonal of the generalized Schur form.  The routine also, optionally, computes the reciprocal condition numbers of the cluster of eigenvalues and/or corresponding deflating subspaces.</div><h2 class="standard"><a class="sec" name="specification" id="specification"/>2&#160;&#160;Specification</h2><table class="fspec"><tr><td class="tdfspec1">
<div class="left-tablediv"><table class="fspec1"><tbody>
<tr>
<td class="tdfspec1" valign="top" align="left">SUBROUTINE&#160;F08YGF&#160;(</td>
<td class="tdfspec2" valign="top" align="left"><a class="arg" href="#IJOB">IJOB</a>, <a class="arg" href="#WANTQ">WANTQ</a>, <a class="arg" href="#WANTZ">WANTZ</a>, <a class="arg" href="#SELECT">SELECT</a>, <a class="arg" href="#N">N</a>, <a class="arg" href="#A">A</a>, <a class="arg" href="#LDA">LDA</a>, <a class="arg" href="#B">B</a>, <a class="arg" href="#LDB">LDB</a>, <a class="arg" href="#ALPHAR">ALPHAR</a>, <a class="arg" href="#ALPHAI">ALPHAI</a>, <a class="arg" href="#BETA">BETA</a>, <a class="arg" href="#Q">Q</a>, <a class="arg" href="#LDQ">LDQ</a>, <a class="arg" href="#Z">Z</a>, <a class="arg" href="#LDZ">LDZ</a>, <a class="arg" href="#M">M</a>, <a class="arg" href="#PL">PL</a>, <a class="arg" href="#PR">PR</a>, <a class="arg" href="#DIF">DIF</a>, <a class="arg" href="#WORK">WORK</a>, <a class="arg" href="#LWORK">LWORK</a>, <a class="arg" href="#IWORK">IWORK</a>, <a class="arg" href="#LIWORK">LIWORK</a>, <a class="arg" href="#INFO">INFO</a>)</td>
</tr>
</tbody>
</table></div>
<div class="left-tablediv"><table class="fspec3"><tbody>
<tr>
<td class="tdfspec1" valign="top" align="left">INTEGER&#160;</td>
<td class="tdfspec2" valign="top" align="left">IJOB, N, LDA, LDB, LDQ, LDZ, M, LWORK, IWORK(*), LIWORK, INFO</td>
</tr>
<tr>
<td class="tdfspec1" valign="top" align="left">REAL&#160;(KIND=nag_wp)&#160;</td>
<td class="tdfspec2" valign="top" align="left">A(LDA,*), B(LDB,*), ALPHAR(N), ALPHAI(N), BETA(N), Q(LDQ,*), Z(LDZ,*), PL, PR, DIF(*), WORK(max(1,LWORK))</td>
</tr>
<tr>
<td class="tdfspec1" valign="top" align="left">LOGICAL&#160;</td>
<td class="tdfspec2" valign="top" align="left">WANTQ, WANTZ, SELECT(N)</td>
</tr>
</tbody>
</table></div>
</td></tr></table>
<div class="paramtext">The routine may be called by its 
    LAPACK
    name <span class="bitalic">dtgsen</span>.</div><h2 class="standard"><a class="sec" name="description" id="description"/>3&#160;&#160;Description</h2>
<div class="paramtext">F08YGF (DTGSEN) factorizes the generalized real <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>&#160;in real generalized Schur form, using an orthogonal equivalence transformation as

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>S</m:mi>
 <m:mo>=</m:mo>
 <m:mover><m:mi>Q</m:mi><m:mo>^</m:mo></m:mover>
 <m:mover><m:mi>S</m:mi><m:mo>^</m:mo></m:mover>
 <m:msup><m:mover><m:mi>Z</m:mi><m:mo>^</m:mo></m:mover><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mtext>, &#8195;</m:mtext>
 <m:mi>T</m:mi><m:mo>=</m:mo>
 <m:mover><m:mi>Q</m:mi><m:mo>^</m:mo></m:mover>
 <m:mover><m:mi>T</m:mi><m:mo>^</m:mo></m:mover>
 <m:msup><m:mover><m:mi>Z</m:mi><m:mo>^</m:mo></m:mover><m:mi mathvariant="normal">T</m:mi></m:msup>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

where <m:math><m:mfenced separators=""><m:mover><m:mi>S</m:mi><m:mo>^</m:mo></m:mover><m:mo>,</m:mo><m:mover><m:mi>T</m:mi><m:mo>^</m:mo></m:mover></m:mfenced></m:math>&#160;are also in real generalized Schur form and have the selected eigenvalues as the leading diagonal elements, or diagonal blocks.  The leading columns of <m:math><m:mi>Q</m:mi></m:math>&#160;and <m:math><m:mi>Z</m:mi></m:math>&#160;are the generalized Schur vectors corresponding to the selected eigenvalues and form orthonormal subspaces for the left and right eigenspaces (deflating subspaces) of the pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>.</div><div class="paramtext">The pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>&#160;are in real generalized Schur form if <m:math><m:mi>S</m:mi></m:math>&#160;is block upper triangular with <m:math><m:mn>1</m:mn></m:math>&#160;by <m:math><m:mn>1</m:mn></m:math>&#160;and <m:math><m:mn>2</m:mn></m:math>&#160;by <m:math><m:mn>2</m:mn></m:math>&#160;diagonal blocks and <m:math><m:mi>T</m:mi></m:math>&#160;is upper triangular as returned, for example, by <a class="rout" href="../F08/f08xaf.xml">F08XAF (DGGES)</a>, or <a class="rout" href="../F08/f08xef.xml">F08XEF (DHGEQZ)</a> with <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="../F08/f08xef.xml#JOB"><m:mi mathcolor="#EE0000" mathvariant="bold">JOB</m:mi></m:maction><m:mo>=</m:mo><m:mtext>'S'</m:mtext></m:math>.  The diagonal elements, or blocks, define the generalized eigenvalues <m:math><m:mfenced separators=""><m:msub><m:mi>&#945;</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>&#946;</m:mi><m:mi mathvariant="italic">i</m:mi></m:msub></m:mfenced></m:math>, for <m:math><m:mi mathvariant="italic">i</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:mi>n</m:mi></m:math>, of the pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>.  The eigenvalues are given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub>
 <m:mo>=</m:mo>
 <m:msub><m:mi>&#945;</m:mi><m:mi>i</m:mi></m:msub>
 <m:mo>/</m:mo>
 <m:msub><m:mi>&#946;</m:mi><m:mi>i</m:mi></m:msub>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

but are returned as the pair <m:math><m:mfenced separators=""><m:msub><m:mi>&#945;</m:mi><m:mi>i</m:mi></m:msub><m:mo>,</m:mo><m:msub><m:mi>&#946;</m:mi><m:mi>i</m:mi></m:msub></m:mfenced></m:math>&#160;in order to avoid possible overflow in computing <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>i</m:mi></m:msub></m:math>.  Optionally, the routine returns reciprocals of condition number estimates for the selected eigenvalue cluster, <m:math><m:mi>p</m:mi></m:math>&#160;and <m:math><m:mi>q</m:mi></m:math>, the right and left projection norms, and of deflating subspaces, <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>.  For more information see Sections 2.4.8 and 4.11 of <a class="ref" href="#ref252">Anderson <span class="italic">et al.</span> (1999)</a>.</div><div class="paramtext">If <m:math><m:mi>S</m:mi></m:math>&#160;and <m:math><m:mi>T</m:mi></m:math>&#160;are the result of a generalized Schur factorization of a matrix pair <m:math><m:mfenced separators=""><m:mi>A</m:mi><m:mo>,</m:mo><m:mi>B</m:mi></m:mfenced></m:math>&#160;
<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>A</m:mi>
 <m:mo>=</m:mo>
 <m:mrow><m:mi>Q</m:mi><m:mi>S</m:mi><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:mrow>
 <m:mtext>, &#8195;</m:mtext>
 <m:mi>B</m:mi><m:mo>=</m:mo>
 <m:mrow><m:mi>Q</m:mi><m:mi>T</m:mi><m:msup><m:mi>Z</m:mi><m:mi mathvariant="normal">T</m:mi></m:msup></m:mrow>
</m:math></td><td class="formula2"/></tr></table></div>

then, optionally, the matrices <m:math><m:mi>Q</m:mi></m:math>&#160;and <m:math><m:mi>Z</m:mi></m:math>&#160;can be updated as <m:math><m:mi>Q</m:mi><m:mover><m:mi>Q</m:mi><m:mo>^</m:mo></m:mover></m:math>&#160;and <m:math><m:mi>Z</m:mi><m:mover><m:mi>Z</m:mi><m:mo>^</m:mo></m:mover></m:math>.  Note that the condition numbers of the pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>&#160;are the same as those of the pair <m:math><m:mfenced separators=""><m:mi>A</m:mi><m:mo>,</m:mo><m:mi>B</m:mi></m:mfenced></m:math>.</div><h2 class="standard"><a class="sec" name="references" id="references"/>4&#160;&#160;References</h2><div class="paramtext"><a name="ref252" id="ref252"/>Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)  <i>LAPACK Users' Guide</i> (3rd Edition) SIAM, Philadelphia <a class="url" href="http://www.netlib.org/lapack/lug">http://www.netlib.org/lapack/lug</a></div><h2 class="standard"><a class="sec" name="parameters" id="parameters"/>5&#160;&#160;Parameters</h2>
<dl><dt class="paramhead"><a name="IJOB" id="IJOB"/>1: &#160;&#160;&#8194; IJOB &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: specifies whether condition numbers are required for the cluster of eigenvalues (<m:math><m:mi>p</m:mi></m:math>&#160;and <m:math><m:mi>q</m:mi></m:math>) or the deflating subspaces (<m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>).

<dl>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math></dt>
<dd>Only reorder with respect to <a class="arg" href="#SELECT">SELECT</a>. No extras.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd>Reciprocal of norms of &#8216;projections&#8217; onto left and right eigenspaces with respect to the selected cluster (<m:math><m:mi>p</m:mi></m:math>&#160;and <m:math><m:mi>q</m:mi></m:math>).</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math></dt>
<dd>The upper bounds on <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>. <m:math><m:mi>F</m:mi></m:math>-norm-based estimate 
(<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>).

</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math></dt>
<dd>Estimate of <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>. <m:math><m:mn>1</m:mn></m:math>-norm-based estimate 
(<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>).

About five times as expensive as <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>4</m:mn></m:math></dt>
<dd>Compute <a class="arg" href="#PL">PL</a>, <a class="arg" href="#PR">PR</a> and <a class="arg" href="#DIF">DIF</a> as in <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>&#160;and <m:math><m:mn>2</m:mn></m:math>. Economic version to get it all.</dd>
<dt class="paramval"><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>5</m:mn></m:math></dt>
<dd>Compute <a class="arg" href="#PL">PL</a>, <a class="arg" href="#PR">PR</a> and <a class="arg" href="#DIF">DIF</a> as in <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>1</m:mn></m:math>&#160;and <m:math><m:mn>3</m:mn></m:math>.</dd></dl>
</div>
</dd><dt class="paramhead"><a name="WANTQ" id="WANTQ"/>2: &#160;&#160;&#8194; WANTQ &#8211; LOGICAL<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, update the left transformation matrix <m:math><m:mi>Q</m:mi></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, do not update <m:math><m:mi>Q</m:mi></m:math>.</div>
</div>
</dd><dt class="paramhead"><a name="WANTZ" id="WANTZ"/>3: &#160;&#160;&#8194; WANTZ &#8211; LOGICAL<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, update the right transformation matrix <m:math><m:mi>Z</m:mi></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, do not update <m:math><m:mi>Z</m:mi></m:math>.</div>
</div>
</dd><dt class="paramhead"><a name="SELECT" id="SELECT"/>4: &#160;&#160;&#8194; SELECT(<a class="arg" href="#N">N</a>) &#8211; LOGICAL&#160;array<span class="pclass">Input</span></dt><dd><div class="paramtext"><i>On entry</i>: specifies the eigenvalues in the selected cluster. To select a real eigenvalue <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>j</m:mi></m:msub></m:math>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#SELECT"><m:mi mathcolor="#EE0000" mathvariant="bold">SELECT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;must be set to .TRUE..
<div class="paramtext">To select a complex conjugate pair of eigenvalues <m:math><m:msub><m:mi>&#955;</m:mi><m:mi>j</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi>&#955;</m:mi><m:mrow><m:mi>j</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:msub></m:math>, corresponding to a <m:math><m:mn>2</m:mn></m:math>&#160;by <m:math><m:mn>2</m:mn></m:math>&#160;diagonal block, either <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#SELECT"><m:mi mathcolor="#EE0000" mathvariant="bold">SELECT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;or <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#SELECT"><m:mi mathcolor="#EE0000" mathvariant="bold">SELECT</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>j</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:mfenced></m:mrow></m:math>&#160;or both must be set to .TRUE.; a complex conjugate pair of eigenvalues must be either both included in the cluster or both excluded.</div>
</div>
</dd><dt class="paramhead"><a name="N" id="N"/>5: &#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 order of the matrices 
<m:math><m:mi>S</m:mi></m:math>&#160;and <m:math><m:mi>T</m:mi></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>&#8805;</m:mo><m:mn>0</m:mn></m:math>.
</div>
</dd><dt class="paramhead"><a name="A" id="A"/>6: &#160;&#160;&#8194; A(<a class="arg" href="#LDA">LDA</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#A">A</a>
must be at least
<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext"><i>On entry</i>: the matrix <m:math><m:mi>S</m:mi></m:math>&#160;in the pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>.</div>
<div class="paramtext"><i>On exit</i>: the updated matrix <m:math><m:mover><m:mi>S</m:mi><m:mo>^</m:mo></m:mover></m:math>.</div></dd><dt class="paramhead"><a name="LDA" id="LDA"/>7: &#160;&#160;&#8194; LDA &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#A">A</a> as declared in the (sub)program from which F08YGF (DTGSEN) is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDA"><m:mi mathcolor="#EE0000" mathvariant="bold">LDA</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div>
</dd><dt class="paramhead"><a name="B" id="B"/>8: &#160;&#160;&#8194; B(<a class="arg" href="#LDB">LDB</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#B">B</a>
must be at least
<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext"><i>On entry</i>: the matrix <m:math><m:mi>T</m:mi></m:math>, in the pair <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>.</div>
<div class="paramtext"><i>On exit</i>: the updated matrix <m:math><m:mover><m:mi>T</m:mi><m:mo>^</m:mo></m:mover></m:math></div></dd><dt class="paramhead"><a name="LDB" id="LDB"/>9: &#160;&#160;&#8194; LDB &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#B">B</a> as declared in the (sub)program from which F08YGF (DTGSEN) is called.</div><div class="paramtext"><i>Constraint</i>:
  <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDB"><m:mi mathcolor="#EE0000" mathvariant="bold">LDB</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>.
</div>
</dd><dt class="paramhead"><a name="ALPHAR" id="ALPHAR"/>10: &#8194; ALPHAR(<a class="arg" href="#N">N</a>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: see the description of <a class="arg" href="#BETA">BETA</a>.</div>
</dd><dt class="paramhead"><a name="ALPHAI" id="ALPHAI"/>11: &#8194; ALPHAI(<a class="arg" href="#N">N</a>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: see the description of <a class="arg" href="#BETA">BETA</a>.</div>
</dd><dt class="paramhead"><a name="BETA" id="BETA"/>12: &#8194; BETA(<a class="arg" href="#N">N</a>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHAR"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHAR</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow>
 <m:mo>/</m:mo>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BETA"><m:mi mathcolor="#EE0000" mathvariant="bold">BETA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow>
</m:math>&#160;and <m:math>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHAI"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHAI</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow>
 <m:mo>/</m:mo>
 <m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#BETA"><m:mi mathcolor="#EE0000" mathvariant="bold">BETA</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi mathvariant="italic">j</m:mi></m:mfenced></m:mrow>
</m:math>&#160;are the real and imaginary parts respectively of the <m:math><m:mi mathvariant="italic">j</m:mi></m:math>th eigenvalue, for <m:math><m:mi mathvariant="italic">j</m:mi><m:mo>=</m:mo><m:mn>1</m:mn><m:mo>,</m:mo><m:mn>2</m:mn><m:mo>,</m:mo><m:mo>&#8230;</m:mo><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>.
<div class="paramtext">If <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHAI"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHAI</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mi>j</m:mi></m:mfenced></m:mrow></m:math>&#160;is zero, then the <m:math><m:mi>j</m:mi></m:math>th eigenvalue is real; if positive then <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHAI"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHAI</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mi>j</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mrow></m:mfenced></m:mrow></m:math>&#160;is negative, and the <m:math><m:mi>j</m:mi></m:math>th and <m:math><m:mfenced separators=""><m:mi>j</m:mi><m:mo>+</m:mo><m:mn>1</m:mn></m:mfenced></m:math>st eigenvalues are a complex conjugate pair.</div>
<div class="paramtext">Conjugate pairs of eigenvalues correspond to the <m:math><m:mn>2</m:mn></m:math>&#160;by <m:math><m:mn>2</m:mn></m:math>&#160;diagonal blocks of <m:math><m:mover><m:mi>S</m:mi><m:mo>^</m:mo></m:mover></m:math>.  These <m:math><m:mn>2</m:mn></m:math>&#160;by <m:math><m:mn>2</m:mn></m:math>&#160;blocks can be reduced by applying complex unitary transformations to <m:math>
 <m:mfenced separators=""><m:mover><m:mi>S</m:mi><m:mo>^</m:mo></m:mover><m:mo>,</m:mo><m:mover><m:mi>T</m:mi><m:mo>^</m:mo></m:mover></m:mfenced>
</m:math>&#160;to obtain the complex Schur form <m:math>
 <m:mfenced separators=""><m:mover><m:mi>S</m:mi><m:mo>~</m:mo></m:mover><m:mo>,</m:mo><m:mover><m:mi>T</m:mi><m:mo>~</m:mo></m:mover></m:mfenced>
</m:math>, where <m:math>
 <m:mover><m:mi>S</m:mi><m:mo>~</m:mo></m:mover>
</m:math>&#160;is triangular (and complex).  In this form <m:math>
 <m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHAR"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHAR</m:mi></m:maction><m:mo>+</m:mo><m:mi>i</m:mi><m:maction actiontype="link" dsi:type="simple" dsi:href="#ALPHAI"><m:mi mathcolor="#EE0000" mathvariant="bold">ALPHAI</m:mi></m:maction>
</m:math>&#160;and <a class="arg" href="#BETA">BETA</a> are the diagonals of <m:math>
  <m:mover><m:mi>S</m:mi><m:mo>~</m:mo></m:mover>
</m:math>&#160;and <m:math>
  <m:mover><m:mi>T</m:mi><m:mo>~</m:mo></m:mover>
</m:math>&#160;respectively.</div> 
</div></dd><dt class="paramhead"><a name="Q" id="Q"/>13: &#8194; Q(<a class="arg" href="#LDQ">LDQ</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#Q">Q</a>
must be at least
<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, and at least <m:math><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, the <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix <m:math><m:mi>Q</m:mi></m:math>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, the updated matrix <m:math><m:mi>Q</m:mi><m:mover><m:mi>Q</m:mi><m:mo>^</m:mo></m:mover></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, <a class="arg" href="#Q">Q</a> is not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="LDQ" id="LDQ"/>14: &#8194; LDQ &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#Q">Q</a> as declared in the (sub)program from which F08YGF (DTGSEN) is called.</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="#WANTQ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTQ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDQ"><m:mi mathcolor="#EE0000" mathvariant="bold">LDQ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>;</li>
<li class="listcons">otherwise <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDQ"><m:mi mathcolor="#EE0000" mathvariant="bold">LDQ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.</li>
</ul></div>
</dd><dt class="paramhead"><a name="Z" id="Z"/>15: &#8194; Z(<a class="arg" href="#LDZ">LDZ</a>,<m:math><m:mo>*</m:mo></m:math>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Input/Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> the second dimension of the array <a class="arg" href="#Z">Z</a>
must be at least
<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>&#160;if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, and at least <m:math><m:mn>1</m:mn></m:math>&#160;otherwise.</div>
<div class="paramtext"><i>On entry</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, the <m:math><m:mi>n</m:mi></m:math>&#160;by <m:math><m:mi>n</m:mi></m:math>&#160;matrix <m:math><m:mi>Z</m:mi></m:math>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, the updated matrix <m:math><m:mi>Z</m:mi><m:mover><m:mi>Z</m:mi><m:mo>^</m:mo></m:mover></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.FALSE.</m:mi></m:math>, <a class="arg" href="#Z">Z</a> is not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="LDZ" id="LDZ"/>16: &#8194; LDZ &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the first dimension of the array <a class="arg" href="#Z">Z</a> as declared in the (sub)program from which F08YGF (DTGSEN) is called.</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="#WANTZ"><m:mi mathcolor="#EE0000" mathvariant="bold">WANTZ</m:mi></m:maction><m:mo>=</m:mo><m:mi mathvariant="normal">.TRUE.</m:mi></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDZ"><m:mi mathcolor="#EE0000" mathvariant="bold">LDZ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:mfenced></m:mrow></m:math>;</li>
<li class="listcons">otherwise <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LDZ"><m:mi mathcolor="#EE0000" mathvariant="bold">LDZ</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.</li>
</ul></div>
</dd><dt class="paramhead"><a name="M" id="M"/>17: &#8194; M &#8211; INTEGER<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: the dimension of the specified pair of left and right eigenspaces (deflating subspaces).</div></dd><dt class="paramhead"><a name="PL" id="PL"/>18: &#8194; PL &#8211; REAL&#160;(KIND=nag_wp)<span class="pclass">Output</span></dt><dt class="multi-paramhead"><a name="PR" id="PR"/>19: &#8194; PR &#8211; REAL&#160;(KIND=nag_wp)<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:mn>4</m:mn></m:math>&#160;or <m:math><m:mn>5</m:mn></m:math>, <a class="arg" href="#PL">PL</a> and <a class="arg" href="#PR">PR</a> are lower bounds on the reciprocal of the norm of &#8216;projections&#8217; <m:math><m:mi>p</m:mi></m:math>&#160;and <m:math><m:mi>q</m:mi></m:math>&#160;onto left and right eigenspaces with respect to the selected cluster. <m:math><m:mn>0</m:mn><m:mo>&lt;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PL"><m:mi mathcolor="#EE0000" mathvariant="bold">PL</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PR"><m:mi mathcolor="#EE0000" mathvariant="bold">PR</m:mi></m:maction><m:mo>&#8804;</m:mo><m:mn>1</m:mn></m:math>.<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#PL"><m:mi mathcolor="#EE0000" mathvariant="bold">PL</m:mi></m:maction><m:mo>=</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#PR"><m:mi mathcolor="#EE0000" mathvariant="bold">PR</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>3</m:mn></m:math>, <a class="arg" href="#PL">PL</a> and <a class="arg" href="#PR">PR</a> are not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="DIF" id="DIF"/>20: &#8194; DIF(<m:math><m:mo>*</m:mo></m:math>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Output</span></dt><dd>
<div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#DIF">DIF</a>
must be at least
<m:math><m:mn>2</m:mn></m:math>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>2</m:mn></m:math>, 
<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>&#160;store the estimates of <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>4</m:mn></m:math>,  
<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>&#160;are <m:math><m:mi>F</m:mi></m:math>-norm-based upper bounds on <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;or <m:math><m:mn>5</m:mn></m:math>,   
<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>&#160;are <m:math><m:mn>1</m:mn></m:math>-norm-based estimates of <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>u</m:mi></m:msub></m:math>&#160;and <m:math><m:msub><m:mi mathvariant="normal">Dif</m:mi><m:mi>l</m:mi></m:msub></m:math>.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mi>n</m:mi></m:math>, 
<m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>&#160;<m:math><m:mo>=</m:mo><m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mfenced separators=""><m:mi>A</m:mi><m:mo>,</m:mo><m:mi>B</m:mi></m:mfenced></m:mfenced><m:mi>F</m:mi></m:msub></m:math>.</div>
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;or <m:math><m:mn>1</m:mn></m:math>, <a class="arg" href="#DIF">DIF</a> is not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="WORK" id="WORK"/>21: &#8194; WORK(<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction></m:mfenced></m:mrow></m:math>) &#8211; REAL&#160;(KIND=nag_wp)&#160;array<span class="pclass">Workspace</span></dt><dd><div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFO"><m:mi mathcolor="#EE0000" mathvariant="bold">INFO</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>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#WORK"><m:mi mathcolor="#EE0000" mathvariant="bold">WORK</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;returns the minimum <a class="arg" href="#LWORK">LWORK</a>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#WORK">WORK</a> is not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="LWORK" id="LWORK"/>22: &#8194; LWORK &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: 
the dimension of the array <a class="arg" href="#WORK">WORK</a> as declared in the (sub)program from which F08YGF (DTGSEN) is called.

<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, a workspace query is assumed; the routine only calculates the minimum sizes of the <a class="arg" href="#WORK">WORK</a> and <a class="arg" href="#IWORK">IWORK</a> arrays, returns these values as the first entries of the <a class="arg" href="#WORK">WORK</a> and <a class="arg" href="#IWORK">IWORK</a> arrays, and no error message related to <a class="arg" href="#LWORK">LWORK</a> or <a class="arg" href="#LIWORK">LIWORK</a> is issued.</div></div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/>
if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <ul class="listcons">
<li class="listcons">if <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>=</m:mo><m:mn>0</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>4</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mrow><m:mn>4</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>16</m:mn></m:mrow><m:mo>,</m:mo><m:mrow><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>&#215;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:mfenced></m:mrow></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;or <m:math><m:mn>5</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mrow><m:mn>4</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>16</m:mn></m:mrow><m:mo>,</m:mo><m:mrow><m:mn>4</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>&#215;</m:mo><m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced></m:mrow></m:mfenced></m:mrow></m:math>;</li>
<li class="listcons">otherwise <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>4</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>16</m:mn></m:math>.</li>
</ul>.</div></dd><dt class="paramhead"><a name="IWORK" id="IWORK"/>23: &#8194; IWORK(<m:math><m:mo>*</m:mo></m:math>) &#8211; INTEGER&#160;array<span class="pclass">Workspace</span></dt><dd>
<div class="paramtext"><b>Note:</b> the dimension of the array <a class="arg" href="#IWORK">IWORK</a>
must be at least
<m:math><m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mn>1</m:mn><m:mo>,</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction></m:mfenced></m:mrow></m:math>.</div>
<div class="paramtext"><i>On exit</i>: if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFO"><m:mi mathcolor="#EE0000" mathvariant="bold">INFO</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>, <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#IWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">IWORK</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mn>1</m:mn></m:mfenced></m:mrow></m:math>&#160;returns the minimum <a class="arg" href="#LIWORK">LIWORK</a>.
<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>, <a class="arg" href="#IWORK">IWORK</a> is not referenced.</div>
</div>
</dd><dt class="paramhead"><a name="LIWORK" id="LIWORK"/>24: &#8194; LIWORK &#8211; INTEGER<span class="pclass">Input</span></dt><dd>
<div class="paramtext"><i>On entry</i>: the dimension of the array <a class="arg" href="#IWORK">IWORK</a> as declared in the (sub)program from which F08YGF (DTGSEN) is called.

<div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>=</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, a workspace query is assumed; the routine only calculates the minimum sizes of the <a class="arg" href="#WORK">WORK</a> and <a class="arg" href="#IWORK">IWORK</a> arrays, returns these values as the first entries of the <a class="arg" href="#WORK">WORK</a> and <a class="arg" href="#IWORK">IWORK</a> arrays, and no error message related to <a class="arg" href="#LWORK">LWORK</a> or <a class="arg" href="#LIWORK">LIWORK</a> is issued.</div></div><div class="paramtext"><i>Constraints</i>:
   <div class="paramtext"/>
if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>&#8800;</m:mo><m:mrow><m:mo>-</m:mo><m:mn>1</m:mn></m:mrow></m:math>, <ul class="listcons">
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math>, <m:math><m:mn>2</m:mn></m:math>&#160;or <m:math><m:mn>4</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn></m:math>;</li>
<li class="listcons">if <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#IJOB"><m:mi mathcolor="#EE0000" mathvariant="bold">IJOB</m:mi></m:maction><m:mo>=</m:mo><m:mn>3</m:mn></m:math>&#160;or <m:math><m:mn>5</m:mn></m:math>, <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>&#8805;</m:mo>
     <m:mrow><m:mi>max</m:mi><m:mspace width="0.125em"/><m:mfenced separators=""><m:mrow><m:mn>2</m:mn><m:mo>&#215;</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction><m:mo>&#215;</m:mo>
       <m:mfenced separators=""><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>-</m:mo><m:maction actiontype="link" dsi:type="simple" dsi:href="#M"><m:mi mathcolor="#EE0000" mathvariant="bold">M</m:mi></m:maction></m:mfenced>
      </m:mrow><m:mo>,</m:mo><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#N"><m:mi mathcolor="#EE0000" mathvariant="bold">N</m:mi></m:maction><m:mo>+</m:mo><m:mn>6</m:mn></m:mrow></m:mfenced></m:mrow></m:math>;</li>
<li class="listcons">otherwise <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#LIWORK"><m:mi mathcolor="#EE0000" mathvariant="bold">LIWORK</m:mi></m:maction><m:mo>&#8805;</m:mo><m:mn>1</m:mn></m:math>.</li>
</ul>.</div></dd><dt class="paramhead"><a name="INFO" id="INFO"/>25: &#8194; INFO &#8211; INTEGER<span class="pclass">Output</span></dt><dd><div class="paramtext"><i>On exit</i>: <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFO"><m:mi mathcolor="#EE0000" mathvariant="bold">INFO</m:mi></m:maction><m:mo>=</m:mo><m:mn>0</m:mn></m:math>&#160;unless the routine detects an error (see <a class="sec" href="#errors">Section 6</a>).</div></dd></dl><h2 class="standard"><a class="sec" name="errors" id="errors"/>6&#160;&#160;Error Indicators and Warnings</h2>
<div class="paramtext">Errors or warnings detected by the routine:</div>
<dl class="ifail">
<dt class="errorhead"><a name="INlt0" id="INlt0"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFO"><m:mi mathcolor="#EE0000" mathvariant="bold">INFO</m:mi></m:maction><m:mo>&lt;</m:mo><m:mn>0</m:mn></m:math></dt>
<dd><div class="paramtext">If <m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFO"><m:mi mathcolor="#EE0000" mathvariant="bold">INFO</m:mi></m:maction><m:mo>=</m:mo><m:mo>-</m:mo><m:mi>i</m:mi></m:math>, argument <m:math><m:mi>i</m:mi></m:math>&#160;had an illegal value. An explanatory message is output, and execution of the program is terminated.</div></dd>
</dl><dl class="ifail">
<dt class="errorhead"><a name="INeq1" id="INeq1"/><m:math><m:maction actiontype="link" dsi:type="simple" dsi:href="#INFO"><m:mi mathcolor="#EE0000" mathvariant="bold">INFO</m:mi></m:maction><m:mo>=</m:mo><m:mn>1</m:mn></m:math></dt>
<dd><div class="paramtext">Reordering of <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>&#160;failed because the transformed matrix pair <m:math><m:mfenced separators=""><m:mover><m:mi>S</m:mi><m:mo>^</m:mo></m:mover><m:mo>,</m:mo><m:mover><m:mi>T</m:mi><m:mo>^</m:mo></m:mover></m:mfenced></m:math>&#160;would be too far from generalized Schur form; the problem is very ill-conditioned. <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>,</m:mo><m:mi>T</m:mi></m:mfenced></m:math>&#160;may have been partially reordered. If requested, <m:math><m:mn>0</m:mn></m:math>&#160;is returned in <m:math><m:mrow><m:maction actiontype="link" dsi:type="simple" dsi:href="#DIF"><m:mi mathcolor="#EE0000" mathvariant="bold">DIF</m:mi></m:maction><m:mfenced separators="," open="(" close=")"><m:mrow><m:mn>1</m:mn><m:mo>:</m:mo><m:mn>2</m:mn></m:mrow></m:mfenced></m:mrow></m:math>, <a class="arg" href="#PL">PL</a> and <a class="arg" href="#PR">PR</a>.</div></dd>
</dl><h2 class="standard"><a class="sec" name="accuracy" id="accuracy"/>7&#160;&#160;Accuracy</h2>
<div class="paramtext">The computed generalized Schur form is nearly the exact generalized Schur form for nearby matrices <m:math><m:mfenced separators=""><m:mi>S</m:mi><m:mo>+</m:mo><m:mi>E</m:mi></m:mfenced></m:math>&#160;and <m:math><m:mfenced separators=""><m:mi>T</m:mi><m:mo>+</m:mo><m:mi>F</m:mi></m:mfenced></m:math>, where

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>E</m:mi></m:mfenced><m:mn>2</m:mn></m:msub>
 <m:mo>=</m:mo>
 <m:mrow><m:mi mathvariant="italic">O</m:mi><m:mo>&#8289;</m:mo><m:mi>&#949;</m:mi></m:mrow>
 <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>S</m:mi></m:mfenced><m:mn>2</m:mn></m:msub>
 <m:mtext>&#8195; and &#8195;</m:mtext>
 <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>F</m:mi></m:mfenced><m:mn>2</m:mn></m:msub><m:mo>=</m:mo>
 <m:mrow><m:mi mathvariant="italic">O</m:mi><m:mo>&#8289;</m:mo><m:mi>&#949;</m:mi></m:mrow>
 <m:msub><m:mfenced open="&#8214;" close="&#8214;" separators=""><m:mi>T</m:mi></m:mfenced><m:mn>2</m:mn></m:msub>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

and <m:math><m:mi>&#949;</m:mi></m:math>&#160;is the <span class="bitalic">machine precision</span>. See Section 4.11 of <a class="ref" href="#ref252">Anderson <span class="italic">et al.</span> (1999)</a> for further details of error bounds for the generalized nonsymmetric eigenproblem, and for information on the condition numbers returned.</div><h2 class="standard"><a class="sec" name="fcomments" id="fcomments"/>8&#160;&#160;Further Comments</h2>
<div class="paramtext">The complex analogue of this routine is <a class="rout" href="../F08/f08yuf.xml">F08YUF (ZTGSEN)</a>.</div><h2 class="standard"><a class="sec" name="example" id="example"/>9&#160;&#160;Example</h2>
<div class="paramtext">This example reorders the generalized Schur factors <m:math><m:mi>S</m:mi></m:math>&#160;and <m:math><m:mi>T</m:mi></m:math>&#160;and update the matrices <m:math><m:mi>Q</m:mi></m:math>&#160;and <m:math><m:mi>Z</m:mi></m:math>&#160;given by

<div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>S</m:mi>
 <m:mo>=</m:mo>
 <m:mfenced><m:mtable columnalign="right">
<m:mtr>
   <m:mtd><m:mn>4.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>2.0</m:mn></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>3.0</m:mn></m:mtd>
   <m:mtd><m:mn>4.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>3.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>6.0</m:mn></m:mtd>
</m:mtr>
</m:mtable></m:mfenced>
 <m:mo>, &#8195;</m:mo>
 <m:mi>T</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable columnalign="right">
<m:mtr>
   <m:mtd><m:mn>2.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>3.0</m:mn></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>2.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>2.0</m:mn></m:mtd>
</m:mtr>
</m:mtable></m:mfenced>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div><div class="formula"><table class="formula"><tr><td class="formula"><m:math display="block">
 <m:mi>Q</m:mi>
 <m:mo>=</m:mo>
 <m:mfenced><m:mtable columnalign="right">
<m:mtr>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
</m:mtr>
</m:mtable></m:mfenced>
 <m:mtext>&#8195; and &#8195;</m:mtext>
 <m:mi>Z</m:mi><m:mo>=</m:mo>
 <m:mfenced><m:mtable columnalign="right">
<m:mtr>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
</m:mtr><m:mtr>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>0</m:mn><m:mphantom><m:mn>.0</m:mn></m:mphantom></m:mtd>
   <m:mtd><m:mn>1.0</m:mn></m:mtd>
</m:mtr>
</m:mtable></m:mfenced>
 <m:mtext>,</m:mtext>
</m:math></td><td class="formula2"/></tr></table></div>

selecting the first and fourth generalized eigenvalues to be moved to the leading positions.  Bases for the left and right deflating subspaces, and estimates of the condition numbers for the eigenvalues and Frobenius norm based bounds on the condition numbers for the deflating subspaces are also output.</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/f08ygfe.f90">Program Text (f08ygfe.f90)</a></p><h3 class="standard"><a class="sec" name="examdata" id="examdata"/>9.2&#160;&#160;Program Data</h3>
<p><a class="verbatimref" href="../../examples/data/f08ygfe.d">Program&#160;Data (f08ygfe.d)</a></p><h3 class="standard"><a class="sec" name="examresults" id="examresults"/>9.3&#160;&#160;Program Results</h3>
<p><a class="verbatimref" href="../../examples/baseresults/f08ygfe.r">Program Results (f08ygfe.r)</a></p>
<hr/><div><a class="rout" href="../../pdf/F08/f08ygf.pdf">F08YGF (DTGSEN) (PDF version)</a></div><div><a class="chap" href="f08conts.xml">F08 Chapter Contents</a></div><div><a class="chapint" href="f08intro.xml">F08 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. 2011</a></div></body></html>