Web pdp-10.trailing-edge.com

Trailing-Edge - PDP-10 Archives - decuslib10-02 - 43,50145/dlep.doc
There are 2 other files named dlep.doc in the archive. Click here to see a list.
```SUBROUTINE DLEP

PURPOSE
COMPUTE THE VALUES OF THE LEGENDRE POLYNOMIALS P(N,X)
FOR ARGUMENT VALUE X AND ORDERS 0 UP TO N.

USAGE
CALL DLEP(Y,X,N)

DESCRIPTION OF PARAMETERS
Y	 - RESULT VECTOR OF DIMENSION N+1 CONTAINING THE VALUES
OF LEGENDRE POLYNOMIALS OF ORDER 0 UP TO N
FOR GIVEN ARGUMENT X.
DOUBLE PRECISION VECTOR.
VALUES ARE ORDERED FROM LOW TO HIGH ORDER
X	 - ARGUMENT OF LEGENDRE POLYNOMIAL
DOUBLE PRECISION VARIABLE.
N	 - ORDER OF LEGENDRE POLYNOMIAL

REMARKS
N LESS THAN 0 IS TREATED AS IF N WERE 0

SUBROUTINES AND FUNCTION SUBPROGRAMS REQUIRED
NONE

METHOD
EVALUATION IS BASED ON THE RECURRENCE EQUATION FOR
LEGENDRE POLYNOMIALS P(N,X)
P(N+1,X)=2*X*P(N,X)-P(N-1,X)-(X*P(N,X)-P(N-1,X))/(N+1),
WHERE THE FIRST TERM IN BRACKETS IS THE ORDER,
THE SECOND IS THE ARGUMENT.
STARTING VALUES ARE P(0,X)=1, P(1,X)=X.
```