Manual Reference Pages  - dble (3fortran)

NAME

DBLE(3) - [TYPE:CONVERSION] Converstion to double precision real

SYNOPSIS

result = dble(a)

         elemental doubleprecision function dble(a)

doubleprecision :: dble TYPE(kind=KIND),intent(in) :: a

CHARACTERISTICS

o A my be integer, real, complex, or a BOZ-literal-constant
o the result is a doubleprecision real.

DESCRIPTION

DBLE(3) Converts A to double precision real type.

OPTIONS

o A : a value to convert to a doubleprecision real.

RESULT

The return value is of type doubleprecision. For complex input, the returned value has the magnitude and sign of the real component of the input value.

EXAMPLES

Sample program:

    program demo_dble
    implicit none
    real:: x = 2.18
    integer :: i = 5
    complex :: z = (2.3,1.14)
       print *, dble(x), dble(i), dble(z)
    end program demo_dble

Results:

      > 2.1800000667572021  5.0000000000000000   2.2999999523162842

STANDARD

FORTRAN 77

SEE ALSO

o AIMAG(3) - Imaginary part of complex number
o CMPLX(3) - Convert values to a complex type
o INT(3) - Truncate towards zero and convert to integer
o NINT(3) - Nearest whole number
o OUT_OF_RANGE(3) - Whether a value cannot be converted safely.
o REAL(3) - Convert to real type
Fortran intrinsic descriptions (license: MIT) @urbanjost


Nemo Release 3.1 dble (3fortran) February 19, 2025
Generated by manServer 1.08 from 61b598e9-104a-4644-bad8-0c37e02671cf using man macros.