3077 parameter ( zero = ( 0.0d0, 0.0d0 ) )
3078 DOUBLE PRECISION rzero, rone
3079 parameter ( rzero = 0.0d0, rone = 1.0d0 )
3081 COMPLEX*16 alpha, beta
3082 DOUBLE PRECISION eps, err
3083 INTEGER kk, lda, ldb, ldc, ldcc, m, n, nout
3085 CHARACTER*1 transa, transb
3087 COMPLEX*16 a( lda, * ), b( ldb, * ), c( ldc, * ),
3088 $ cc( ldcc, * ), ct( * )
3089 DOUBLE PRECISION g( * )
3092 DOUBLE PRECISION erri
3094 LOGICAL ctrana, ctranb, trana, tranb
3096 INTRINSIC abs, dimag, dconjg, max, dble, sqrt
3098 DOUBLE PRECISION abs1
3100 abs1( cl ) = abs( dble( cl ) ) + abs( dimag( cl ) )
3102 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
3103 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
3104 ctrana = transa.EQ.
'C'
3105 ctranb = transb.EQ.
'C'
3117 IF( .NOT.trana.AND..NOT.tranb )
THEN
3120 ct( i ) = ct( i ) + a( i, k )*b( k, j )
3121 g( i ) = g( i ) + abs1( a( i, k ) )*abs1( b( k, j ) )
3124 ELSE IF( trana.AND..NOT.tranb )
THEN
3128 ct( i ) = ct( i ) + dconjg( a( k, i ) )*b( k, j )
3129 g( i ) = g( i ) + abs1( a( k, i ) )*
3136 ct( i ) = ct( i ) + a( k, i )*b( k, j )
3137 g( i ) = g( i ) + abs1( a( k, i ) )*
3142 ELSE IF( .NOT.trana.AND.tranb )
THEN
3146 ct( i ) = ct( i ) + a( i, k )*dconjg( b( j, k ) )
3147 g( i ) = g( i ) + abs1( a( i, k ) )*
3154 ct( i ) = ct( i ) + a( i, k )*b( j, k )
3155 g( i ) = g( i ) + abs1( a( i, k ) )*
3160 ELSE IF( trana.AND.tranb )
THEN
3165 ct( i ) = ct( i ) + dconjg( a( k, i ) )*
3166 $ dconjg( b( j, k ) )
3167 g( i ) = g( i ) + abs1( a( k, i ) )*
3174 ct( i ) = ct( i ) + dconjg( a( k, i ) )*
3176 g( i ) = g( i ) + abs1( a( k, i ) )*
3185 ct( i ) = ct( i ) + a( k, i )*
3186 $ dconjg( b( j, k ) )
3187 g( i ) = g( i ) + abs1( a( k, i ) )*
3194 ct( i ) = ct( i ) + a( k, i )*b( j, k )
3195 g( i ) = g( i ) + abs1( a( k, i ) )*
3203 ct( i ) = alpha*ct( i ) + beta*c( i, j )
3204 g( i ) = abs1( alpha )*g( i ) +
3205 $ abs1( beta )*abs1( c( i, j ) )
3212 erri = abs1( ct( i ) - cc( i, j ) )/eps
3213 IF( g( i ).NE.rzero )
3214 $ erri = erri/g( i )
3215 err = max( err, erri )
3216 IF( err*sqrt( eps ).GE.rone )
3228 WRITE( nout, fmt = 9999 )
3231 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
3233 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
3237 $
WRITE( nout, fmt = 9997 )j
3242 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
3243 $
'F ACCURATE *******', /
' EXPECTED RE',
3244 $
'SULT COMPUTED RESULT' )
3245 9998
FORMAT( 1x, i7, 2(
' (', g15.6,
',', g15.6,
')' ) )
3246 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )