LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ ctpt06()

 subroutine ctpt06 ( real RCOND, real RCONDC, character UPLO, character DIAG, integer N, complex, dimension( * ) AP, real, dimension( * ) RWORK, real RAT )

CTPT06

Purpose:
CTPT06 computes a test ratio comparing RCOND (the reciprocal
condition number of the triangular matrix A) and RCONDC, the estimate
computed by CTPCON.  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 REAL 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 REAL The estimate of the reciprocal condition number computed by CTPCON. [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 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 REAL array, dimension (N) [out] RAT RAT is REAL 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 ctpt06.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 REAL RAT, RCOND, RCONDC
121* ..
122* .. Array Arguments ..
123 REAL RWORK( * )
124 COMPLEX AP( * )
125* ..
126*
127* =====================================================================
128*
129* .. Parameters ..
130 REAL ZERO, ONE
131 parameter( zero = 0.0e+0, one = 1.0e+0 )
132* ..
133* .. Local Scalars ..
134 REAL ANORM, BIGNUM, EPS, RMAX, RMIN
135* ..
136* .. External Functions ..
137 REAL CLANTP, SLAMCH
138 EXTERNAL clantp, slamch
139* ..
140* .. Intrinsic Functions ..
141 INTRINSIC max, min
142* ..
143* .. Executable Statements ..
144*
145 eps = slamch( '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 / slamch( 'Safe minimum' )
178 anorm = clantp( '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 CTPT06
186*
real function clantp(NORM, UPLO, DIAG, N, AP, WORK)
CLANTP returns the value of the 1-norm, or the Frobenius norm, or the infinity norm,...
Definition: clantp.f:125
real function slamch(CMACH)
SLAMCH
Definition: slamch.f:68
Here is the caller graph for this function: