      PROGRAM CCA6 
C BENCHMARK CCA6, DFUNCTNS
C NATIONAL PHYSICAL LABORATORY BENCHMARK DFUNCTNS
C THIS PROGRAM IS A DOUBLE LENGTH VERSION OF FUNCTIONS GIVEN IN
C NPL REPORT NAC 62.
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  NATIONAL PHYSICAL LABORATORY BENCHMARKS, SECOND SET
C CHARACTER SET COMMA , POINT . SLASH / ASTERISK *
C BRACKETS ( ) EQUALS = PLUS + MINUS -
C THE PROGRAMS PERFORM NO INPUT AND ARE SEPARATED BY BLANK CARDS
C ALL PROGRAM OUTPUT (WHICH IS SMALL) IS TO DEVICE 6
C THIS PROGRAM HAS ONE PARAMETER N
C SET N=1000 FOR ONE MINUTE ON MACHINE OF THE POWER OF A 360/65
C SET N=100 FOR MACHINE 1/10 POWER OF 360/65
C SET N=10000 FOR MACHINE TEN TIMES THE POWER OF 360/65
      DOUBLE PRECISION A, B, C, D, E
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 = 1000
      C = 1.0
      DO 1 I=1,N
      D = C
      E = C
      A = DSQRT(C)
      B = DSIN(D)
      C = DCOS(E)
      D = DSQRT(A)
      E = DEXP(B)
      A = DSIN(C)
      B = DSQRT(D)
      C = DCOS(E)
      D = DATAN(A)
      E = DSQRT(B)
      A = DCOS(C)
      B = DEXP(D)
      C = DSQRT(E)
      D = DSIN(A)
      E = DCOS(B)
      C = DSQRT(C)
      B = DCOS(D)
      A = DEXP(E)
      D = DATAN(A)
 1    CONTINUE
C------------------------------------------------------------
C  USER  SHALL MODIFY THIS TO SET "TTIME" TO TOTAL AMOUNT OF
C ELAPSED TIME SINCE "STIME" IN SECONDS.
C-------------------------------------------------------------
        TTIME=SECNDS(STIME)
      WRITE(6, 100) N, C, A
 100  FORMAT( I10, 2D40.30 )
C-------------------------------------------------------------
C LLL MODIFICATION TO PRINT TOTAL ELAPSED TIME OF BENCHMARK
      TTIME = TTIME/60.0
      WRITE(6,1000)TTIME
1000  FORMAT(' BENCHMARK 6 EXECUTION TIME IS ',F8.4,' MINUTES')
C--------------------------------------------------------------
      STOP
      END
