### Numerical Precision

Integer, real and complex variables can be of different kinds, depending on how many bytes are used to store the data. Fortran provides a whole host of tools to declare the numerical precision of variables in ways that are independent of machine architecture. Here we cover only the "sloppy" way.

Integers can be stored in 1, 2, 4 and 8 bytes. Reals can be stored in 4, 8 and 16 bytes. Integers and reals with 4-bytes are generally called single precision, while 8-byte variables are called double precision.

The following is old-style and deprecated:

Parameters (constants) can also be of specified kinds:

Similarly, literal constants can be of different kinds:

There are a variety of inquiry functions that gives the programmer access to the properties of a variable that depend on its kind, or numerical precision. Here are some examples: