Visible to Intel only — GUID: GUID-1E3BC26B-1F79-42D3-A8FB-3856FCC4B686
Visible to Intel only — GUID: GUID-1E3BC26B-1F79-42D3-A8FB-3856FCC4B686
DBLE
Elemental Intrinsic Function (Generic): Converts a number to double-precision real type.
result = DBLE (a)
a |
(Input) Must be of type integer, real, or complex, or a binary, octal, or hexadecimal literal constant. |
Results
The result type is double precision real (by default, REAL(8) or REAL*8). Functions that cause conversion of one data type to another type have the same effect as the implied conversion in assignment statements.
If a is of type double precision, the result is the value of the a with no conversion (DBLE( a) = a).
If a is of type integer or real, the result has as much precision of the significant part of a as a double precision value can contain.
If a is of type complex, the result has as much precision of the significant part of the real part of a as a double precision value can contain.
Specific Name 1 |
Argument Type |
Result Type |
---|---|---|
INTEGER(1) |
REAL(8) |
|
INTEGER(2) |
REAL(8) |
|
INTEGER(4) |
REAL(8) |
|
INTEGER(8) |
REAL(8) |
|
DBLE2 |
REAL(4) |
REAL(8) |
REAL(8) |
REAL(8) |
|
DBLEQ |
REAL(16) |
REAL(8) |
COMPLEX(4) |
REAL(8) |
|
COMPLEX(8) |
REAL(8) |
|
COMPLEX(16) |
REAL(8) |
|
1These specific functions cannot be passed as actual arguments. 2 The setting of compiler options specifying double size can affect DBLE. |
If the argument is a binary, octal, or hexadecimal literal constant, the result is affected by the assume old-boz option. The default option setting, noold-boz, treats the argument as a bit string that represents a value of the data type of the intrinsic, that is, the bits are not converted. If setting old-boz is specified, the argument is treated as a signed integer and the bits are converted.
The result values of DBLE are defined by references to the intrinsic function REAL with the same arguments. Therefore, the padding and truncation of binary, octal, and hexadecimal literal constant arguments to DBLE is the same as for the intrinsic function REAL.
Example
DBLE (4) has the value 4.0.
DBLE ((3.4, 2.0)) has the value 3.4.