This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / mathlib / gen / g / vviden.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1996/04/01 15:02:48  mclareni
6 * Mathlib gen
7 *
8 *
9 #include "gen/pilot.h"
10       FUNCTION VVIDEN(X)
11
12       LOGICAL LST
13
14       COMMON /G116C1/ H(7),T0,T1,T,OMEGA,A(155),B(155),X0
15
16       PARAMETER (PI = 3.14159 265, Z1 = 1, HF = Z1/2)
17
18       LST=.FALSE.
19       GO TO 9
20
21       ENTRY VVIDIS(X)
22
23       LST=.TRUE.
24     9 N=X0
25       IF(X .LT. T0) THEN
26        F=0
27       ELSEIF(X .LE. T1) THEN
28        Y=X-T0
29        U=OMEGA*Y-PI
30        COF=2*COS(U)
31        A1=0
32        A0=A(1)
33        DO 1 K = 2,N+1
34        A2=A1
35        A1=A0
36     1  A0=A(K)+COF*A1-A2
37        B1=0
38        B0=B(1)
39        DO 2 K = 2,N
40        B2=B1
41        B1=B0
42     2  B0=B(K)+COF*B1-B2
43        F=HF*(A0-A2)+B0*SIN(U)
44        IF(LST) F=F+Y/T
45       ELSE
46        F=0
47        IF(LST) F=1
48       ENDIF
49       VVIDEN=F
50       RETURN
51       END