      REAL FUNCTION RGAM(A,ACC)
C     -------------------
C     COMPUTATION OF 1/GAMMA(A+1) - 1  FOR 0 .LT. A .LT. 1
C     ACC IS THE RELATIVE ACCURACY TO BE ACHIEVED.
C     -------------------
      REAL C(17)
C     -------------------
      DATA C(2) / .577215664901533E+00/, C(3) /-.655878071520254E+00/,
     1     C(4) /-.420026350340952E-01/, C(5) / .166538611382291E+00/,
     2     C(6) /-.421977345555443E-01/, C(7) /-.962197152787697E-02/,
     3     C(8) / .721894324666310E-02/, C(9) /-.116516759185907E-02/,
     4     C(10)/-.215241674114951E-03/, C(11)/ .128050282388116E-03/,
     5     C(12)/-.201348547807882E-04/, C(13)/-.125049348214267E-05/,
     6     C(14)/ .113302723198170E-05/, C(15)/-.205633841697761E-06/,
     7     C(16)/ .611609510448142E-08/, C(17)/ .500200764446922E-08/
C     -------------------
      TOL = 0.5*ACC
C
      IF (A .GT. 0.5) GO TO 10
      SUM = C(2)
      T = A
      GO TO 20
   10 SUM = C(2) - 1.0
      T = (A - 0.5) - 0.5
C
   20 TK = T
      DO 21 K = 3,17
      AK = C(K)*TK
      SUM = SUM + AK
      IF (ABS(AK) .LE. TOL*ABS(SUM)) GO TO 30
   21 TK = T*TK
C
   30 RGAM = T*SUM
      IF (A .GT. 0.5) RGAM = RGAM/A
      RETURN
      END
