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

## ◆ zchkbk()

 subroutine zchkbk ( integer NIN, integer NOUT )

ZCHKBK

Purpose:
``` ZCHKBK tests ZGEBAK, a routine for backward transformation of
the computed right or left eigenvectors if the original matrix
was preprocessed by balance subroutine ZGEBAL.```
Parameters
 [in] NIN ``` NIN is INTEGER The logical unit number for input. NIN > 0.``` [in] NOUT ``` NOUT is INTEGER The logical unit number for output. NOUT > 0.```

Definition at line 54 of file zchkbk.f.

55*
56* -- LAPACK test routine --
57* -- LAPACK is a software package provided by Univ. of Tennessee, --
58* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
59*
60* .. Scalar Arguments ..
61 INTEGER NIN, NOUT
62* ..
63*
64* ======================================================================
65*
66* .. Parameters ..
67 INTEGER LDE
68 parameter( lde = 20 )
69 DOUBLE PRECISION ZERO
70 parameter( zero = 0.0d0 )
71* ..
72* .. Local Scalars ..
73 INTEGER I, IHI, ILO, INFO, J, KNT, N, NINFO
74 DOUBLE PRECISION EPS, RMAX, SAFMIN, VMAX, X
75 COMPLEX*16 CDUM
76* ..
77* .. Local Arrays ..
78 INTEGER LMAX( 2 )
79 DOUBLE PRECISION SCALE( LDE )
80 COMPLEX*16 E( LDE, LDE ), EIN( LDE, LDE )
81* ..
82* .. External Functions ..
83 DOUBLE PRECISION DLAMCH
84 EXTERNAL dlamch
85* ..
86* .. External Subroutines ..
87 EXTERNAL zgebak
88* ..
89* .. Intrinsic Functions ..
90 INTRINSIC abs, dble, dimag, max
91* ..
92* .. Statement Functions ..
93 DOUBLE PRECISION CABS1
94* ..
95* .. Statement Function definitions ..
96 cabs1( cdum ) = abs( dble( cdum ) ) + abs( dimag( cdum ) )
97* ..
98* .. Executable Statements ..
99*
100 lmax( 1 ) = 0
101 lmax( 2 ) = 0
102 ninfo = 0
103 knt = 0
104 rmax = zero
105 eps = dlamch( 'E' )
106 safmin = dlamch( 'S' )
107*
108 10 CONTINUE
109*
110 READ( nin, fmt = * )n, ilo, ihi
111 IF( n.EQ.0 )
112 \$ GO TO 60
113*
114 READ( nin, fmt = * )( scale( i ), i = 1, n )
115 DO 20 i = 1, n
116 READ( nin, fmt = * )( e( i, j ), j = 1, n )
117 20 CONTINUE
118*
119 DO 30 i = 1, n
120 READ( nin, fmt = * )( ein( i, j ), j = 1, n )
121 30 CONTINUE
122*
123 knt = knt + 1
124 CALL zgebak( 'B', 'R', n, ilo, ihi, scale, n, e, lde, info )
125*
126 IF( info.NE.0 ) THEN
127 ninfo = ninfo + 1
128 lmax( 1 ) = knt
129 END IF
130*
131 vmax = zero
132 DO 50 i = 1, n
133 DO 40 j = 1, n
134 x = cabs1( e( i, j )-ein( i, j ) ) / eps
135 IF( cabs1( e( i, j ) ).GT.safmin )
136 \$ x = x / cabs1( e( i, j ) )
137 vmax = max( vmax, x )
138 40 CONTINUE
139 50 CONTINUE
140*
141 IF( vmax.GT.rmax ) THEN
142 lmax( 2 ) = knt
143 rmax = vmax
144 END IF
145*
146 GO TO 10
147*
148 60 CONTINUE
149*
150 WRITE( nout, fmt = 9999 )
151 9999 FORMAT( 1x, '.. test output of ZGEBAK .. ' )
152*
153 WRITE( nout, fmt = 9998 )rmax
154 9998 FORMAT( 1x, 'value of largest test error = ', d12.3 )
155 WRITE( nout, fmt = 9997 )lmax( 1 )
156 9997 FORMAT( 1x, 'example number where info is not zero = ', i4 )
157 WRITE( nout, fmt = 9996 )lmax( 2 )
158 9996 FORMAT( 1x, 'example number having largest error = ', i4 )
159 WRITE( nout, fmt = 9995 )ninfo
160 9995 FORMAT( 1x, 'number of examples where info is not 0 = ', i4 )
161 WRITE( nout, fmt = 9994 )knt
162 9994 FORMAT( 1x, 'total number of examples tested = ', i4 )
163*
164 RETURN
165*
166* End of ZCHKBK
167*
logical function lde(RI, RJ, LR)
Definition: dblat2.f:2970
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:69
subroutine zgebak(JOB, SIDE, N, ILO, IHI, SCALE, M, V, LDV, INFO)
ZGEBAK
Definition: zgebak.f:131
Here is the call graph for this function:
Here is the caller graph for this function: