I am wondering what this line of code mean?
b = (gen_rand_uniform()>0.5)?1:0;
The gren_rand_uniform() is a function to generate
gren_rand_uniform()
It encodes a flip of the coin. (A perfectly balanced coin that is.)