Nepedia
Back to Discover
Fluent Reader
🔢

Floating-point arithmetic

math Maturity 7-9 Next article →

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.

Float example
Float example

To handle these extremes, computers use floating-point arithmetic. This system lets a computer represent very large and very small numbers using a fixed number of digits. It works much like scientific notation that you might use in science class. This method allows the computer to process math very quickly.

A number line representing single-precision floating point's numbers and numbers that it cannot display
A number line representing single-precision floating point's numbers and numbers that it cannot display

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.

FloatingPointPrecisionAugmented
FloatingPointPrecisionAugmented

If the exponent is a large positive number, the dot moves to the right to make a huge number. If the exponent is a negative number, the dot moves to the left to make a tiny number. This "floating" dot is why we call it floating-point.

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.

Float example
Float example

This means the numbers are not spaced out perfectly evenly. The gap between two numbers changes depending on the exponent. Most computers today use base two, which is called binary. However, some systems use base ten, which is the decimal system we use every day.

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.

Quevedo 1917
Quevedo 1917

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.

Z3 Deutsches Museum
Z3 Deutsches Museum

If a computer does not have an FPU, it can use software to do the math instead. The speed of these operations is often measured in FLOPS. This measurement is very important for computers that do heavy math. It helps us understand how fast a system can solve big problems.

419 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (8)
File:Z3 Deutsches Museum.JPG
Z3 Deutsches Museum.JPG
File:A number line representing single-precision floating point's numbers and numbers that it cannot display.png
A number line representing...
File:FloatingPointPrecisionAugmented.png
FloatingPointPrecisionAugmented.png
File:Quevedo 1917.jpg
Quevedo 1917.jpg
File:Konrad Zuse (1992).jpg
Konrad Zuse (1992).jpg
File:William Kahan 2008.jpg
William Kahan 2008.jpg
File:Float example.svg
Float example.svg
File:Resistors in Parallel.svg
Resistors in Parallel.svg
More to explore

🔬 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.