Why does C++ rand() seem to generate only numbers of the same order of magnitude?

前端 未结 9 2067
孤独总比滥情好
孤独总比滥情好 2021-01-30 01:14

In a small application written in C/C++, I am facing a problem with the rand function and maybe the seed :

I want to produce a sequence of random numbers th

9条回答
  •  情歌与酒
    2021-01-30 01:47

    The lighter green is the region between 0 and 225; the darker green is the region between 225 and 230. The ticks are powers of 2.

    distribution

提交回复
热议问题