This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / mathlib / gen / g / coedin.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1996/04/01 15:02:47  mclareni
6 * Mathlib gen
7 *
8 *
9 #include "gen/pilot.h"
10       SUBROUTINE COEDIN(RKA,BE2,J)
11 C
12 C     COEDIN COMPUTES THE FOURIER COEFFICIENTS FOR THE INVERSE OF
13 C     THE CONDITIONAL CUMULATIVE DISTRIBUTION FUNCTION OF THE
14 C     VAVILOV DISTRIBUTION
15 C
16       DIMENSION C(1001)
17       COMMON /ONE/ TR
18       COMMON /VAVILA/ B(200),S,TT
19       COMMON /VAVILI/ T0,T1,T,OMEGA
20       COMMON /FORFCN/ SS,LFCN
21       DATA PI/3.1415926535898/
22 C
23       LU=ABS(J)
24       CALL COEDIS(RKA,BE2,1,J)
25 C
26       SS=0.99
27       IF(RKA .GE. 0.04) SS=0.995
28       LFCN=2
29       CALL VAVZRO(T0,T1,TR,RKA,BE2,LU)
30       IF(J .GT. 0) WRITE(J,4) TR
31       S=DISVAV(TR,1)
32       TT=TR-T0
33       STEP=TT/1000.
34       STEP2=2.0*STEP
35 C
36       DO 1 I = 1,1001
37     1 C(I)=DISVAV(T0+STEP*(I-1),1)
38 C
39       DO 2 K = 1,200
40       K1=201-K
41       Z1=PI*K
42       Z=Z1/S
43       BK=0.5*(COS(Z*C(1))+COS(Z*C(1001)))
44       DO 3 I = 2,1000
45     3 BK=BK+COS(Z*C(I))
46     2 B(K1)=STEP2*BK/Z1
47     4 FORMAT(10X,'T PRIME =',F10.4)
48       RETURN
49 C
50       END