2216 parameter ( zero = 0.0, one = 1.0 )
2218 REAL alpha, beta, eps, err
2219 INTEGER kk, lda, ldb, ldc, ldcc, m, n, nout
2221 CHARACTER*1 transa, transb
2223 REAL a( lda, * ), b( ldb, * ), c( ldc, * ),
2224 $ cc( ldcc, * ), ct( * ), g( * )
2228 LOGICAL trana, tranb
2230 INTRINSIC abs, max, sqrt
2232 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
2233 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
2245 IF( .NOT.trana.AND..NOT.tranb )
THEN
2248 ct( i ) = ct( i ) + a( i, k )*b( k, j )
2249 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( k, j ) )
2252 ELSE IF( trana.AND..NOT.tranb )
THEN
2255 ct( i ) = ct( i ) + a( k, i )*b( k, j )
2256 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( k, j ) )
2259 ELSE IF( .NOT.trana.AND.tranb )
THEN
2262 ct( i ) = ct( i ) + a( i, k )*b( j, k )
2263 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( j, k ) )
2266 ELSE IF( trana.AND.tranb )
THEN
2269 ct( i ) = ct( i ) + a( k, i )*b( j, k )
2270 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( j, k ) )
2275 ct( i ) = alpha*ct( i ) + beta*c( i, j )
2276 g( i ) = abs( alpha )*g( i ) + abs( beta )*abs( c( i, j ) )
2283 erri = abs( ct( i ) - cc( i, j ) )/eps
2284 IF( g( i ).NE.zero )
2285 $ erri = erri/g( i )
2286 err = max( err, erri )
2287 IF( err*sqrt( eps ).GE.one )
2299 WRITE( nout, fmt = 9999 )
2302 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
2304 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
2308 $
WRITE( nout, fmt = 9997 )j
2313 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2314 $
'F ACCURATE *******', /
' EXPECTED RESULT COMPU',
2316 9998
FORMAT( 1x, i7, 2g18.6 )
2317 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )