开发者

Deriving a random long value from random integers

I have a method int randInt(int min, int max) that generates a random integer between min and max inclusive. It interfaces with an external system that has a good source of entropy.

The external system only generates 32-bit integers, 开发者_StackOverflowwhile I need to get a 64-bit long.

Is it possible to compose several random integers to create a long without introducing any new bias?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