Used double to hold the 'p' for bernoulli() and geometric()

The following call was generating 100 zeros:

        torch.bernoulli(torch.ByteTensor(100), 0.5)

The 0.5 probability was converted to 0, when casting the argument to 'unsigned char'.
I now used double to hold the probability.