 LAPACK  3.10.1 LAPACK: Linear Algebra PACKage

## ◆ ztpt06()

 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.```

Definition at line 111 of file ztpt06.f.

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