Floating point/Introduction

< Floating point

What Floating Point Is

Floating point is a way to represent numbers and do arithmetic in computing machines, ranging from simple calculators to computers.

Take the number π. In order for us to accurately represent the area of a circle with radius 3, we have to notate the area as 9π. We can easily compare 9π to other numbers, such as 27, 400, or e2. A computer can't. In order for the computer to compare 9π to these numbers, it first has to compute 9π, and store this number. In order for this number to be accurate, it has to have an infinite storage space. This would imply a huge cost (infinite), and little would be gained. Instead, the computer rounds 9π to some arbitrary place, and this uses this stored number in calculations.

If the stored number has enough accuracy, then we're fine. But sometimes there are problems. If all numbers are stored in three decimal digits, then \pi is stored as 3.14. 9\pi would be computed as 9 × 3.14 = 28.26 ~ 28.3. If we continue to have to use this number, and we repeat this process, eventually, our number will continue to become inaccurate.

Who This Course is For

This course is for those interested in computer science and mathematics. Additionally, anyone using computers for numerical purposes can benefit in knowing what can go wrong in a computation.

Why This is Important

Numerical errors vis-a-vis computing devices have cost the world billions of dollars and have cost lives. This may be very surprising, given at first glance, these problems seem very simple. However, because of their simplicity, these issues are often overlooked.

Homework

Find another example of a costly floating point error on the internet. What was the problem? How much did it cost?

References

  1. "The Pentium Chip Story: A Learning Experience," by Vince Emery. Accessed 21-04-2008
  2. Cheney Ward and David Kincaid. Numerical Mathematics and Computing. 5th ed. Belmont, CA: Thomson, 2004.
  3. Cheney Ward and David Kincaid. Numerical Mathematics and Computing. 5th ed. Belmont, CA: Thomson, 2004.
This article is issued from Wikiversity - version of the Friday, July 03, 2009. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.