* X01FTEXT
*UPTODATE X01AAFTEXT
      DOUBLE PRECISION FUNCTION X01AAF(X)
C     NAG COPYRIGHT 1975
C     MARK 4.5 RELEASE
      DOUBLE PRECISION X
C     * PI *
C     RETURNS THE VALUE OF THE CONSTANT PI
C     THE X PARAMETER IS NOT USED
C     FOR DEC VAX 11/780
C     X01AAF = 3.14159265358979324D0
      X01AAF = 3.14159265358979324D0
      RETURN
      END
** END OF X01AAFTEXT
*UPTODATE X01ABFTEXT
      DOUBLE PRECISION FUNCTION X01ABF(X)
C     NAG COPYRIGHT 1975
C     MARK 4.5 RELEASE
      DOUBLE PRECISION X
C     * GAMMA *
C     RETURNS THE VALUE OF EULERS CONSTANT GAMMA WHERE
C     GAMMA = LIM(1+1/2+...+1/N - LOG(N)) AS N TENDS TO INFINITY
C     THE X PARAMETER IS NOT USED
C     FOR DEC VAX 11/780
C     X01ABF = 0.577215664901532861D0
      X01ABF = 0.577215664901532861D0
      RETURN
      END
** END OF X01ABFTEXT
* P01FTEXT
*UPTODATE P01AAFTEXT
      INTEGER FUNCTION P01AAF(IFAIL, ERROR, SRNAME)
C     MARK 1 RELEASE.  NAG COPYRIGHT 1971
C     MARK 3 REVISED
C     MARK 4A REVISED, IER-45
C     MARK 4.5 REVISED
C     MARK 7 REVISED (DEC 1978)
C     MARK 11 REVISED (FEB 1984)
C     RETURNS THE VALUE OF ERROR OR TERMINATES THE PROGRAM.
      INTEGER ERROR, IFAIL, NOUT
C$P 1
      DOUBLE PRECISION SRNAME
C     TEST IF NO ERROR DETECTED
      IF (ERROR.EQ.0) GO TO 20
C     DETERMINE OUTPUT UNIT FOR MESSAGE
      NOUT=6
C      CALL X04AAF (0,NOUT)
C     TEST FOR SOFT FAILURE
      IF (MOD(IFAIL,10).EQ.1) GO TO 10
C     HARD FAILURE
      WRITE (NOUT,99999) SRNAME, ERROR
C     ******************** IMPLEMENTATION NOTE ********************
C     THE FOLLOWING STOP STATEMENT MAY BE REPLACED BY A CALL TO AN
C     IMPLEMENTATION-DEPENDENT ROUTINE TO DISPLAY A MESSAGE AND/OR
C     ABORT THE PROGRAM.
C     *************************************************************
      STOP
C     SOFT FAIL
C     TEST IF ERROR MESSAGES SUPPRESSED
   10 IF (MOD(IFAIL/10,10).EQ.0) GO TO 20
      WRITE (NOUT,99999) SRNAME, ERROR
   20 P01AAF = ERROR
      RETURN
99999 FORMAT (1H0, 38HERROR DETECTED BY NAG LIBRARY ROUTINE , A8,
     * 11H - IFAIL = , I5//)
      END
** END OF P01AAFTEXT
