updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / external / fftpack / fftpack5 / factor.F
blob55ce3e9361984119f5c188b5fc8eb769f668f810
1 !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
2 !                                                                       
3 !   FFTPACK 5.0                                                         
4 !                                                                       
5 !   Authors:  Paul N. Swarztrauber and Richard A. Valent                
6 !                                                                       
7 !   $Id: factor.f,v 1.2 2004/06/15 21:29:19 rodney Exp $                
8 !                                                                       
9 !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
10                                                                         
11       SUBROUTINE FACTOR (N,NF,FAC) 
12       REAL FAC(*) 
13       INTEGER NTRYH(4) 
14       DATA NTRYH(1),NTRYH(2),NTRYH(3),NTRYH(4)/4,2,3,5/ 
15 !                                                                       
16       NL = N 
17       NF = 0 
18       J = 0 
19   101 J = J+1 
20       IF (J-4) 102,102,103 
21   102 NTRY = NTRYH(J) 
22       GO TO 104 
23   103 NTRY = NTRY+2 
24   104 NQ = NL/NTRY 
25       NR = NL-NTRY*NQ 
26       IF (NR) 101,105,101 
27   105 NF = NF+1 
28       FAC(NF) = NTRY 
29       NL = NQ 
30       IF (NL .NE. 1) GO TO 104 
31       RETURN 
32       END