This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / mathlib / gen / b / dplnml.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 #if !defined(CERNLIB_DOUBLE)
11       FUNCTION DPLNML(DX,N,DA,MODE)                                             
12 #include "gen/imp128.inc"
13       CHARACTER*6 NAME
14       NAME = 'DPLNML'
15       CALL MTLPRT(NAME,'B105',
16      +'not available on this machine - see documentation')
17       DPLNML=0.
18       RETURN
19       END
20 #endif
21 #if defined(CERNLIB_DOUBLE)
22       FUNCTION DPLNML(DX,N,DA,MODE)                                             
23       DOUBLE PRECISION DPLNML,DX,DA,DS                                          
24                                                                                 
25       DIMENSION DA(0:*)
26                                                                                 
27       DS=0                                                                      
28       IF(MODE .EQ. 1) THEN                                                      
29        IF(N .GE. 0) DS=DA(N)                                                    
30        DO 1 J = N-1,0,-1                                                        
31        DS=DA(J)+DX*DS                                                           
32     1  CONTINUE                                                                 
33       ELSEIF(MODE .EQ. -1) THEN                                                 
34        IF(N .GE. 0) DS=DA(0)                                                    
35        DO 2 J = 1,N                                                             
36        DS=DA(J)+DX*DS                                                           
37     2  CONTINUE                                                                 
38       ENDIF                                                                     
39       DPLNML=DS                                                                 
40       RETURN                                                                    
41       END
42                                                                                 
43       FUNCTION WPLNML(WX,N,WA,MODE)
44       COMPLEX*16 WPLNML,WX,WA,WS                                                
45                                                                                 
46       DIMENSION WA(0:*)                                                 
47
48       WS=0                                                                      
49       IF(MODE .EQ. 1) THEN                                                      
50        IF(N .GE. 0) WS=WA(N)                                                    
51        DO 3 J = N-1,0,-1                                                        
52        WS=WA(J)+WX*WS                                                           
53     3  CONTINUE                                                                 
54       ELSEIF(MODE .EQ. -1) THEN                                                 
55        IF(N .GE. 0) WS=WA(0)                                                    
56        DO 4 J = 1,N                                                             
57        WS=WA(J)+WX*WS                                                           
58     4  CONTINUE                                                                 
59       ENDIF                                                                     
60       WPLNML=WS                                                                 
61       RETURN                                                                    
62       END                                                                       
63 #endif