This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / mathlib / gen / b / rplnml.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1996/04/01 15:01:50  mclareni
6 * Mathlib gen
7 *
8 *
9 #include "gen/pilot.h"
10       FUNCTION RPLNML(RX,N,RA,MODE)                                             
11       REAL RPLNML,RX,RA,RS                                                      
12                                                                                 
13       DIMENSION RA(0:*)
14                                                                                 
15       RS=0                                                                      
16       IF(MODE .EQ. 1) THEN                                                      
17        IF(N .GE. 0) RS=RA(N)                                                    
18        DO 1 J = N-1,0,-1                                                        
19        RS=RA(J)+RX*RS                                                           
20     1  CONTINUE                                                                 
21       ELSEIF(MODE .EQ. -1) THEN                                                 
22        IF(N .GE. 0) RS=RA(0)                                                    
23        DO 2 J = 1,N                                                             
24        RS=RA(J)+RX*RS                                                           
25     2  CONTINUE                                                                 
26       ENDIF                                                                     
27       RPLNML=RS                                                                 
28       RETURN                                                                    
29       END
30                                                                                 
31       FUNCTION CPLNML(CX,N,CA,MODE)
32       COMPLEX CPLNML,CX,CA,CS                                                   
33                                                                                 
34       DIMENSION CA(0:*)                                                 
35
36       CS=0                                                                      
37       IF(MODE .EQ. 1) THEN                                                      
38        IF(N .GE. 0) CS=CA(N)                                                    
39        DO 3 J = N-1,0,-1                                                        
40        CS=CA(J)+CX*CS                                                           
41     3  CONTINUE                                                                 
42       ELSEIF(MODE .EQ. -1) THEN                                                 
43        IF(N .GE. 0) CS=CA(0)                                                    
44        DO 4 J = 1,N                                                             
45        CS=CA(J)+CX*CS                                                           
46     4  CONTINUE                                                                 
47       ENDIF                                                                     
48       CPLNML=CS                                                                 
49       RETURN                                                                    
50       END