This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / MINICERN / mathlib / gen / d / gausscod.inc
CommitLineData
fe4da5cc 1*
2* $Id$
3*
4* $Log$
5* Revision 1.1.1.1 1996/04/01 15:02:13 mclareni
6* Mathlib gen
7*
8*
9*
10* gausscod.inc
11*
12 DIMENSION W(12),X(12)
13
14 PARAMETER (Z1 = 1, HF = Z1/2, CST = 5*Z1/1000)
15
16 DATA X( 1) /9.6028985649753623D-1/, W( 1) /1.0122853629037626D-1/
17 DATA X( 2) /7.9666647741362674D-1/, W( 2) /2.2238103445337447D-1/
18 DATA X( 3) /5.2553240991632899D-1/, W( 3) /3.1370664587788729D-1/
19 DATA X( 4) /1.8343464249564980D-1/, W( 4) /3.6268378337836198D-1/
20 DATA X( 5) /9.8940093499164993D-1/, W( 5) /2.7152459411754095D-2/
21 DATA X( 6) /9.4457502307323258D-1/, W( 6) /6.2253523938647893D-2/
22 DATA X( 7) /8.6563120238783174D-1/, W( 7) /9.5158511682492785D-2/
23 DATA X( 8) /7.5540440835500303D-1/, W( 8) /1.2462897125553387D-1/
24 DATA X( 9) /6.1787624440264375D-1/, W( 9) /1.4959598881657673D-1/
25 DATA X(10) /4.5801677765722739D-1/, W(10) /1.6915651939500254D-1/
26 DATA X(11) /2.8160355077925891D-1/, W(11) /1.8260341504492359D-1/
27 DATA X(12) /9.5012509837637440D-2/, W(12) /1.8945061045506850D-1/
28
29 H=0
30 IF(B .EQ. A) GO TO 99
31 CONST=CST/ABS(B-A)
32 BB=A
33 1 AA=BB
34 BB=B
35 2 C1=HF*(BB+AA)
36 C2=HF*(BB-AA)
37 S8=0
38 DO 3 I = 1,4
39 U=C2*X(I)
40 3 S8=S8+W(I)*(F(C1+U)+F(C1-U))
41 S16=0
42 DO 4 I = 5,12
43 U=C2*X(I)
44 4 S16=S16+W(I)*(F(C1+U)+F(C1-U))
45 S16=C2*S16
46 IF(ABS(S16-C2*S8) .LE. EPS*(1+ABS(S16))) THEN
47 H=H+S16
48 IF(BB .NE. B) GO TO 1
49 ELSE
50 BB=C1
51 IF(1+CONST*ABS(C2) .NE. 1) GO TO 2
52 H=0
53 CALL MTLPRT(NAME,'D103.1','TOO HIGH ACCURACY REQUIRED')
54 GO TO 99
55 END IF