Floating-Point Data

A floating-point item is a numeric data item that allows for a very wide range of values. However, compared to other numeric data types in COBOL, floating-point data is less accurate. Most computer languages use floating-point to represent non-integer values. This makes floating-point a good method for sharing non-integer data with these other languages.

Floating-point data items differ in several ways from normal numeric data items:

Because floating-point items do not maintain accuracy very well, you should limit their use. Some examples where floating-point is appropriate are: