home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adaptor.zip / adapt.zip / adaptor / examples / fakul / readme < prev   
Text File  |  1993-03-23  |  766b  |  40 lines

  1. Computation of faculty of n
  2.  
  3.     fac(n) = n * (n-1) * (n-2) * ... * 6 * 5 * 4 * 3 * 2 * 1
  4.  
  5.     results in
  6.  
  7.     a(size) a(size-1) ..... a(3)  a(2)  a(1)   number to base 65536
  8.  
  9.     where every a(i) is between 0 and 65535.
  10.  
  11.     Output of program is sum of a(1:size)
  12.  
  13. Some results:
  14.  
  15.     n        size         control sum
  16.    ===================================
  17.    100         33         816765
  18.   1000        534       15597330
  19.   5000       3390      100792830
  20.  16000      12524      379185510
  21.  
  22. fakul.f:
  23.  
  24.     Fortran 90 Version of the algorithm
  25.  
  26.     5000 (8 processors) : ? s
  27.  
  28. fakul1.f:
  29.  
  30.     Realization with forall, the CSHIFT operation remains
  31.  
  32.     5000 (8 processors) : 12 s
  33.  
  34. fakul2.f:
  35.  
  36.     CSHIFT is replaced with node array movement
  37.  
  38.     5000 (8 processors) : 19 s
  39.  
  40.