      COMPLEX FUNCTION CLBETA (A, B)
      COMPLEX A, B, CLNGAM
C***FIRST EXECUTABLE STATEMENT  CLBETA
      IF (REAL(A) .LE. 0.0 .OR. REAL(B) .LE. 0.0) CALL XERMSG ('SLATEC',
     +   'CLBETA', 'REAL PART OF BOTH ARGUMENTS MUST BE GT 0', 1, 2)
C
      CLBETA = CLNGAM(A) + CLNGAM(B) - CLNGAM(A+B)
C
      RETURN
      END
