lit
    JINRLIB

GROUPI - N

D122

: .. :

popaa GROUPI c N oopa op pao oo coa c oco ao.

:

: - SUBROUTINE
: - GROUPI
: - F - /

:

CALL GROUPI(A,B,H,N,F,X,FI,AINT), :

A,B - (REAL*8) p ppoa;
H - (REAL*8) a ppoa.
c H pa (A,B) a o co ac, o opopaa c oo a aa, pao (B-A)/INT((B-A)/(2*H));
N - (INTEGER) co pao;
F - opopa (SUBROUTINE F(X,FI,N)), cocao ooa c a opa ;
X - (REAL*8) ap;
FI - (REAL*8) acc N a opa ;
AINT - (REAL*8) acc N c a pao.

:
       . . .
       IMPLICIT REAL*8 (A-H,O-Z)
       DIMENSION FI(4),AINT(4)
       EXTERNAL F
       CALL GROUPI(0.D0,1.D0,0.1D0,4,F,X,FI,AINT)
       WRITE(*,1) (AINT(I),I=1,4)
    1  FORMAT('  AINT=',4F12.7)
       . . .
    C  
       SUBROUTINE F(X,FI,N)
       IMPLICIT REAL*8 (A-H,O-Z)
       REAL*8 X,FI
       DIMENSION FI(N)
       FI(1)=X*X
       DO    1 I=2,N
    1  FI(I)=FI(I-1)*X
       RETURN
       END
:
       AINT=   0.3333333   0.2500000   0.2000133   0.1667000


home up e-mail