#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of shell archive."
# Contents:  Fwhetd.f Fwhets.f Makefile _second.c second.c second.ucb.c
#   tcorl.c temp.f test.c
# Wrapped by web@kivax on Mon Feb 12 07:34:35 1990
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f Fwhetd.f -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Fwhetd.f\"
else
echo shar: Extracting \"Fwhetd.f\" \(4645 characters\)
sed "s/^X//" >Fwhetd.f <<'END_OF_Fwhetd.f'
XC The following line is for the Lawrence Livermore Labs Fortran Compiler
XC*$*OPTION FREE FORMAT              
XC
XC	WHETSTONE BENCHMARK
XC
XC	DOUBLE PRECISION VERSION
XC
XC	This program is the result of extensive research to
XC	determine the instruction mix of a typical Fortran
XC	program.  The results of this program on different
XC	machines should give a good indication of which
XC	machine performs better under a typical load of
XC	Fortran programs.  The statements are purposely
XC	arranged to defeat optimization by the compiler.
XC
X	DOUBLE PRECISION X1,X2,X3,X4,X,Y,Z,T,T1,T2,E1
X	DIMENSION CPU(2)
X	COMMON T,T1,T2,E1(4),J,K,L
XC
X	     T  = 0.499975	D00
X	     T1 = 0.50025	D00
X	     T2 = 2.0		D00
X	     PRINT 999
X999	     FORMAT (// ' WHETSTONE BENCHMARK (DOUBLE PRECISION)')
X1            PRINT 1000
X1000	     FORMAT (// ' NUMBER OF ITERATIONS? ')
X	     READ 1001, ITER
X1001	     FORMAT (I8)
X	     IPASS = 1
XC
X5	     IF (IPASS.EQ.2) ITER = ITER + 10
X	     IF (IPASS.EQ.2) PRINT 1002, ITER
X1002	     FORMAT (' PASS 2:', I10, ' ITERATIONS'/)
X	     I = ITER
X10	     SSEC = SECOND()
XC
X	N1  = 0
X	N2  = 12 * I
X	N3  = 14 * I
X	N4  = 345 * I
X	N5  = 0
X	N6  = 210 * I
X	N7  = 32 * I
X	N8  = 899 * I
X	N9  = 616 * I
X	N10 = 0
X	N11 = 93 * I
X	N12 = 0
XC
X	X1  =  1.0D0
X	X2  = -1.0D0
X	X3  = -1.0D0
X	X4  = -1.0D0
XC
X	IF (N1) 19, 19, 11
X11	DO 18 I = 1, N1, 1
X	    X1 = (X1 + X2 + X3 - X4) * T
X	    X2 = (X1 + X2 - X3 + X4) * T
X	    X4 = (-X1+ X2 + X3 + X4) * T
X	    X3 = (X1 - X2 + X3 + X4) * T
X18	CONTINUE
X19	CONTINUE
X	CALL POUT(N1,N1,N1,X1,X2,X3,X4)
XC
X	E1(1) =  1.0 D0
X	E1(2) = -1.0 D0
X	E1(3) = -1.0 D0
X	E1(4) = -1.0 D0
X	IF (N2) 29, 29, 21
X21	DO 28 I = 1, N2, 1
X	    E1(1) = ( E1(1) + E1(2) + E1(3) - E1(4)) * T
X	    E1(2) = ( E1(1) + E1(2) - E1(3) + E1(4)) * T
X	    E1(3) = ( E1(1) - E1(2) + E1(3) + E1(4)) * T
X	    E1(4) = (-E1(1) + E1(2) + E1(3) + E1(4)) * T
X28	CONTINUE
X29 	CONTINUE
X	CALL POUT(N2,N3,N2,E1(1),E1(2),E1(3),E1(4))
XC
X	IF (N3) 39, 39, 31
X31	DO 38 I = 1, N3, 1
X38	    CALL PA(E1)
X39	CONTINUE
X	CALL POUT(N3,N2,N2,E1(1),E1(2),E1(3),E1(4))
XC
X	J = 1
X	IF (N4) 49, 49, 41
X41	DO 48 I = 1, N4, 1
X	    IF (J-1) 43, 42, 43
X42	    J = 2
X	    GO TO 44
X43	    J = 3
X44	    IF (J-2) 46, 46, 45
X45	    J = 0
X	    GO TO 47
X46	    J = 1
X47	    IF (J-1) 411, 412, 412
X411	    J = 1
X	    GO TO 48
X412	    J = 0
X48	CONTINUE
X49	CONTINUE
X	CALL POUT(N4,J,J,X1,X2,X3,X4)
XC
X	J = 1
X	K = 2
X	L = 3
X	IF (N6) 69, 69, 61
X61	DO 68 I = 1, N6, 1
X	    J = J * (K-J) * (L-K)
X	    K = L * K - (L-J) * K
X	    L = (L-K) * (K+J)
X	    E1(L-1) = J + K + L
X	    E1(K-1) = J * K * L
X68	CONTINUE
X69	CONTINUE
X	CALL POUT(N6,J,K,E1(1),E1(2),E1(3),E1(4))
XC
X	X = 0.5 D0
X	Y = 0.5 D0
X	IF (N7) 79, 79, 71
X71	DO 78 I = 1, N7, 1
X	    X = T * DATAN(T2*DSIN(X)*DCOS(X)/(DCOS(X+Y)+DCOS(X-Y)-1.0D0))
X	    Y = T * DATAN(T2*DSIN(Y)*DCOS(Y)/(DCOS(X+Y)+DCOS(X-Y)-1.0D0))
X78	CONTINUE
X79	CONTINUE
X	CALL POUT(N7,J,K,X,X,Y,Y)
XC
X	X = 1.0 D0
X	Y = 1.0 D0
X	Z = 1.0 D0
X	IF (N8) 89, 89, 81
X81	DO 88 I = 1, N8, 1
X88	    CALL P3(X,Y,Z)
X89	CONTINUE
X	CALL POUT(N8,J,K,X,Y,Z,Z)
XC
X	J = 1
X	K = 2
X	L = 3
X	E1(1) = 1.0 D0
X	E1(2) = 2.0 D0
X	E1(3) = 3.0 D0
X	IF (N9) 99, 99, 91
X91	DO 98 I = 1, N9, 1
X98	    CALL P0
X99	CONTINUE
X	CALL POUT(N9,J,K,E1(1),E1(2),E1(3),E1(4))
XC
X	J = 2
X	K = 3
X	IF (N10) 109, 109, 101
X101	DO 108 I = 1, N10, 1
X	    J = J + K
X	    K = J + K
X	    J = J - K
X	    K = K - J - J
X108	CONTINUE
X109	CONTINUE
X	CALL POUT(N10,J,K,X1,X2,X3,X4)
XC
X	X = 0.75 D0
X	IF (N11) 119, 119, 111
X111	DO 118 I = 1, N11, 1
X118	    X = DSQRT(DEXP(DLOG(X)/T1))
X119	CONTINUE
X	CALL POUT(N11,J,K,X,X,X,X)
XC
X	    FSEC = SECOND()
X	    CPU(IPASS) = FSEC - SSEC
X	    PRINT 2000, IPASS, CPU(IPASS)
X2000	    FORMAT (/ ' PASS',I2,':',F10.4,' SEC CPU TIME'//)
X	    IPASS = IPASS + 1
X	    IF (IPASS.LE.2) GO TO 5
XC
X	    WIPS = 1000.0 / (CPU(2) - CPU(1))
X	    PRINT 3000, WIPS
X3000	    FORMAT (// ' WHETSTONE INSTRUCTIONS PER SECOND:', F7.1)
XC
X	STOP 'END DOUBLE-PRECISION TEST'
X	END
XC
X	SUBROUTINE PA(E)
X	DOUBLE PRECISION T, T1, T2, E
X	COMMON T, T1, T2
X	DIMENSION E(4)
X	J = 0
X1	E(1) = ( E(1) + E(2) + E(3) - E(4)) * T
X	E(2) = ( E(1) + E(2) - E(3) + E(4)) * T
X	E(3) = ( E(1) - E(2) + E(3) + E(4)) * T
X	E(4) = (-E(1) + E(2) + E(3) + E(4)) / T2
X	J = J + 1
X	IF (J-6) 1, 2, 2
X2	CONTINUE
X	RETURN
X	END
XC
X	SUBROUTINE P0
X	DOUBLE PRECISION T, T1, T2, E1
X	COMMON T, T1, T2, E1(4), J, K, L
X	E1(J) = E1(K)
X	E1(K) = E1(L)
X	E1(L) = E1(J)
X	RETURN
X	END
XC
X	SUBROUTINE P3(X,Y,Z)
X	DOUBLE PRECISION T, T1, T2, X1, Y1, X, Y, Z
X	COMMON T, T1, T2
X	X1 = X
X	Y1 = Y
X	X1 = T * (X1 + Y1)
X	Y1 = T * (X1 + Y1)
X	Z  = (X1 + Y1) / T2
X	RETURN
X	END
XC
X	SUBROUTINE POUT(N,J,K,X1,X2,X3,X4)
X	DOUBLE PRECISION X1, X2, X3, X4
X	PRINT 3000, N, J, K, X1, X2, X3, X4
X3000	FORMAT(1H , 3I7, 4E12.4)
X	RETURN
X	END
END_OF_Fwhetd.f
if test 4645 -ne `wc -c <Fwhetd.f`; then
    echo shar: \"Fwhetd.f\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Fwhets.f -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Fwhets.f\"
else
echo shar: Extracting \"Fwhets.f\" \(4398 characters\)
sed "s/^X//" >Fwhets.f <<'END_OF_Fwhets.f'
XC The following line is for the Lawrence Livermore Labs Fortran Compiler
XC*$*OPTION FREE FORMAT              
XC
XC	WHETSTONE BENCHMARK
XC
XC	SINGLE-PRECISION VERSION
XC
XC	This program is the result of extensive research to
XC	determine the instruction mix of a typical Fortran
XC	program.  The results of this program on different
XC	machines should give a good indication of which
XC	machine performs better under a typical load of
XC	Fortran programs.  The statements are purposely
XC	arranged to defeat optimization by the compiler.
XC
X	DIMENSION CPU(2)
X	COMMON T,T1,T2,E1(4),J,K,L
XC
X	     T  = 0.499975	
X	     T1 = 0.50025	
X	     T2 = 2.0	
X	     PRINT 999
X999	     FORMAT (// ' WHETSTONE BENCHMARK (SINGLE PRECISION)')
X1            PRINT 1000
X1000	     FORMAT (// ' NUMBER OF ITERATIONS? ')
X	     READ 1001, ITER
X1001	     FORMAT (I8)
X	     IPASS = 1
XC
X5	     IF (IPASS.EQ.2) ITER = ITER + 10
X	     IF (IPASS.EQ.2) PRINT 1002, ITER
X1002	     FORMAT (' PASS 2:', I10, ' ITERATIONS'/)
X	     I = ITER
X10	     SSEC = SECOND()
XC
X	N1  = 0
X	N2  = 12 * I
X	N3  = 14 * I
X	N4  = 345 * I
X	N5  = 0
X	N6  = 210 * I
X	N7  = 32 * I
X	N8  = 899 * I
X	N9  = 616 * I
X	N10 = 0
X	N11 = 93 * I
X	N12 = 0
XC
X	X1  =  1.0
X	X2  = -1.0
X	X3  = -1.0
X	X4  = -1.0
XC
X	IF (N1) 19, 19, 11
X11	DO 18 I = 1, N1, 1
X	    X1 = (X1 + X2 + X3 - X4) * T
X	    X2 = (X1 + X2 - X3 + X4) * T
X	    X4 = (-X1+ X2 + X3 + X4) * T
X	    X3 = (X1 - X2 + X3 + X4) * T
X18	CONTINUE
X19	CONTINUE
X	CALL POUT(N1,N1,N1,X1,X2,X3,X4)
XC
X	E1(1) =  1.0 
X	E1(2) = -1.0 
X	E1(3) = -1.0 
X	E1(4) = -1.0 
X	IF (N2) 29, 29, 21
X21	DO 28 I = 1, N2, 1
X	    E1(1) = ( E1(1) + E1(2) + E1(3) - E1(4)) * T
X	    E1(2) = ( E1(1) + E1(2) - E1(3) + E1(4)) * T
X	    E1(3) = ( E1(1) - E1(2) + E1(3) + E1(4)) * T
X	    E1(4) = (-E1(1) + E1(2) + E1(3) + E1(4)) * T
X28	CONTINUE
X29 	CONTINUE
X	CALL POUT(N2,N3,N2,E1(1),E1(2),E1(3),E1(4))
XC
X	IF (N3) 39, 39, 31
X31	DO 38 I = 1, N3, 1
X38	    CALL PA(E1)
X39	CONTINUE
X	CALL POUT(N3,N2,N2,E1(1),E1(2),E1(3),E1(4))
XC
X	J = 1
X	IF (N4) 49, 49, 41
X41	DO 48 I = 1, N4, 1
X	    IF (J-1) 43, 42, 43
X42	    J = 2
X	    GO TO 44
X43	    J = 3
X44	    IF (J-2) 46, 46, 45
X45	    J = 0
X	    GO TO 47
X46	    J = 1
X47	    IF (J-1) 411, 412, 412
X411	    J = 1
X	    GO TO 48
X412	    J = 0
X48	CONTINUE
X49	CONTINUE
X	CALL POUT(N4,J,J,X1,X2,X3,X4)
XC
X	J = 1
X	K = 2
X	L = 3
X	IF (N6) 69, 69, 61
X61	DO 68 I = 1, N6, 1
X	    J = J * (K-J) * (L-K)
X	    K = L * K - (L-J) * K
X	    L = (L-K) * (K+J)
X	    E1(L-1) = J + K + L
X	    E1(K-1) = J * K * L
X68	CONTINUE
X69	CONTINUE
X	CALL POUT(N6,J,K,E1(1),E1(2),E1(3),E1(4))
XC
X	X = 0.5 
X	Y = 0.5 
X	IF (N7) 79, 79, 71
X71	DO 78 I = 1, N7, 1
X	    X = T * ATAN(T2*SIN(X)*COS(X)/(COS(X+Y)+COS(X-Y)-1.0))
X	    Y = T * ATAN(T2*SIN(Y)*COS(Y)/(COS(X+Y)+COS(X-Y)-1.0))
X78	CONTINUE
X79	CONTINUE
X	CALL POUT(N7,J,K,X,X,Y,Y)
XC
X	X = 1.0 
X	Y = 1.0 
X	Z = 1.0 
X	IF (N8) 89, 89, 81
X81	DO 88 I = 1, N8, 1
X88	    CALL P3(X,Y,Z)
X89	CONTINUE
X	CALL POUT(N8,J,K,X,Y,Z,Z)
XC
X	J = 1
X	K = 2
X	L = 3
X	E1(1) = 1.0 
X	E1(2) = 2.00 
X	E1(3) = 3.0 
X	IF (N9) 99, 99, 91
X91	DO 98 I = 1, N9, 1
X98	    CALL P0
X99	CONTINUE
X	CALL POUT(N9,J,K,E1(1),E1(2),E1(3),E1(4))
XC
X	J = 2
X	K = 3
X	IF (N10) 109, 109, 101
X101	DO 108 I = 1, N10, 1
X	    J = J + K
X	    K = J + K
X	    J = J - K
X	    K = K - J - J
X108	CONTINUE
X109	CONTINUE
X	CALL POUT(N10,J,K,X1,X2,X3,X4)
XC
X	X = 0.75 
X	IF (N11) 119, 119, 111
X111	DO 118 I = 1, N11, 1
X118	    X = SQRT(EXP(ALOG(X)/T1))
X119	CONTINUE
X	CALL POUT(N11,J,K,X,X,X,X)
XC
X	    FSEC = SECOND()
X	    CPU(IPASS) = FSEC - SSEC
X	    PRINT 2000, IPASS, CPU(IPASS)
X2000	    FORMAT (/ ' PASS',I2,':',F10.4,' SEC CPU TIME'//)
X	    IPASS = IPASS + 1
X	    IF (IPASS.LE.2) GO TO 5
XC
X	    WIPS = 1000.0 / (CPU(2) - CPU(1))
X	    PRINT 3000, WIPS
X3000	    FORMAT (// ' WHETSTONE INSTRUCTIONS PER SECOND:', F7.1)
XC
X	STOP 'END SINGLE-PRECISION TEST'
X	END
XC
X	SUBROUTINE PA(E)
X	COMMON T, T1, T2
X	DIMENSION E(4)
X	J = 0
X1	E(1) = ( E(1) + E(2) + E(3) - E(4)) * T
X	E(2) = ( E(1) + E(2) - E(3) + E(4)) * T
X	E(3) = ( E(1) - E(2) + E(3) + E(4)) * T
X	E(4) = (-E(1) + E(2) + E(3) + E(4)) / T2
X	J = J + 1
X	IF (J-6) 1, 2, 2
X2	CONTINUE
X	RETURN
X	END
XC
X	SUBROUTINE P0
X	COMMON T, T1, T2, E1(4), J, K, L
X	E1(J) = E1(K)
X	E1(K) = E1(L)
X	E1(L) = E1(J)
X	RETURN
X	END
XC
X	SUBROUTINE P3(X,Y,Z)
X	COMMON T, T1, T2
X	X1 = X
X	Y1 = Y
X	X1 = T * (X1 + Y1)
X	Y1 = T * (X1 + Y1)
X	Z  = (X1 + Y1) / T2
X	RETURN
X	END
XC
X	SUBROUTINE POUT(N,J,K,X1,X2,X3,X4)
X	PRINT 3000, N, J, K, X1, X2, X3, X4
X3000	FORMAT(1H , 3I7, 4E12.4)
X	RETURN
X	END
END_OF_Fwhets.f
if test 4398 -ne `wc -c <Fwhets.f`; then
    echo shar: \"Fwhets.f\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f Makefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Makefile\"
else
echo shar: Extracting \"Makefile\" \(822 characters\)
sed "s/^X//" >Makefile <<'END_OF_Makefile'
XFFLAGS = -O -fT
XCFLAGS = -O -fT
XTIME = time
XSIZE = size
X
Xall: single double
X
Xsingle: $(FORT)Fwhets
X	echo 10 | $(FORT)Fwhets
X
XFwhets: f77Fwhets
X	rm -f Fwhets
X	ln f77Fwhets Fwhets
X
Xdouble: $(FORT)Fwhetd
X	echo 10 | $(FORT)Fwhetd
X
XFwhetd: f77Fwhetd
X	rm -f Fwhetd
X	ln f77Fwhetd Fwhetd
X
Xf77Fwhets: second.o Fwhets.f 
X	f77 $(FFLAGS) Fwhets.f second.o -o f77Fwhets
X
XLLLFwhets: _second.o Fwhets.f 
X	fortran $(FFLAGS) Fwhets.f 
X	forlink Fwhets.o _second.o 
X	mv Fwhets LLLFwhets
X
Xf77Fwhetd: second.o Fwhetd.f 
X	f77 $(FFLAGS) Fwhetd.f second.o -o f77Fwhetd
X
XLLLFwhetd: _second.o Fwhetd.f 
X	fortran $(FFLAGS) Fwhetd.f 
X	forlink Fwhetd.o _second.o 
X	mv Fwhetd LLLFwhetd
X
Xsecond.o: second.c
X	$(CC) $(CFLAGS) -c second.c
X
X_second.o: _second.c
X	$(CC) $(CFLAGS) -c _second.c
X
Xclean:
X	(set nonomatch; rm -f *.o $(FORT)Fwhets $(FORT)Fwhetd )
END_OF_Makefile
if test 822 -ne `wc -c <Makefile`; then
    echo shar: \"Makefile\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f _second.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"_second.c\"
else
echo shar: Extracting \"_second.c\" \(450 characters\)
sed "s/^X//" >_second.c <<'END_OF__second.c'
X
X#include <sys/time.h>
X#include <sys/resource.h>
X
Xfloat
Xsecond ()
X{
X    struct rusage ru;
X
X#ifdef MOXIE
X    static unsigned count = 0;
X    static unsigned stop;
X    extern unsigned __Argc;
X    extern char **__Argv;
X    if (count == 0 && __Argc > 1) {
X	stop = atoi(__Argv[__Argc-1]);
X    }
X    count += 1;
X    if (count == stop) exit(0);
X#endif
X
X    getrusage (0, &ru);
X    return ((float)ru.ru_utime.tv_sec + ((float)ru.ru_utime.tv_usec / 1.0e6));
X}
END_OF__second.c
if test 450 -ne `wc -c <_second.c`; then
    echo shar: \"_second.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f second.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"second.c\"
else
echo shar: Extracting \"second.c\" \(158 characters\)
sed "s/^X//" >second.c <<'END_OF_second.c'
X#include <sys/types.h>
X#include <sys/times.h>
Xfloat
Xsecond_()
X{
X	struct tms buf;
X	times(&buf);
X	return(buf.tms_utime*0.02);         /* 1 tick = 1/50 sec */
X}
END_OF_second.c
if test 158 -ne `wc -c <second.c`; then
    echo shar: \"second.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f second.ucb.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"second.ucb.c\"
else
echo shar: Extracting \"second.ucb.c\" \(450 characters\)
sed "s/^X//" >second.ucb.c <<'END_OF_second.ucb.c'
X#include <sys/time.h>
X#include <sys/resource.h>
X
Xfloat
Xsecond_ ()
X{
X    struct rusage ru;
X
X#ifdef MOXIE
X    static unsigned count = 0;
X    static unsigned stop;
X    extern unsigned __Argc;
X    extern char **__Argv;
X    if (count == 0 && __Argc > 1) {
X	stop = atoi(__Argv[__Argc-1]);
X    }
X    count += 1;
X    if (count == stop) exit(0);
X#endif
X
X    getrusage (0, &ru);
X    return ((float)ru.ru_utime.tv_sec + ((float)ru.ru_utime.tv_usec / 1.0e6));
X}
END_OF_second.ucb.c
if test 450 -ne `wc -c <second.ucb.c`; then
    echo shar: \"second.ucb.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f tcorl.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"tcorl.c\"
else
echo shar: Extracting \"tcorl.c\" \(5866 characters\)
sed "s/^X//" >tcorl.c <<'END_OF_tcorl.c'
X/*  VERSION OF STP SUBROUTINE TCORL: SINGLE PRECISION      */
X/*  PDL VERSION                                            */
X
Xmain()
X{
Xint   i,j;
Xint   coptr,zlptr;   
Xint   iii; 
Xfloat zcm,tstat,deltim;   
Xfloat ztc8,ztc4;      
Xfloat coordx,coordy,coordz;   
Xfloat coorvx,coorvy,coorvz;      
Xfloat thee35,thee45;
Xfloat cov11,cov13,cov22,cov24;
Xfloat cov33,cov35,cov44,cov45;
Xfloat sigdz1,sigdz2,sigdz3;
Xfloat sigvz1,sigvz2,sigvz3;
Xfloat deltdx,deltdy,deltdz;
Xfloat deltvx,deltvy,deltvz;
Xfloat deltdz1,deltdz2,deltdz3;
Xfloat deltvz1,deltvz2,deltvz3;
Xfloat sigcz1,sigcz2,sigcz3;
Xfloat sigtz1,sigtz2,sigtz3;
Xfloat zstm[1][100];   
Xfloat zsfr[6][100];   
Xfloat ztacc[3][100];
Xfloat zrvo[3][100];
Xfloat zdrgx[3][100];
Xfloat zrvi[15][100];   
Xfloat ztmat[9][100];   
Xint phase;
X
Xprintf("enter phase prior to halting (1 = initialization only) \n");
Xscanf ("%6d", &phase);
X
X
X   for (i = 0; i < 100; i++)
X      zstm[0][i] = 3.0;
X
X   for (i = 0; i < 6; i++)
X      for (j = 0; j < 100; j++)
X         zsfr[i][j] = 3.0;
X
X   for (i = 0; i < 3; i++)
X      for (j = 0; j < 100; j++){
X         ztacc[i][j] = 3.0;
X         zrvo[i][j] = 3.0;
X         zdrgx[i][j] = 3.0;
X      }
X
X   for (i = 0; i < 15; i++)
X      for (j = 0; j < 100; j++)
X         zrvi[i][j] = 3.0;
X
X   for (i = 0; i < 9; i++)
X      for (j = 0; j < 100; j++)
X         ztmat[i][j] = 3.0;
X
X/*  READ OR INITIALIZE ALL VARIABLES  */
X
X   zlptr = 100;
X   zstm[0][0] = 5.0;
X
X   for (iii = 0; iii < 1; iii++){
X/*  PASS LABEL TO ASSEMBLY LANGUAGE   */
X
X/*      asm("timstr:"); */
X      for (i = 0; i < 1; i++){
X/*  START BENCHMARK 1  ********************************************** */
X
Xif (1 == phase) 
X  exit(1);
X
X/*  INITIALIZE THE CANDIDATE OBJECT POINTER  */
X         coptr = 0;
X
X/*  INCREMENT TRTT'S TIMER  */
X         zcm = zcm + ztc8;
X
X/*  SET THE CANDIDATE OBJECT POINTER TO THE NEXT OBJECT  */
X         do {
X            coptr = coptr + 1;
X
X/*  PROPAGATE CANDIDATE OBJECT'S RADAR FACE CARTESIAN COORDINATE
X   (RFCC) STATE VECTOR TO THE TIME OF THE TEST OBJECT'S STATE VECTOR */
X
X            deltim = zstm[0][0] - zstm[0][coptr];
X            coordx = zsfr[0][coptr] +
X               ( zsfr[3][coptr] + 0.5 * ztacc[0][coptr] * deltim) * deltim;
X            coordy = zsfr[1][coptr] +
X               ( zsfr[4][coptr] + 0.5 * ztacc[1][coptr] * deltim) * deltim;
X            coordz = zsfr[2][coptr] +
X               ( zsfr[5][coptr] + 0.5 * ztacc[2][coptr] * deltim) * deltim;
X            coorvx = zsfr[3][coptr] + ztacc[0][coptr] * deltim;
X            coorvy = zsfr[4][coptr] + ztacc[1][coptr] * deltim;
X            coorvz = zsfr[5][coptr] + ztacc[2][coptr] * deltim;
X
X/*  PROPAGATE THE RVCC STATE ERROR COVARIANCE ELEMENTS OF THE 
X                  CANDIDATE OBJECT  */
X
X            thee35 = deltim *
X               (zdrgx[0][coptr] * ztmat[0][coptr]
X               +zdrgx[1][coptr] * ztmat[3][coptr]
X               +zdrgx[2][coptr] * ztmat[6][coptr] );
X
X            thee45 = deltim *
X               (zdrgx[0][coptr] * ztmat[0][coptr]
X               +zdrgx[1][coptr] * ztmat[4][coptr]
X               +zdrgx[2][coptr] * ztmat[7][coptr] );
X
X            cov11 = zrvi[0][coptr] + zrvi[2][coptr] * deltim;
X            cov13 = zrvi[2][coptr] + zrvi[9][coptr] * deltim;
X            cov22 = zrvi[5][coptr] + zrvi[7][coptr] * deltim;
X            cov24 = zrvi[7][coptr] + zrvi[12][coptr] * deltim;
X            cov33 = zrvi[9][coptr] + zrvi[11][coptr] * thee35;
X            cov35 = zrvi[11][coptr] + zrvi[14][coptr] * thee35;
X            cov44 = zrvi[12][coptr] + zrvi[13][coptr] * thee45;
X            cov45 = zrvi[13][coptr] + zrvi[14][coptr] * thee45;
X
X            sigdz1 = cov11 + cov13 * deltim;
X            sigdz2 = cov22 + cov24 * deltim;
X            sigvz1 = cov33 + cov35 * thee35;
X            sigvz2 = cov44 + cov45 * thee45;
X            sigdz3 = zrvo[1][coptr] +
X               (2.0 * zrvo[1][coptr] + zrvo[2][coptr] * deltim) * deltim;
X            sigvz3 = zrvo[2][coptr];
X
X/*  TAKE THE DIFFERENCE BETWEEN TEST AND CANDIDATE OBJECT STATES  */
X            deltdx = zsfr[0][0] - coordx;
X            deltdy = zsfr[1][0] - coordy;
X            deltdz = zsfr[2][0] - coordz;
X            deltvx = zsfr[3][0] - coorvx;
X            deltvy = zsfr[4][0] - coorvy;
X            deltvz = zsfr[5][0] - coorvz;
X
X/*  TRANSFORM THE DIFFERENCE VECTOR FROM RFCC TO RVCC  */
X            deltdz1 = ztmat[0][0] * deltdx
X               + ztmat[3][0] * deltdy
X               + ztmat[6][0] * deltdz;
X            deltdz2 = ztmat[1][0] * deltdx
X               + ztmat[4][0] * deltdy
X               + ztmat[7][0] * deltdz;
X           deltdz3 = ztmat[2][0] * deltdx
X               + ztmat[5][0] * deltdy
X               + ztmat[8][0] * deltdz;
X           deltvz1 = ztmat[0][0] * deltvx
X               + ztmat[3][0] * deltvy
X               + ztmat[6][0] * deltvz;
X           deltvz2 = ztmat[1][0] * deltvx
X               + ztmat[4][0] * deltvy
X               + ztmat[7][0] * deltvz;
X           deltvz3 = ztmat[2][0] * deltvx
X               + ztmat[5][0] * deltvy
X               + ztmat[8][0] * deltvz;
X
X/*  COMPUTE THE VARIANCE OF THE STATE VECTOR DIFFERENCES  */
X           sigcz1 = sigdz1 + zrvi[0][0];
X           sigcz2 = sigdz2 + zrvi[5][0];
X           sigtz1 = sigvz1 + zrvi[9][0];
X           sigtz2 = sigvz2 + zrvi[12][0];
X           sigcz3 = sigdz3 + zrvo[0][0];
X           sigtz3 = sigvz3 + zrvo[2][0];
X
X/*  COMPUTE THE 6 D.O.F. RVCC TEST STATISTICS  */
X           tstat = (deltdz1*deltdz1)/sigcz1 * (deltdz2*deltdz2)/sigcz2
X              + (deltdz3*deltdz3)/sigcz3 * (deltvz1*deltvz1)/sigtz1
X              + (deltvz2*deltvz2)/sigtz2 * (deltvz3*deltvz3)/sigtz3;
X
X/*  INCREMENT TRTT'S TIMER  */
X            zcm = zcm + ztc4;
X
X/*  CONTINUE LOOP.  EXIT ROUTINE AFTER LAST CANDIDATE OBJECT  */
X
X         } while (coptr < zlptr);  
X/*  EXIT BENCHMARK 1  *********************************************  */
X      }     
X/*      asm("timend:"); */
X   }
X}
END_OF_tcorl.c
if test 5866 -ne `wc -c <tcorl.c`; then
    echo shar: \"tcorl.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f temp.f -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"temp.f\"
else
echo shar: Extracting \"temp.f\" \(82 characters\)
sed "s/^X//" >temp.f <<'END_OF_temp.f'
X	     PRINT 999
X999	     FORMAT ( ' WHETSTONE BENCHMARK (SINGLE PRECISION)')
X	END
END_OF_temp.f
if test 82 -ne `wc -c <temp.f`; then
    echo shar: \"temp.f\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f test.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"test.c\"
else
echo shar: Extracting \"test.c\" \(870 characters\)
sed "s/^X//" >test.c <<'END_OF_test.c'
Xdouble second_();
X
Xmain ()
X{
X	int i;
X	double f1,f2,f3,f4;
X
X	f2 = 2345.2345;
X	f3 = 4536.5467;
X	f4 = 2435.9788;
X	
X	for (i=0;i<1000000;i++) {
X		f1 = f2 * f3 / f4;
X	}
X
X	printf("second()=%20.10e\n\n",(double)second_());
X}
X
X
X#ifdef UCB
X#include <sys/time.h>
X#include <sys/resource.h>
X
Xdouble
Xsecond_ ()
X{
X    struct rusage ru;
X
X#ifdef MOXIE
X    static unsigned count = 0;
X    static unsigned stop;
X    extern unsigned __Argc;
X    extern char **__Argv;
X    if (count == 0 && __Argc > 1) {
X	stop = atoi(__Argv[__Argc-1]);
X    }
X    count += 1;
X    if (count == stop) exit(0);
X#endif
X
X    getrusage (0, &ru);
X    return ((double)ru.ru_utime.tv_sec + ((double)ru.ru_utime.tv_usec / 1.0e6));
X}
X#else
X
X#include <sys/types.h>
X#include <sys/times.h>
Xdouble
Xsecond_()
X{
X	struct tms buf;
X	long t;
X	t = times(&buf);
X	return(buf.tms_utime*0.01);         /* 1 tick = 1/100 sec */
X}
X#endif
END_OF_test.c
if test 870 -ne `wc -c <test.c`; then
    echo shar: \"test.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0


