Random Number Generator
Max 100
A random number generator produces numbers with no predictable pattern within a specified range. Computers generate pseudorandom numbers using deterministic algorithms seeded by a starting value. True random numbers require physical entropy sources.
💡
Tip: Seeding a pseudorandom number generator with the same seed always produces the same sequence. This is useful for reproducible simulations — save the seed, reproduce the results exactly.
- 1JavaScript: Math.random() returns a float in [0, 1)
- 2Integer in [min, max]: Math.floor(Math.random() × (max - min + 1)) + min
- 3Cryptographic: crypto.getRandomValues() — suitable for security applications
- 4Distribution: uniform (equal probability for each value) by default
| Application | Type needed | Why |
|---|---|---|
| Games and simulations | Pseudorandom | Speed matters, not security |
| Statistical sampling | Pseudorandom | Reproducible with same seed |
| Cryptography | Cryptographically secure | Unpredictable is critical |
| Lotteries | True random | Fairness and legality |
| Science experiments | Pseudorandom | Reproducibility needed |
⭐
Fun Fact
The RAND Corporation published a 400-page book in 1955 containing one million random digits — essential before computers were available. It was sold as a reference for statisticians and scientists. A used copy now sells for $200+ on Amazon.
References
🔒
୧୦୦% ମାଗଣା
ପଞ୍ଜୀକରଣ ଆବଶ୍ୟକ ନାହିଁ
✓
ସଠିକ
ଯାଞ୍ଚ ହୋଇଥିବା ସୂତ୍ର
⚡
ତତ୍କ୍ଷଣ
ତତ୍କ୍ଷଣ ଫଳ
📱
ମୋବାଇଲ୍ ଅନୁକୂଳ
ସମସ୍ତ ଡିଭାଇସ୍