6943
6944
6945
6946
6947
6948
6949
6950 REAL ERRBND, PREC
6951 COMPLEX ALPHA, BETA, X, Y
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989 REAL ONE, TWO, ZERO
6990 parameter( one = 1.0e+0, two = 2.0e+0,
6991 $ zero = 0.0e+0 )
6992
6993
6994 REAL ADDBND, FACT, SUMINEG, SUMIPOS, SUMRNEG,
6995 $ SUMRPOS
6996 COMPLEX TMP
6997
6998
6999
7000
7001
7002 sumipos = zero
7003 sumineg = zero
7004 sumrpos = zero
7005 sumrneg = zero
7006 fact = one + two * prec
7007 addbnd = two * two * two * prec
7008
7009 tmp = alpha * x
7010 IF( real( tmp ).GE.zero ) THEN
7011 sumrpos = sumrpos + real( tmp ) * fact
7012 ELSE
7013 sumrneg = sumrneg - real( tmp ) * fact
7014 END IF
7015 IF( aimag( tmp ).GE.zero ) THEN
7016 sumipos = sumipos + aimag( tmp ) * fact
7017 ELSE
7018 sumineg = sumineg - aimag( tmp ) * fact
7019 END IF
7020
7021 tmp = beta * y
7022 IF( real( tmp ).GE.zero ) THEN
7023 sumrpos = sumrpos + real( tmp ) * fact
7024 ELSE
7025 sumrneg = sumrneg - real( tmp ) * fact
7026 END IF
7027 IF( aimag( tmp ).GE.zero ) THEN
7028 sumipos = sumipos + aimag( tmp ) * fact
7029 ELSE
7030 sumineg = sumineg - aimag( tmp ) * fact
7031 END IF
7032
7033 y = ( beta * y ) + ( alpha * x )
7034
7035 errbnd = addbnd *
max(
max( sumrpos, sumrneg ),
7036 $
max( sumipos, sumineg ) )
7037
7038 RETURN
7039
7040
7041