The 8 refers to the number of bytes that the data type uses.

So a 32-bit integer is integer*4 along the same lines.

A quick search found this guide to Fortran data types, which includes:

The "real*4" statement specifies the variable names to be single precision 4-byte real numbers which has 7 digits of accuracy and a magnitude range of 10 from -38 to +38. The "real" statement is the same as "real*4" statement in nearly all 32-bit computers.

and

The "real*8" statement specifies the variable names to be double precision 8-byte real numbers which has 15 digits of accuracy and a magnitude range of 10 from -308 to +308. The "double precision" statement is the same as "real*8" statement in nearly all 32-bit computers.


There are now at least 4 ways to specify precision in Fortran.

As already answered, real*8 specifies the number of bytes. It is somewhat obsolete but should be safe.

The new way is with "kinds". One should use the intrinsic functions to obtain the kind that has the precision that you need. Specifying the kind by specific numeric value is risky because different compilers use different values.

Yet another way is to use the named types of the ISO_C_Binding. This question discusses the kind system for integers -- it is very similar for reals.