Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-02 - decus/20-0026/dlap.ssp
There are 2 other files named dlap.ssp in the archive. Click here to see a list.
C                                                                       DAP   10
C     ..................................................................DAP   20
C                                                                       DAP   30
C        SUBROUTINE DLAP                                                DAP   40
C                                                                       DAP   50
C        PURPOSE                                                        DAP   60
C           COMPUTE THE VALUES OF THE LAGUERRE POLYNOMIALS L(N,X)       DAP   70
C           FOR ARGUMENT VALUE X AND ORDERS 0 UP TO N.                  DAP   80
C                                                                       DAP   90
C        USAGE                                                          DAP  100
C           CALL DLAP(Y,X,N)                                            DAP  110
C                                                                       DAP  120
C        DESCRIPTION OF PARAMETERS                                      DAP  130
C           Y     - RESULT VECTOR OF DIMENSION N+1 CONTAINING THE VALUESDAP  140
C                   OF LAGUERRE POLYNOMIALS OF ORDER 0 UP TO N          DAP  150
C                   FOR GIVEN ARGUMENT X.                               DAP  160
C                   DOUBLE PRECISION VECTOR.                            DAP  170
C                   VALUES ARE ORDERED FROM LOW TO HIGH ORDER           DAP  180
C           X     - ARGUMENT OF LAGUERRE POLYNOMIAL                     DAP  190
C                   DOUBLE PRECISION VARIABLE.                          DAP  200
C           N     - ORDER OF LAGUERRE POLYNOMIAL                        DAP  210
C                                                                       DAP  220
C        REMARKS                                                        DAP  230
C           N LESS THAN 0 IS TREATED AS IF N WERE 0                     DAP  240
C                                                                       DAP  250
C        SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED                  DAP  260
C           NONE                                                        DAP  270
C                                                                       DAP  280
C        METHOD                                                         DAP  290
C           EVALUATION IS BASED ON THE RECURRENCE EQUATION FOR          DAP  300
C           LAGUERRE POLYNOMIALS L(N,X)                                 DAP  310
C           L(N+1,X)=2*L(N,X)-L(N-1,X)-((1+X)*L(N,X)-L(N-1,X))/(N+1),   DAP  320
C           WHERE THE FIRST TERM IN BRACKETS IS THE ORDER,              DAP  330
C           THE SECOND IS THE ARGUMENT.                                 DAP  340
C           STARTING VALUES ARE L(0,X)=1, L(1,X)=1.-X.                  DAP  350
C                                                                       DAP  360
C     ..................................................................DAP  370
C                                                                       DAP  380
      SUBROUTINE DLAP(Y,X,N)                                            DAP  390
C                                                                       DAP  400
      DIMENSION Y(1)                                                    DAP  410
      DOUBLE PRECISION Y,X,T                                            DAP  420
C                                                                       DAP  430
C        TEST OF ORDER                                                  DAP  440
      Y(1)=1.D0                                                         DAP  450
      IF(N)1,1,2                                                        DAP  460
    1 RETURN                                                            DAP  470
C                                                                       DAP  480
    2 Y(2)=1.D0-X                                                       DAP  490
      IF(N-1)1,1,3                                                      DAP  500
C                                                                       DAP  510
C        INITIALIZATION                                                 DAP  520
    3 T=1.D0+X                                                          DAP  530
C                                                                       DAP  540
      DO 4 I=2,N                                                        DAP  550
    4 Y(I+1)=Y(I)-Y(I-1)+Y(I)-(T*Y(I)-Y(I-1))/DFLOAT(I)                 DAP  560
      RETURN                                                            DAP  570
      END                                                               DAP  580