Daily Bits Email

The email you entered is already receiving Daily Bits Emails!

Random Number GeneratorDiscount

Random Number Generator

Generate Customized Random Number Sequences

for PC  Download Trial
Platforms: Windows 98, 2000, XP, Vista
Random Number Generator Screenshot

Remember that time when you were a little kid, and your brother bet you that you couldn't count all the way up to a million, and you tried and tried, and you quit somewhere around 439, dead-tired, dry-mouthed, and with nothing to show for it? In programming, such is the case with random number generation - a simple concept that can get a little complex in the execution.

Sooner or later, you're going to want to produce a set of random numbers for your programming project. It's not as simple as designating minimum and maximum values either - depending on what you need it for, you may want to exclude certain digits from your random number set, or have one or two numbers only show up once - like if you were programming a lottery machine, for example.

Random Number Generator creates random number sequences that can be configured according to your needs. In addition to specifying the range of numbers, you can also designate the number of random numbers to be generated, and whether those numbers should be unique. What's more, you can limit your random number sequence to even or odd integers, and exclude certain digits (like, if you were hating on the number '9', for instance) from the set.

In addition to integers, Random Number Generator is equally capable of doling out sequences of random floating point numbers. Designate a delimiter of your choice to separate each number from its neighbor, and when all is said and done, you can save your output for use in your program!

With Random Number Generator, you are the king of random number sequences!

Review Written by Derek Lee
The Conversation
The Fine Print
  • Your discount coupon code will be applied to your purchase when you click the 'Buy Now' button.
  • BitsDuJour downloads use a discount coupon code that comes direct from the software vendor, so you'll always get the latest version of the software app sold under the same terms as a regular sale, just at a great promotional price.
  • Prices do not necessarily include taxes, which will vary by country.
Expand All Email Updates Load 13 Older Comments
Big Bad Wolf # Does what this software does, in fact even better
# You can generate different distribution (e.g. gauss)
# by changing random.random() to something else.
# Time taken? 1hr inclusive of testing

import random

exclude_digits = '12345'
min_value = 0
max_value = 1000
number_of_values = 100
decimal_places = 0

want_unique = True
values = []

while len(values) number_of_values:

number = random.random() * max_value + min_value
str_num = str(number)

for exclude_digit in exclude_digits:
str_num = str_num.replace(exclude_digit, '')

decimal_pos = str_num.find('.')

if decimal_places 0:
if (decimal_pos 0) and ((len(str_num) - decimal_pos - 1) decimal_places):
str_num = str_num[0:decimal_pos + 1 + decimal_places]
str_num = str_num[0:decimal_pos]

str_num = str_num.lstrip('0')
if len(str_num) 1: continue

if str_num[0] == '.':
str_num = '0'.join(str_num)

if want_unique:
if values.count(str_num) 0: continue

print len(values), ':', str_num
Feb 8 2009 at 2:41am Copy Link
Dave Yankov There you go again, Big Bad Wolf.

You're assuming the user has Visual Studio Express or even the desire or knowledge to use it.

Once again, here's an easy-to-use random number generator.

Much easier to use than some lava lamps.
Feb 8 2009 at 11:20am Copy Link
Stephen Cohen Whether this program generates good sequences of pseudo-random numbers or not depends on the algorithm used. There are very good and very bad algorithms.

By definition, forcing the elimination of a digit, such as "9" or forcing uniqueness destroys randomness. Besides, unless the numbers are rounded to a few digits, a truly random sequence will have an infinitesimal probability of having duplicates.

I assume that the software's default is to generate uniform pseudo-random sequences. There are statistical tests for both uniformity and randomness. These tests cannot PROVE that an algorithm generates truly uniform or random sequences, but if testing indicates non-uniformity or non-randomness, then the algorithm is almost certainly a poor one. I discovered this almost 30 years ago with the random number generator in a Casio scientific calculator. It was quite bad.
Feb 14 2009 at 5:20pm Copy Link
Martin Jay I've had a play, but I don't really have much use for this type of software.

I've noticed it appears to get itself in an endless loop if it's asked to perform an impossible task, such as producing ten unique random numbers of two digits that contain only 1 and 9.
Feb 15 2009 at 1:35am Copy Link

Development Tools Deals

Advanced Installer Professional (PC) Discount
for PC
Advanced Installer Professional
Create Secure and Reliable Installer Programs
VbsEdit (PC) Discount
for PC
Dramatically Reduce VBS Script Coding Time
Hackman Suite (PC) Discount
for PC
Hackman Suite
The Perfect Collection of Debugging Tools
PE Explorer (PC) Discount
for PC
PE Explorer
View, Edit, and Reverse Engineer EXE and DLL Files!
XML ValidatorBuddy (PC) Discount
for PC
XML ValidatorBuddy
Manage and Edit XML and JSON Documents
Like BitsDuJour on Facebook
BitsDuJour is for People who Love Software
Every day we review great Mac & PC apps, and get you discounts up to 100%
Follow Us
© Copyright 2024 BitsDuJour LLC. Code & Design. All Rights Reserved. Privacy Policy