Add random double

Add test script which reads random.txt
update random implementation. Talked with
Noam about strange results on cdf. He pointed out that random() only returns 31bits of random.