C======= C (N,M)  FOR IOT3, IOT6============
      REAL*8 FUNCTION IC(NN,MM)
      REAL*8 IA
C----18/09/2000----------------
      IC=1.D 00
C     IF(NN.LE.0.OR.MM.LE.0.OR.NN.LT.MM)
C    * WRITE(6,1) IC,NN,MM
 1     FORMAT('  FUNCTION C(n,m) =',E15.8,
     * ' INVALID PARAMETERS n',I5, ' m', I5)
      IF(NN.GT.0.AND.MM.GT.0.AND.NN.GE.MM) GOTO 2
      RETURN
      CONTINUE
C     IF(NN.LE.0.AND.MM.GT.0) WRITE(6, 1)IC,NN,MM
C     IF(MM.LT.0) WRITE(6,1)IC,NN,MM
2     N=NN
      M=MM
C     WRITE(6,1)NN,MM
      IF(M.LT.N-M) M=N-M
      N=N+1
      IA=1.D 00
      IF(M.LT.1) GOTO 20
      DO 10 I=1,M
10     IA=IA*DFLOAT(N-I)/DFLOAT(I)
20     IC=IA
C     WRITE(6,25) IC,NN,MM
 25   FORMAT('C n m', E15.8,2I4)
      RETURN
      END
