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's rounding. The b variable will either be 0 or 1.