# Decimal Random Number Generator

Created by Anna Szczepanek, PhD
Reviewed by Davide Borchia
Last updated: Feb 02, 2023

Omni's decimal random number generator will assist you in your math or programming tasks by producing as many uniformly distributed random decimal numbers as you need and from the range you need. In the article below, we will briefly explain what random and pseudo-random decimals are.

## What is a random number generator?

A random (or rather pseudo-random) number generator is an algorithm that outputs a sequence of numbers. These numbers should follow no discernible pattern, i.e., it should not be possible to predict the next number of the sequence.

Since there's an algorithm behind the generation procedure, these numbers are not truly random yet they are good enough for most applications. What our decimal random number generator produces is in fact a sequence of pseudo-random decimal numbers.

## Decimal vs integer random numbers

A decimal number is a number written in the base-10 system, i.e., the number system that is most commonly used nowadays. Examples of decimal numbers are 0.33, 2, 2.34, etc.

A decimal number consists of a whole number part and a fractional part. For example, 2.34 has 2 as its whole number part and 0.34 as its fractional part. There is no whole number part in 0.33, while 2 has no fractional part. The latter number can also be written as 2.0. It is, in fact, an example of an integer, which is a decimal number with no fractional part.

When it comes to drawing random numbers, an important difference between integers and decimal numbers is that in every range [a,b], there are finitely many integers but infinitely many decimal numbers. If we draw decimal numbers from any continuous distribution, in particular from the uniform distribution, then the probability of getting duplicates is zero.

## How to use this random number generator with decimals?

Our random number generator with decimals is really straightforward to use:

1. Specify the range from which you want to draw.
2. Tell us how many numbers you want.
3. If you wish, you may adjust the precision, i.e., the number of decimal places.
4. Our decimal random number generator can sort the numbers it produced - just switch the Sort option to Yes.
5. Similarly, you can choose between List and Column output.

🙋 Enter 0 as Precision to produce integers with the help of our random decimal number generator.

## FAQ

### How do I generate a random number from a given range?

If you want to generate a random number from the interval [a, b]:

1. Generate a random number from the interval [0, 1].
2. Multiply this number by (b - a).
3. Add a to the result of Step 2.
4. That's it! What you got in Step 3 is a random number from [a,b].

### Can I express every integer as a decimal?

Yes, every integer can be expressed as a decimal number. In fact, there are two ways to do that: for example, the integer 2 can be expressed as 2 and as 1.999… (with the 9 repeating infinitely many times). In computer science, we would also consider 2.0 or 2.000 as different from 2.

### How do I obtain true random numbers?

Random numbers generated by computer algorithms are, in fact, pseudo-random: they do follow some pattern, yet a highly complicated one. To get a true random number, we can exploit various physical systems, in particular quantum systems.

Anna Szczepanek, PhD
How many numbers?
Minimum value
Maximum value
Precision
Sort results
No
Output format
List
People also viewed…

### Central limit theorem

The central limit theorem calculator allows you to calculate the sample mean and the sample standard deviation for the given population distribution and sample size.

### Circumference

Use this free circumference calculator to find the area, circumference and diameter of a circle.

### Cubic regression

This cubic regression calculator will help you determine the polynomial of degree 3 that best fits your two-dimensional dataset.

### Ideal egg boiling

Quantum physicist's take on boiling the perfect egg. Includes times for quarter and half-boiled eggs. 