I need a function to generate random integers. (assume Java long type for now, but this will be extended to BigInteger or BitSet later
long
BigInteger
BitSet
Use a random generator that generates a uniform float number r between 0 and 1. If r>p then set the bit to 0, otherwise set it to 1