HP Fortran Programmer's Guide (March 2010)
Controlling data storage
Increasing default data sizes
Chapter 3 111
Increasing default data sizes
The +autodbl and +autodbl4 options enable you to increase the default sizes (that is, the
number of storage bytes) for both constants and variables of default numeric and logical types.
Unlike the +real_constant option, the +autodbl and +autodbl4 options affect both
constants and variables of both real and integer types. (For information about using the
+real_constant option, see “Increasing the precision of constants” on page 109.)
When compiled with the +autodbl and +autodbl4 options, constants are treated as though
they had twice the default number of bytes (4) available for evaluating them. The effect of
these options is to increase the range of default integers and the precision of default reals.
The +autodbl and +autodbl4 options have no effect on the size of entities declared with the
CHARACTER, BYTE, or DOUBLE COMPLEX statements, nor on entities that are explicitly sized.
That is, if a variable is declared with a kind parameter or if a constant has a kind parameter,
it is unchanged by +autodbl or +autodbl4.
NOTE HP Fortran interprets the kind parameter as indicating the number of storage
bytes to allocate for a variable. When used with variables and constants of type
real, the kind parameter also indicates the precision: 4 for single-precision, 8
for double-precision, and 16 for quad-precision.
Promoting double-precision variables to quad-precision can have a severe impact on
performance because the instructions to perform quad-precision operations are implemented
in software. If you are concerned about performance and want to increase default data sizes,
consider using the +autodbl4 option, which does not promote variables declared with the
DOUBLE PRECISION statement. There is no other difference between +autodbl or +autodbl4.
These options affect all files on the command line. To increase the size or precision of selected
variables and constants, use the kind parameter.
Figure 3-1 on page 112 shows the default data types whose sizes are changed by the +autodbl
and +autodbl4 options.