LAPACK  3.6.1
LAPACK: Linear Algebra PACKage
subroutine ztpt06 ( double precision  RCOND,
double precision  RCONDC,
character  UPLO,
character  DIAG,
integer  N,
complex*16, dimension( * )  AP,
double precision, dimension( * )  RWORK,
double precision  RAT 
)

ZTPT06

Purpose:
 ZTPT06 computes a test ratio comparing RCOND (the reciprocal
 condition number of the triangular matrix A) and RCONDC, the estimate
 computed by ZTPCON.  Information about the triangular matrix is used
 if one estimate is zero and the other is non-zero to decide if
 underflow in the estimate is justified.
Parameters
[in]RCOND
          RCOND is DOUBLE PRECISION
          The estimate of the reciprocal condition number obtained by
          forming the explicit inverse of the matrix A and computing
          RCOND = 1/( norm(A) * norm(inv(A)) ).
[in]RCONDC
          RCONDC is DOUBLE PRECISION
          The estimate of the reciprocal condition number computed by
          ZTPCON.
[in]UPLO
          UPLO is CHARACTER
          Specifies whether the matrix A is upper or lower triangular.
          = 'U':  Upper triangular
          = 'L':  Lower triangular
[in]DIAG
          DIAG is CHARACTER
          Specifies whether or not the matrix A is unit triangular.
          = 'N':  Non-unit triangular
          = 'U':  Unit triangular
[in]N
          N is INTEGER
          The order of the matrix A.  N >= 0.
[in]AP
          AP is COMPLEX*16 array, dimension (N*(N+1)/2)
          The upper or lower triangular matrix A, packed columnwise in
          a linear array.  The j-th column of A is stored in the array
          AP as follows:
          if UPLO = 'U', AP((j-1)*j/2 + i) = A(i,j) for 1<=i<=j;
          if UPLO = 'L',
             AP((j-1)*(n-j) + j*(j+1)/2 + i-j) = A(i,j) for j<=i<=n.
[out]RWORK
          RWORK is DOUBLE PRECISION array, dimension (N)
[out]RAT
          RAT is DOUBLE PRECISION
          The test ratio.  If both RCOND and RCONDC are nonzero,
             RAT = MAX( RCOND, RCONDC )/MIN( RCOND, RCONDC ) - 1.
          If RAT = 0, the two estimates are exactly the same.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
November 2011

Definition at line 114 of file ztpt06.f.

114 *
115 * -- LAPACK test routine (version 3.4.0) --
116 * -- LAPACK is a software package provided by Univ. of Tennessee, --
117 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
118 * November 2011
119 *
120 * .. Scalar Arguments ..
121  CHARACTER diag, uplo
122  INTEGER n
123  DOUBLE PRECISION rat, rcond, rcondc
124 * ..
125 * .. Array Arguments ..
126  DOUBLE PRECISION rwork( * )
127  COMPLEX*16 ap( * )
128 * ..
129 *
130 * =====================================================================
131 *
132 * .. Parameters ..
133  DOUBLE PRECISION zero, one
134  parameter ( zero = 0.0d+0, one = 1.0d+0 )
135 * ..
136 * .. Local Scalars ..
137  DOUBLE PRECISION anorm, bignum, eps, rmax, rmin
138 * ..
139 * .. External Functions ..
140  DOUBLE PRECISION dlamch, zlantp
141  EXTERNAL dlamch, zlantp
142 * ..
143 * .. Intrinsic Functions ..
144  INTRINSIC max, min
145 * ..
146 * .. Executable Statements ..
147 *
148  eps = dlamch( 'Epsilon' )
149  rmax = max( rcond, rcondc )
150  rmin = min( rcond, rcondc )
151 *
152 * Do the easy cases first.
153 *
154  IF( rmin.LT.zero ) THEN
155 *
156 * Invalid value for RCOND or RCONDC, return 1/EPS.
157 *
158  rat = one / eps
159 *
160  ELSE IF( rmin.GT.zero ) THEN
161 *
162 * Both estimates are positive, return RMAX/RMIN - 1.
163 *
164  rat = rmax / rmin - one
165 *
166  ELSE IF( rmax.EQ.zero ) THEN
167 *
168 * Both estimates zero.
169 *
170  rat = zero
171 *
172  ELSE
173 *
174 * One estimate is zero, the other is non-zero. If the matrix is
175 * ill-conditioned, return the nonzero estimate multiplied by
176 * 1/EPS; if the matrix is badly scaled, return the nonzero
177 * estimate multiplied by BIGNUM/TMAX, where TMAX is the maximum
178 * element in absolute value in A.
179 *
180  bignum = one / dlamch( 'Safe minimum' )
181  anorm = zlantp( 'M', uplo, diag, n, ap, rwork )
182 *
183  rat = rmax*( min( bignum / max( one, anorm ), one / eps ) )
184  END IF
185 *
186  RETURN
187 *
188 * End of ZTPT06
189 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
double precision function zlantp(NORM, UPLO, DIAG, N, AP, WORK)
ZLANTP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm, or the element of largest absolute value of a triangular matrix supplied in packed form.
Definition: zlantp.f:127

Here is the caller graph for this function: