FLOAT

The FLOAT data type stores values as double-precision floating-point binary numbers with up to 16 significant digits.

Syntax

FLOAT [(precision)]
  1. FLOAT and DOUBLE PRECISION are synonyms.
  2. The precision can be specified, but it has no effect in programs.

Usage

The storage of FLOAT variables is based on 8 bytes of signed data ( =64 bits), this type is equivalent to the double data type in C.

Note: This data type is not recommended for exact decimal storage; use the DECIMAL type instead.

FLOAT variables are initialized to zero in functions, modules and globals.

FLOAT values can be converted to strings based on the DBFORMAT (or DBMONEY) environment variable setting.

Data type conversion can be controlled by catching the runtime exceptions. For more details, see Handling type conversion errors.