3 ms·
Interesting, thanks! Any particular reason they limit the multiplier to 35 bits and the output to 48 bits? Edit: just noticed that Java limits the output to 32
by Yrlec 15y ago
Interesting, thanks! Any particular reason they limit the multiplier to 35 bits and the output to 48 bits?
Edit: just noticed that Java limits the output to 32 bits, not 48 (http://en.wikipedia.org/wiki/Linear_congruential_generator http://en.wikipedia.org/wiki/Linear_congruential_generator). How does it create 64 bit values, like long and double?
- marshray 15y agoProbably it generates 32 bits twice.
- gcp 15y agoAny particular reason they limit the multiplier to 35 bits and the output to 48 bits? Good question. There appears to be no good justification for this, but the generator is guaranteed by the docs. So it's possible the initial implementation was bad and everybody is required to follow it since.