      program ft
      real   t, tt1, tt2
      real*8 t1, t2
      complex z,zz1,zz2,zz3
      real*8  dz(2), dzz1(2), dzz2(2), dzz3(2)
      real tr,r
      real*8 ttlr,tlr,lr,za,ze,zeit,empty,z1,z2,z3,z4
      real*8 dc1,dc2,dc3,dc4,dc5,dc6,dc7
      real*8 pd1,pd2,pd3,pd4,pd5,pd6,pd7
      real*8 d1,d2,d3,d4,d5,d6,d7
      real stime
      integer iha, ima, isa, ihua , ihe, ime, ise, ihue, i, loop
      integer mode
      external second
      include 'complexf.dcl'
      

      loop1 = 10000
      loop = loop1
      divis = 1000000/loop1
      do 876 i = 1,30
 876  write (*,* ) ' '
      write (*,*)
      write (*,*) ' SPEED-TEST OF FPU with Pro Fortran-77',
     1            ' in mikrosec./operation'
      write (*,*) ' =============================================',
     1            '======================'
      write (*,*) ' Operation        32b ST68881  STplus   ',
     1            ' 64b ST68881  STplus'
      write (*,*) ' ----------------------------------------',
     1            '---------------------------'
      stime = second ()
      do 10 i = 1, 10000
 10   continue
      empty = second() - stime
      write (*,3)
 3    format ( \ )
      empty = empty*100
      write (*,*) ' Empty             '
      write (*,2) empty
      write (*,5) 
      write (*,2) empty

      write (*,*) ' add               '
      r = 0.1
      tr = 1.242424 
      loop = loop1
      stime = second ()
      do 20 i = 1,loop
 20   r = r + tr
      z1 = (second()-stime)*divis 
      write (*,2)  z1
 2    format ( \f12.4)
 5    format ( \12(' ') )

      write ( *,5) 

      tlr = 1.242424d0
      lr = 0.1d0
      stime = second()
      do 40 i = 1,loop
 40   lr = lr + tlr
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' mult              '
      r = 5.0
      tr = 1.242424 
      stime = second()
      do 60 i = 1,loop
 60   r = tr * tr
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 1.242424d0
      lr = 5d0
      stime = second()
      do 80 i = 1,loop
 80   lr = tlr * tlr
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' sub               '
      r = 0.1
      tr = 1.242424 
      loop = loop1
      stime = second ()
      do 22 i = 1,loop
 22   r = r - tr
      z1 = (second()-stime)*divis 
      write (*,2)  z1

      write ( *,5) 

      tlr = 1.242424d0
      lr = 0.1d0
      stime = second()
      do 44 i = 1,loop
 44   lr = lr - tlr
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' div               '
      r = 5.0
      ttr = 234234.234234
      tr = 1.242424 
      stime = second()
      do 66 i = 1,loop
 66   r = ttr / tr
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      ttlr = 234234.234234d0
      tlr = 1.242424d0
      lr = 5d0
      stime = second()
      do 88 i = 1,loop
 88   lr = ttlr / tlr
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' sqrt              '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 100 i = 1,loop
 100  r = sqrt ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 120 i = 1,loop
 120  lr = sqrt ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' sin               '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 140 i = 1,loop
 140  r = sin  ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 160 i = 1,loop
 160  lr = sin  ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' cos               '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 180 i = 1,loop
 180  r = cos  ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 200 i = 1,loop
 200  lr = cos  ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' sincos            '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 640 i = 1,loop
      r = cos  ( tr )
 640  r = sin  ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 660 i = 1,loop
      lr = cos  ( tlr )
 660  lr = sin  ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' exp               '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 220 i = 1,loop
 220  r = exp  ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 240 i = 1,loop
 240  lr = exp  ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' ln                '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 260 i = 1,loop
 260  r = log  ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 280 i = 1,loop
 280  lr = log  ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' arctan            '
      r = 0.1
      tr = 3.242424 
      stime = second()
      do 300 i = 1,loop
 300  r = atan ( tr ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      write ( *,5) 

      tlr = 3.242424d0
      lr = 0.1d0
      stime = second()
      do 320 i = 1,loop
 320  lr = atan ( tlr )
      z3 = (second()-stime)*divis
      write (*,2) z3

 9999 continue
      write (*,*) ' Legendre P1..7    '
      r = 0.1
      tr = 0.242424 
      stime = second()
      do 400 i = 1,loop
        p1 = tr 
        p2 = tr * tr
        p3 = p2 * p1
        p4 = p2 * p2
        p5 = p4 * p1
        p6 = p3 * p3
        p7 = p6 * p1
        r1 = p1
        r2 = 1.5 * p2 - 0.5
        r3 = 2.5 * p3 - 1.5 * p1
        r4 = ( 35.0 * p4 - 30 * p2 + 3.0 ) / 8.0
        r5 = ( 63.0 * p5 - 70.0 * p3 + 15.0 * p1 ) / 8.0
        r6 = ( 231.0 * p6 - 315.0 * p4 + 105.0 * p2 - 5.0 ) / 16.0
        r7 =( 429.0 * p7 - 693.0 * p5 + 315.0 * p3 - 35.0 * p1 ) / 16.0 
 400  continue 
      z1 = (second()-stime)*divis
      write ( *,2) z1

      write ( *,5) 

      tlr = 0.242424d0
      lr = 0.1d0
      stime = second()
      do 420 i = 1,loop
        pd1 = tlr 
        pd2 = tlr * tlr 
        pd3 = p2 * p1 
        pd4 = p2 * p2 
        pd5 = p4 * p1 
        pd6 = p3 * p3 
        pd7 = p6 * p1 
        d1 = pd1 
        d2 = 1.5d0 * pd2 - 0.5d0 
        d3 = 2.5d0 * pd3 - 1.5d0 * pd1 
        d4 = ( 35.0d0 * pd4 - 30.0d0 * pd2 + 3.0d0 ) / 8.0d0 
        d5 = ( 63.0d0 * pd5 - 70.0d0 * pd3 + 15.0d0 * pd1 ) / 8.0d0 
        d6 = ( 231.0d0 * pd6 - 315.0d0 * pd4 + 105.0d0 * pd2
     1         - 5.0d0 ) / 16.0d0 
        d7 = ( 429.0d0 * pd7 - 693.0d0 * pd5 + 315.0d0 * pd3 
     1         - 35.0d0 * pd1 ) / 16.0d0 
 420  continue
      z3 = (second()-stime)*divis
      write (*,2) z3

      write (*,*) ' complex sqrt      '
      r = 0.1
      z = (3.242424,86.8575)
      stime = second()
      do 6140 i = 1,loop
 6140  zz1 = csqrt  ( z ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      stime = second()
      do 6150 i = 1,loop1
 6150  zz1 = scsqrt ( z ) 
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      stime = second()
      do 6170 i = 1,loop1
 6170  call dcsqrt( dzz1, dz )
      z4 = (second()-stime)*divis
      write (*,2) z4

      write (*,*) ' complex cos       '
      r = 0.1
      z = (3.242424,86.8575)
      stime = second()
      do 6240 i = 1,loop
 6240  zz1 = ccos   ( z ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      stime = second()
      do 6250 i = 1,loop1
 6250  zz1 = sccos  ( z ) 
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      stime = second()
      do 6270 i = 1,loop1
 6270  call dccos ( dzz1, dz )
      z4 = (second()-stime)*divis
      write (*,2) z4

      write (*,*) ' complex exp       '
      r = 0.1
      z = (3.242424,86.8575)
      stime = second()
      do 6340 i = 1,loop
 6340  zz1 = cexp   ( z ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      stime = second()
      do 6350 i = 1,loop1
 6350  zz1 = scexp  ( z ) 
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      stime = second()
      do 6370 i = 1,loop1
 6370  call dcexp ( dzz1, dz )
      z4 = (second()-stime)*divis
      write (*,2) z4

      write (*,*) ' complex sin       '
      r = 0.1
      z = (3.242424,86.8575)
      stime = second()
      do 6440 i = 1,loop
 6440  zz1 = csin   ( z ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      stime = second()
      do 6450 i = 1,loop1
 6450  zz1 = scsin  ( z ) 
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      stime = second()
      do 6470 i = 1,loop1
 6470  call dcsin ( dzz1, dz )
      z4 = (second()-stime)*divis
      write (*,2) z4


      write (*,*) ' complex abs       '
      r = 0.1
      z = (3.242424,86.8575)
      stime = second()
      do 7140 i = 1,loop
 7140  r = cabs ( z ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      stime = second()
      do 7150 i = 1,loop1
 7150  r = scabs ( z )
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      stime = second()
      do 7170 i = 1,loop1
 7170  lr = dcabs ( dz )
      z4 = (second()-stime)*divis
      write (*,2) z4



      write (*,*) ' complex conjg     '
      r = 0.1
      z = (3.242424,86.8575)
      stime = second()
      do 8140 i = 1,loop
 8140  z = conjg  ( z ) 
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      stime = second()
      do 8150 i = 1,loop1
 8150  z = sconjg ( z )
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      stime = second()
      do 8170 i = 1,loop1
 8170  call dconjg ( dz , dz )
      z4 = (second()-stime)*divis
      write (*,2) z4


      write (*,*) ' complex div       '
      r = 0.1
      z = (3.242424,86.8575)
      zz1 = ( 4.23765 , 7.64364)
      stime = second()
      do 9140 i = 1,loop
 9140  zz2 = z / zz1
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      zz1 = ( 4.23765, 7.64364)
      stime = second()
      do 9150 i = 1,loop1
 9150  zz2 = scdiv ( z , zz1 )
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      dzz1 ( 1 ) = 4.23765d0
      dzz1 ( 2 ) = 7.64364d0
      stime = second()
      do 9170 i = 1,loop1
 9170  call dcdiv ( dzz2 , dz , dzz1 )
      z4 = (second()-stime)*divis
      write (*,2) z4


      write (*,*) ' complex add       '
      r = 0.1
      z = (3.242424,86.8575)
      zz1 = ( 4.23765 , 7.64364)
      stime = second()
      do 9240 i = 1,loop
 9240  zz2 = z + zz1
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      zz1 = ( 4.23765, 7.64364)
      stime = second()
      do 9250 i = 1,loop1
 9250  zz2 = scadd ( z , zz1 )
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      dzz1 ( 1 ) = 4.23765d0
      dzz1 ( 2 ) = 7.64364d0
      stime = second()
      do 9270 i = 1,loop1
 9270  call dcadd ( dzz2 , dz , dzz1 )
      z4 = (second()-stime)*divis
      write (*,2) z4



      write (*,*) ' complex mul       '
      r = 0.1
      z = (3.242424,86.8575)
      zz1 = ( 4.23765 , 7.64364)
      stime = second()
      do 9340 i = 1,loop
 9340  zz2 = z * zz1
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      zz1 = ( 4.23765, 7.64364)
      stime = second()
      do 9350 i = 1,loop1
 9350  zz2 = scmul ( z , zz1 )
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      dzz1 ( 1 ) = 4.23765d0
      dzz1 ( 2 ) = 7.64364d0
      stime = second()
      do 9370 i = 1,loop1
 9370  call dcmul ( dzz2 , dz , dzz1 )
      z4 = (second()-stime)*divis
      write (*,2) z4


      write (*,*) ' complex sub       '
      r = 0.1
      z = (3.242424,86.8575)
      zz1 = ( 4.23765 , 7.64364)
      stime = second()
      do 9440 i = 1,loop
 9440  zz2 = z - zz1
      z1 = (second()-stime)*divis
      write (*,2)  z1

      z = (3.242424,86.8575)
      zz1 = ( 4.23765, 7.64364)
      stime = second()
      do 9450 i = 1,loop1
 9450  zz2 = scsub ( z , zz1 )
      z2 = (second()-stime)*divis
      write ( *,2) z2

      write ( *,5) 

      dz (1) = 3.242424d0
      dz (2) = 86.8575d0
      dzz1 ( 1 ) = 4.23765d0
      dzz1 ( 2 ) = 7.64364d0
      stime = second()
      do 9470 i = 1,loop1
 9470  call dcsub ( dzz2 , dz , dzz1 )
      z4 = (second()-stime)*divis
      write (*,2) z4



      write (*,4)
 4    format ( ' ' , / ) 
      stop
      end

     
