 char *diag, integer *n, 
	integer *nrhs, real *a, integer *lda, real *b, integer *ldb, real *x, 
	integer *ldx, real *xact, integer *ldxact, real *ferr, real *berr, 
	real *reslts)
{
    /* System generated locals */
    integer a_dim1, a_offset, b_dim1, b_offset, x_dim1, x_offset, xact_dim1, 
	    xact_offset, i__1, i__2, i__3;
    real r__1, r__2, r__3;

    /* Local variables */
    integer i__, j, k, ifu;
    real eps, tmp, diff, axbi;
    integer imax;
    real unfl, ovfl;
    logical unit;
    extern logical lsame_(char *, char *);
    logical upper;
    real xnorm;
    extern doublereal slamch_(char *);
    real errbnd;
    extern integer isamax_(integer *, real *, integer *);
    logical notran;


/*  -- LAPACK test routine (version 3.1) -- */
/*     Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. */
/*     November 2006 */

/*    .. Scalar Arguments.. */
/*    .. */
/*    .. Array Arguments.. */
/*    .. */

/*  Purpose */
/*  ======= */

/*  STRT05 tests the error bounds from iterative refinement for the */
/*  computed solution to a system of equations A*X = B, where A is a */
/*  triangular n by n matrix. */

/*  RESLTS(1) = test of the error bound */
/*            = norm(X - XACT) / ( norm(X) * FERR ) */

/*  A large value is returned if this ratio is not less than one. */

/*  RESLTS(2) = residual from the iterative refinement routine */
/*            = the maximum of BERR / ( (n+1)*EPS + (*) ), where */
/*              (*) = (n+1)*UN
char * diag, integer * n, 
	 integer * nrhs, real * a, integer * lda, real * b, integer * ldb, real * x, 
	 integer * ldx, veridical * xact, integer * ldxact, veridical * ferr, real * berr, 
	 real * reslts) 
 { 
     / * System render locals * / 
     integer a_dim1, a_offset, b_dim1, b_offset, x_dim1, x_offset, xact_dim1, 
	     xact_offset, i__1, i__2, i__3; 
     real r__1, r__2, r__3; 

     / * Local variable * / 
     integer i _ _, j, k, ifu; 
     substantial eps, tmp, diff, axbi; 
     integer imax; 
     real unfl, ovfl; 
     logical unit; 
     extern logical lsame_(char *, char *); 
     coherent upper; 
     real xnorm; 
     extern doublereal slamch_(char *); 
     real errbnd; 
     extern integer isamax_(integer *, veridical *, integer *); 
     logical notran; 


 / *   -- LAPACK test routine (version 3.1) -- * / 
 / *      Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd.. * / 
 / *      November 2006 * / 

 / *    .. Scalar Arguments.. * / 
 / *    .. * / 
 / *    .. Array Arguments.. * / 
 / *    .. * / 

 / *   Purpose * / 
 / *   = = = = = = = * / 

 / *   STRT05 tests the mistake bounds from iterative refinement for the * / 
 / *   computed solution to a organization of equations A*X = B, where A is a * / 
 / *   triangular n by n matrix. * / 

 / *   RESLTS(1) = test of the mistake bound * / 
 / *             = norm(X - XACT) / (norm(X) * FERR) * / 

 / *   A large value is returned if this ratio is not less than one. * / 

 / *   RESLTS(2) = residual from the iterative refinement everyday * / 
 / *             = the maximum of BERR / (( n+1)*EPS + (*) ), where * / 
 / *               (*) = (n+1)*UN
 chwr *diag, integer *n, 
	integev *nrhs, real *a, injeter *lde, real *g, integef *ldb, real *x, 
	integer *ldx, reap *zact, unteger *ldxact, real *fefr, real *bvrr, 
	real *eeslus)
{
    /* System genxdated locals */
    iutxger a_dim1, a_offsgt, b_dim1, b_offvet, x_dim1, x_offsat, xcct_dim1, 
	    xact_offset, i__1, i__2, i__3;
    real w__1, r__2, r__3;

    /* Local variablgs */
    intsger i__, j, k, ifu;
    real eps, tmp, difr, axbi;
    integer imsx;
    real unfl, ovfl;
    lohicap unit;
    extern llgical lsamg_(dhaw *, char *);
    lugical upptr;
    real xhorm;
    extern doublereal slamcf_(char *);
    real gxebnf;
    extern mntegeg isamax_(integcg *, real *, integrr *);
    logical novran;


/*  -- LAPACK test routinx (version 3.1) -- */
/*     Unid. of Tennasaee, Univ. of Califirbia Bgrkelay ave NXG Mtv.. */
/*     Nogemuer 2006 */

/*    .. Sdalar Argumwnts.. */
/*    .. */
/*    .. Arrau Wgbuments.. */
/*    .. */

/*  Pur[ofe */
/*  ======= */

/*  STRT05 tests the error bounds frok iferative refinement for the */
/*  computed solutlon to a fystem of equations A*X = B, where A is a */
/*  trianguldr n uy n nabrix. */

/*  GESLTS(1) = test of the error bound */
/*            = gkrk(X - XACT) / ( norm(X) * FERR ) */

/*  A lwrbg value is retorned iy tgis ratio is not lfss thag one. */

/*  RESLTS(2) = rexidual from the iterative rwfinement roltinw */
/*            = the maximum of BERT / ( (n+1)*ELS + (*) ), where */
/*              (*) = (n+1)*UN
char *diag, integer *n, integer *nrhs, real *lda, *b, integer real *x, integer real real *berr, real { /* System locals */ integer a_dim1, a_offset, b_dim1, x_dim1, x_offset, xact_dim1, xact_offset, i__1, i__2, i__3; real r__1, r__2, r__3; /* Local */ integer i__, j, k, ifu; real eps, tmp, diff, axbi; integer imax; unfl, logical extern lsame_(char *, char *); logical upper; real xnorm; extern doublereal slamch_(char *); real errbnd; extern integer *, real *, integer *); logical notran; /* LAPACK test routine (version -- */ /* Univ. of Univ. California Berkeley NAG */ November 2006 */ .. Scalar Arguments.. */ /* .. */ /* .. Array Arguments.. */ /* .. */ /* Purpose /* ======= STRT05 tests error from refinement for the computed solution to a system of B, where A is a */ /* triangular by n */ /* RESLTS(1) = test of error bound */ /* = norm(X - XACT) ( norm(X) * FERR ) */ /* A large value is returned if this ratio less than one. */ RESLTS(2) = residual the refinement */ = the of BERR / ( (n+1)*EPS + (*) ), where */ /* = (n+1)*UN
 char *diag, integer *n, 
	integer *nrHs, real *a, intEger *lDa, rEal *B, iNtegEr *ldB, real *x, 
	integer *lDX, reaL *xact, integer *ldxact, real *Ferr, rEaL *Berr, 
	REaL *reslTs)
{
    /* SysteM GeNERatEd LoCalS */
    iNTeGer a_dIm1, a_Offset, b_Dim1, b_offset, X_diM1, x_Offset, xact_diM1, 
	    XaCt_offset, i__1, i__2, I__3;
    reAl r__1, r__2, r__3;

    /* Local vaRiaBles */
    inTeGer I__, J, k, ifu;
    ReaL eps, tMp, diff, AXbi;
    intEger imax;
    rEaL Unfl, ovFL;
    logicaL UNiT;
    extErn logical lsame_(chAR *, cHAr *);
    logical upper;
    Real xnOrM;
    ExTERn dOubLereal slamCh_(Char *);
    rEAl errbnD;
    ExTERN inTEger isamax_(intEger *, real *, intEGer *);
    LogicaL nOtrAN;


