In a small application written in C/C++, I am facing a problem with the rand function and maybe the seed :
rand
I want to produce a sequence of random numbers th
If you want different orders of magnitude, why not simply try pow(2, rand())? Or perhaps choose the order directly as rand(), as Harold suggested?
pow(2, rand())