Computers use math to work.
Computers use special math to work.
Computers need to handle all kinds of numbers.
A floating-point number has two main parts. The first part is the significand. This is a string of digits. The second part is the exponent. The exponent tells the dot where to move. If the exponent is large, the number is big. If the exponent is small, the number is tiny.
Most computers use base two for this math. Some use base ten. Sometimes, the math is not perfect. A computer might have to round a number. This happens when a number has too many digits. 
Computers must work with numbers that are incredibly different in size. They might measure the tiny distance between protons in an atom. They might also measure the huge distance between distant galaxies.
A floating-point number is made of two main parts. The first part is called the significand. This is a sequence of digits that shows the most important parts of the number. The second part is the exponent. The exponent tells the radix point, or the decimal dot, where to move. 
Because computers have limited space, they cannot always be perfect. Sometimes a math result has more digits than the computer can store. In these cases, the computer must use rounding. It picks the nearest representable number to keep the math going.
People have been working on these ideas for a long time. In 1914, a Spanish engineer named Leonardo Torres Quevedo published an analysis of floating point. He looked at these ideas using the concept of an analytical engine. Later, the IEEE 754 Standard for Floating-Point Arithmetic was established in 1985. This created a common way for computers to handle these numbers. Since the 1990s, most computers have used these IEEE representations. 
Doing this math can be a hard job for a computer's brain. Some computers use special hardware called a Floating-Point Unit, or FPU. People sometimes call these math coprocessors.
Floating-point arithmetic is a method used by computers to represent and calculate real numbers. In mathematics, numbers can be incredibly vast or microscopically small. A computer might need to measure the distance between distant galaxies or the tiny space between protons in an atom.
To understand how this works, think of scientific notation. A floating-point number is logically composed of two distinct parts: the significand and the exponent. The significand, also called the mantissa or coefficient, is a signed string of digits. The length of this significand determines the precision of the number. The exponent is a signed integer that modifies the magnitude of the number. 
In practice, the computer calculates the value by multiplying the significand by the base raised to the power of the exponent. Most modern computers use base two, or binary, though some use base ten, known as decimal floating point. If the exponent is positive, the radix point shifts to the right, creating a larger number. If the exponent is negative, the point shifts to the left, creating a smaller number. This mechanism allows the same number of digits to represent vastly different orders of magnitude.
Because the significand has a fixed length, the system cannot always represent a number perfectly. For example, the fraction 1/3 results in an infinite string of repeating digits in both decimal and binary. If a math operation produces a result with more digits than the system allows, the computer must use rounding. It identifies the nearest representable floating-point number to complete the calculation. This means that floating-point numbers are not uniformly spaced on a number line. The gap between two consecutive numbers changes depending on the value of the exponent.
The history of these ideas stretches back over a century. In 1914, the Spanish engineer Leonardo Torres Quevedo published an analysis of floating point based on the concept of an analytical engine. 
Performing these complex calculations requires significant computational power. Some systems use software implementations, often called "softfloat," to handle the math. However, most modern computers include a dedicated hardware component called a Floating-Point Unit, or FPU. These are sometimes called math coprocessors because they are specially designed for these operations.
While floating-point arithmetic is the most common method, other systems exist for specific needs. Fixed-point representation uses a set position for the radix point, which is often used in simpler embedded processors. There are also logarithmic number systems, which represent numbers using their logarithms. Some specialized software uses rational arithmetic to represent numbers as exact fractions, avoiding the need for approximation entirely. Even so, floating-point arithmetic remains the standard for most general-purpose computing due to its unique balance of speed and range.
🖼️ Images & Media (8)
More to explore
✨ What else?
Related topics you might enjoy
🔬 Go deeper
More advanced topics to explore
🪜 Step back
Simpler topics to build understanding
What is Nepedia?
A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.