Includes all functionality sans sampling via Gaussian distributions

Should we let i be of type ZZ? I think k might be beyond the range of longs