2523 DOUBLE PRECISION zero, one
2524 parameter ( zero = 0.0d0, one = 1.0d0 )
2526 DOUBLE PRECISION alpha, beta, eps, err
2527 INTEGER kk, lda, ldb, ldc, ldcc, m, n, nout
2529 CHARACTER*1 transa, transb
2531 DOUBLE PRECISION a( lda, * ), b( ldb, * ), c( ldc, * ),
2532 $ cc( ldcc, * ), ct( * ), g( * )
2534 DOUBLE PRECISION erri
2536 LOGICAL trana, tranb
2538 INTRINSIC abs, max, sqrt
2540 trana = transa.EQ.
'T'.OR.transa.EQ.
'C'
2541 tranb = transb.EQ.
'T'.OR.transb.EQ.
'C'
2553 IF( .NOT.trana.AND..NOT.tranb )
THEN
2556 ct( i ) = ct( i ) + a( i, k )*b( k, j )
2557 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( k, j ) )
2560 ELSE IF( trana.AND..NOT.tranb )
THEN
2563 ct( i ) = ct( i ) + a( k, i )*b( k, j )
2564 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( k, j ) )
2567 ELSE IF( .NOT.trana.AND.tranb )
THEN
2570 ct( i ) = ct( i ) + a( i, k )*b( j, k )
2571 g( i ) = g( i ) + abs( a( i, k ) )*abs( b( j, k ) )
2574 ELSE IF( trana.AND.tranb )
THEN
2577 ct( i ) = ct( i ) + a( k, i )*b( j, k )
2578 g( i ) = g( i ) + abs( a( k, i ) )*abs( b( j, k ) )
2583 ct( i ) = alpha*ct( i ) + beta*c( i, j )
2584 g( i ) = abs( alpha )*g( i ) + abs( beta )*abs( c( i, j ) )
2591 erri = abs( ct( i ) - cc( i, j ) )/eps
2592 IF( g( i ).NE.zero )
2593 $ erri = erri/g( i )
2594 err = max( err, erri )
2595 IF( err*sqrt( eps ).GE.one )
2607 WRITE( nout, fmt = 9999 )
2610 WRITE( nout, fmt = 9998 )i, ct( i ), cc( i, j )
2612 WRITE( nout, fmt = 9998 )i, cc( i, j ), ct( i )
2616 $
WRITE( nout, fmt = 9997 )j
2621 9999
FORMAT(
' ******* FATAL ERROR - COMPUTED RESULT IS LESS THAN HAL',
2622 $
'F ACCURATE *******', /
' EXPECTED RESULT COMPU',
2624 9998
FORMAT( 1x, i7, 2g18.6 )
2625 9997
FORMAT(
' THESE ARE THE RESULTS FOR COLUMN ', i3 )