s*****i 发帖数: 355 | 1 这里大牛多,我来问一下。跟那个老题rand5生成rand7类似,我这样写对吗。谢谢 | s***t 发帖数: 49 | 2 I think, here the 31, 32 is the bit number.
If the assumption is that, both of them are uniformly distributed,
I think we can combine two 31bits to one 62bis, and just take 32 of them,
because each bit is uniformly
distributed as well.
【在 s*****i 的大作中提到】 : 这里大牛多,我来问一下。跟那个老题rand5生成rand7类似,我这样写对吗。谢谢
|
|