What is Floating point Arithmetic?

What is Floating point Arithmetic?

March 21, 2019
3 min read
525 views
0

What is Floating point Arithmetic?

Floating-point arithmetic is considered an esoteric subject by many people. Floating point arithmetic derives its name from something that happens when you use exponential notation. It's also surprising that floating-point is ubiquitous in computer systems.

Almost every computer language has a floating-point data type - from PCs to supercomputers have floating-point accelerators, most compilers will be called upon to compile floating-point algorithms from time to time, even virtually every operating system must respond to floating-point exceptions such as overflow.

In 1914, Leonardo Torres y Quevedo designed an electro-mechanical version of Charles Babbage's Analytical Engine, and included floating-point arithmetic. In 1985, the IEEE 754 Standard for Floating-Point Arithmetic was established, and since the 1990s, the most commonly encountered representations are those defined by the IEEE.

A floating-point system can be used to represent, with a fixed number of digits, numbers of different orders of magnitude: e.g. the distance between galaxies or the diameter of an atomic nucleus can be expressed with the same unit of length. The result of this dynamic range is that the numbers that can be represented are not uniformly spaced; the difference between two consecutive representable numbers grows with the chosen scale. The speed of floating-point operations, commonly measured in terms of FLOPS, is an important characteristic of a computer system, especially for applications that involve intensive mathematical calculations. The first commercial computer with floating-point hardware was Zuse's Z4 computer, designed in 1942–1945.

Consider the number 158 - it can be written using the exponential notation as:

1.58 * 102

15.8 * 101

158 * 100

.158 * 103

1580 * 10-1 etc.

All of these representations of the number 158 are numerically equivalent. They differ only in their normalization - where the decimal point appears in the first number. In each case, the number before the multiplication operator "*" represents the significant figures in the number, which call this number the significand.

Squeezing infinitely many real numbers into a finite number of bits requires an approximate representation. Although there are infinitely many integers, in most programs the result of integer computations can be stored in 32 bits.

In contrast, given any fixed number of bits, most calculations with real numbers will produce quantities that cannot be exactly represented using that many bits. Therefore the result of a floating-point calculation must often be rounded in order to fit back into its finite representation. This rounding error is the characteristic feature of floating-point computation.

Was this article helpful?Vote to let the author know
0
Share this article

Loading comments...

Related Articles

Why Proactive Technology Management Matters for Growing Businesses

Why Proactive Technology Management Matters for Growing Businesses

Proactive technology management helps businesses prepare for these demands rather than simply responding when something goes wrong. By regularly reviewing systems, identifying risks and planning improvements, growing companies can build a stronger technology foundation for the future.

5 views
Read More
Read full article: Why Proactive Technology Management Matters for Growing Businesses
Free AI Tools Every Developer Should Try in 2026

Free AI Tools Every Developer Should Try in 2026

The good news is that developers are better served by genuinely free options than almost any other audience. This article covers the categories where free tools are actually usable, and what to watch out for.

6 views
Read More
Read full article: Free AI Tools Every Developer Should Try in 2026
The Weld Decides The Rating

The Weld Decides The Rating

The component rating covers the component. What determines how much the installed anchor can actually take is the weld holding it there and the structure underneath it, and neither of those came from the manufacturer

61 views
Read More
Read full article: The Weld Decides The Rating