Floating-point Data Type
A floating-point value is represented either as whole plus fractional digits (like decimal values) or as a mantissa plus an exponent. The following figure illustrates the mantissa and exponent parts of floating-point values:
There are two floating-point data types:
• real (4‑byte)
• float (8‑byte)
Note: Float4 is a synonym for real. Float8 and double precision are synonyms for float.
Floating-point numbers are double‑precision quantities stored in four or eight bytes. The range of float values is processor‑dependent, and the precision is approximately 16 significant digits.
Specify the precision (number of significant bits) for a floating-point value using the following (optional) syntax:
float(n)
where n is a value from 0 to 53.
OpenSQL allocates storage according to the precision you specify, depending on the host DBMS and hardware. For information about the correct notation for a floating-point numeric literal, see
Numeric Literals (see page
Numeric Literals).