Numeric Data Types

There are two categories of numeric data types: exact and approximate. The exact data types are the integer data types. The approximate data types are the floating point data types.

Integer Data Types

There are three integer data types: I1 (one-byte), I2 (two-byte), and I4 (four-byte). Integer2 is a synonym for I2 and integer4 is a synonym for I4.

The following table lists the ranges of values for each integer data type:

Integer Data Type | Lowest Possible Value | Highest Possible Value |

I4 (integer4) | -2,147,483,648 | +2,147,483,647 |

I2 (integer2) | -32,768 | +32,767 |

I1 | -128 | 127 |

Floating Point Data Types

A floating-point value is represented either as whole plus fractional digits (for example, 123.45) 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: float4 (4-byte) and float (8-byte). (Real is a synonym for float4, and 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.

For information about the correct notation for a floating-point numeric literal, see Numeric Literals.

Last modified date: 06/10/2024