LAPACK 3.12.0
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches

◆ stest()

subroutine stest ( integer  len,
double precision, dimension(len)  scomp,
double precision, dimension(len)  strue,
double precision, dimension(len)  ssize,
double precision  sfac 
)

Definition at line 942 of file dblat1.f.

943* ********************************* STEST **************************
944*
945* THIS SUBR COMPARES ARRAYS SCOMP() AND STRUE() OF LENGTH LEN TO
946* SEE IF THE TERM BY TERM DIFFERENCES, MULTIPLIED BY SFAC, ARE
947* NEGLIGIBLE.
948*
949* C. L. LAWSON, JPL, 1974 DEC 10
950*
951* .. Parameters ..
952 INTEGER NOUT
953 DOUBLE PRECISION ZERO
954 parameter(nout=6, zero=0.0d0)
955* .. Scalar Arguments ..
956 DOUBLE PRECISION SFAC
957 INTEGER LEN
958* .. Array Arguments ..
959 DOUBLE PRECISION SCOMP(LEN), SSIZE(LEN), STRUE(LEN)
960* .. Scalars in Common ..
961 INTEGER ICASE, INCX, INCY, N
962 LOGICAL PASS
963* .. Local Scalars ..
964 DOUBLE PRECISION SD
965 INTEGER I
966* .. External Functions ..
967 DOUBLE PRECISION SDIFF
968 EXTERNAL sdiff
969* .. Intrinsic Functions ..
970 INTRINSIC abs
971* .. Common blocks ..
972 COMMON /combla/icase, n, incx, incy, pass
973* .. Executable Statements ..
974*
975 DO 40 i = 1, len
976 sd = scomp(i) - strue(i)
977 IF (abs(sfac*sd) .LE. abs(ssize(i))*epsilon(zero))
978 + GO TO 40
979*
980* HERE SCOMP(I) IS NOT CLOSE TO STRUE(I).
981*
982 IF ( .NOT. pass) GO TO 20
983* PRINT FAIL MESSAGE AND HEADER.
984 pass = .false.
985 WRITE (nout,99999)
986 WRITE (nout,99998)
987 20 WRITE (nout,99997) icase, n, incx, incy, i, scomp(i),
988 + strue(i), sd, ssize(i)
989 40 CONTINUE
990 RETURN
991*
99299999 FORMAT (' FAIL')
99399998 FORMAT (/' CASE N INCX INCY I ',
994 + ' COMP(I) TRUE(I) DIFFERENCE',
995 + ' SIZE(I)',/1x)
99699997 FORMAT (1x,i4,i3,2i5,i3,2d36.8,2d12.4)
997*
998* End of STEST
999*
real function sdiff(sa, sb)
Definition cblat1.f:701