Home > Writings > Programming > Floating Point Essentials

Floating Point Essentials

Third revision - June 2010

Three blocks with the digits 1-3

Many debuting, and even experienced, programmers are at best unfamiliar with, sometimes completely unaware of, the ins and outs of floating point values and their use, which leads frequently to unexpected program behaviour or strange output results. If you have ever seen one of those invoices where the total displayed is fractionally different from the actual sum of the line items, then you are likely to have observed first hand the consequences of a lack of understanding of floating point arithmetic.

This article seeks to raise awareness of this topic and discusses specific points of interest with regard to handling, storing and manipulating floating point values in software. While I have used Delphi as the example environment, most of this article is by virtue of its topic generic and of relevance to every programmer.

Table of Contents

Next: Definitions and Overview

 

Floating Point Essentials

Science and Technology
News

Download

Printable version
(PDF Document)

Size: 75KB