function c=sf_noverk(n,k)
//SF_NOVERK  Compute n-over-k
//  SF_NOVERK(N,K) returns N!/(K!*(N-K)!)

//  GCG, 11-MAR-2003

if k<0 | k>n, error('K must be an integer between 0 and N'), end 
if k>n/2, k = n-k, end
if k<=1
  c = n^k
else 
   nums = (n-k+1):n
   dens = 1:k
   nums = nums./dens
   c    = round(prod(nums))
end

endfunction
