      PROGRAM CCA5 
C BENCHMARK CCA5, FUNCTIONS
C BENCHMARK = FUNCTIONS IN NPL REPORT NAC62
C---------------------------------------------------------------------
C LAWRENCE LIVERMORE LAB. MODIFICATION OF NPL BENCHMARK
C MODIFIED FOR AUTOMATIC TIMING OF BENCHMARK
C  USER  SHALL MODIFY THIS PROGRAM IN THE AREAS INDICATED
C TO PROVIDE AUTOMATIC TIMING. (SEE BELOW)
C SET LOGICAL UNITS 6 AND 7 TO A PRINTING DEVICE
C THIS BENCHMARK NEED ONLY BE RUN ONCE.
C--------------------------------------------------------
C THIS PROGRAM HAS ONE PARAMETER N
C SET N=26400 FOR ONE MINUTE ON MACHINE OF THE POWER OF A 360/65
C SET N=2640 FOR MACHINE 1/10 POWER OF 360/65
C SET N=264000 FOR MACHINE TEN TIMES THE POWER OF 360/65
C------------------------------------------------------------
C  USER  SHALL MODIFY THIS TO SET "STIME" TO A REFERENCE TIME
C IN SECONDS (ACCURATE TO AT LEAST ONE SECOND).
C-------------------------------------------------------------
      STIME=SECNDS(0.0)
      N = 26400
      C = 1.0
      DO 1 I=1,N
      D = C
      E = C
      A = SQRT(C)
      B = SIN(D)
      C = COS(E)
      D = SQRT(A)
      E = EXP(B)
      A = SIN(C)
      B = SQRT(D)
      C = COS(E)
      D = ATAN(A)
      E = SQRT(B)
      A = COS(C)
      B = EXP(D)
      C = SQRT(E)
      D = SIN(A)
      E = COS(B)
      C = SQRT(C)
      B = COS(D)
      A = EXP(E)
      D = ATAN(A)
 1    CONTINUE
      A = A + B + D + E
C------------------------------------------------------------
C  USER  SHALL MODIFY THIS TO SET "TTIME" TO TOTAL AMOUNT OF
C ELAPSED TIME SINCE "STIME" IN SECONDS.
C   IN THIS EXAMPLE ITIME(1)=HOURS, ITIME(2)=MINUTES, ITIME(3)=SEC.
C-------------------------------------------------------------
        TTIME=SECNDS(STIME)
      WRITE(6, 100) N, C, A
 100  FORMAT( I10, 2F20.15 )
C---------------------------------------------------------------
C LLL MODIFICATION TO PRINT TOTAL ELAPSED TIME OF BENCHMARK
      TTIME = TTIME/60.0
      WRITE(6,1000)TTIME
1000  FORMAT(' BENCHMARK 5 EXECUTION TIME IS ',F8.4,' MINUTES')
C--------------------------------------------------------------
      STOP
      END