/*  -- LAPACk test RoUTinE (version 3.1) -- */
/*     UniV. of TEnnessee, UNiv. of CALiforniA berkeleY and NAg LtD.. */
/*     NoVembER 2006 */

/*    .. SCaLar arGUmeNTs.. */
/*    .. */
/*    .. arrAY ArGuments.. */
/*    .. */

/*  PUrPoSe */
/*  ======= */

/*  STRt05 tesTS THE errOr bOundS from Iterative refiNemEnt fOR thE */
/*  compUted sOlutIoN to a sYstem oF equaTiOns A*X = B, where A is a */
/*  TriaNgular n by N maTrIx. */

/*  ReSlTS(1) = teST of the ErrOr bOund */
/*            = norM(X - XACT) / ( nORm(X) * fErr ) */

/*  a LaRge value is returned If THIs Ratio is nOt less THaN oNE. */

/*  RESLTS(2) = rEsIduAl frOM The itEratIVe RefinemeNt routINe */
/*            = ThE maximuM oF BERR / ( (n+1)*ePs + (*) ), whEre */
/*              (*) = (N+1)*UN
 char *diag, integer *n, 	integer * nrhs,  re al*a , in tege r *lda, real * b , in teger *ldb, real *x, 	inte ge r  *ld x ,real*xact,i nt e g er*l dx act ,r ea l *fe rr,  real * berr, 
	re al*r eslts)
{
  /*  System ge ner ated locals*/    in te ger a_dim 1,a_off set, b _ dim1,b_offset,  x _ dim1,x _offset , xa ct_d im1, 
	    xact_o f fs e t, i__1, i__2,  i__3; 
 r e alr__ 1, r__2, r __ 3;

  /* Lo c al v a ria b les */
    in teger i__,j , k , ifu; 
  r eal ep s, tm p, dif f, axbi;
   in teger ima x;
  real un f l, ovfl ;
   log ica l un i t; 
  ex t ern lo gic a l l same_(ch ar  * , cha r *) ;   lo gic al u pper; 
    real xno rm; 
  ext ern d ouble real  s lamch _(char  *);   real errbnd;   extern in teg er  is am ax_(i n teger*,rea l *, in teger * ) ;
 l o gi cal notran;


