Elemental Intrinsic Function (Generic): Converts a number to double-precision real type.
Syntax
result = DBLE (a)
a
(Input) Must be of type integer, real, or complex.
Results
The result type is double precision real (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) | |
DBLE 2 | 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) | |
1 These specific functions cannot be passed as actual arguments. 2 For compatibility with older versions of Fortran, DBLE can also be specified as a specific function. |
See Also
Examples
DBLE (4) has the value 4.0.
DBLE ((3.4, 2.0)) has the value 3.4.