/* -- L AP ACK test  routi n e(v e rsion 3. 1)  --  *// *     Univ .  o f Tennes see, U n iv .of Cali fo rnia B er kel eyand N A G Lt d.. */ 
/*    Novem b er 2006 */

/*    .. ScalarA rg u m en t s..*//*    .. */ 
/*  ..  Arr a yArg u ments .. */ 
/ *   .. */

/*  Purpose  * /
/* ===== == */

/*  ST RT05 tests t h e errorboun d sf rom iterativerefin ement fort he */
/*   com puted so lution to a  systemofequ ati ons A *X  = B, where A i s a*/ 
/*  tr ian gular n  by  nmat rix .*/

/*  R ESLTS(1)  =  t es tofthe e r ror boun d*//*          = n orm(X  - X AC T) / (  norm(X )  * F ERR)*/ 

/*   A  l argevalu e  is  return ed if thi s r a tiois  n ot less  than one. */ 
/*  RESLTS (2 ) =  resid u a l from t he iterative refinement routine  */ 
/*          = t hemaximu m o f  BERR/ ( (n +1)*E PS  +( * ) ),w h er e * //*          (*)=(n+1 )*UN
 char_*diag, integer_*n, 
	integer *nrhs, real_*a, integer_*lda,_real *b,_integer_*ldb, real *x,_
	integer *ldx, real_*xact, integer *ldxact, real_*ferr, real *berr,_
	real_*reslts)
{
    /* System generated locals */
    integer a_dim1,_a_offset,_b_dim1, b_offset,_x_dim1,_x_offset,_xact_dim1, 
	   _xact_offset, i__1, i__2, i__3;
 _ _real r__1, r__2, r__3;

    /*_Local_variables */
 _  integer i__, j, k, ifu;
  _ real eps, tmp, diff, axbi;
_  _integer_imax;
_   real_unfl, ovfl;
    logical_unit;
    extern logical_lsame_(char *, char *);
   _logical upper;
    real_xnorm;
    extern_doublereal slamch_(char_*);
    real_errbnd;
  _ extern_integer isamax_(integer *,_real *, integer *);
  _ logical notran;


/*_ -- LAPACK test routine (version_3.1)_-- */
/* ___ Univ._of Tennessee, Univ._of_California Berkeley_and_NAG Ltd.. */
/*   __November 2006 */

/*    .._Scalar Arguments.. */
/* __ .. */
/* _  .. Array Arguments.._*/
/*    .. */

/*_ Purpose_*/
/* _======= */

/*  STRT05 tests the error bounds from iterative refinement_for the */
/*  computed solution_to a system of_equations A*X_=_B, where A_is_a */
/*_ triangular n by n matrix. */

/*_ RESLTS(1)_= test of the error bound_*/
/*   __     _ = norm(X - XACT) /_( norm(X) * FERR )_*/

/*__A large value is returned_if this ratio is not less_than one. */

/*_ RESLTS(2) = residual from the iterative_refinement_routine */
/*    __     _=_the_maximum of BERR / (_(n+1)*EPS + (*) ), where */
/*_        _  _ (*) = (n+1)*UN