> The disadvantage of that is, of course, that it gets you twice as much
> precision as the default, but you don't know for sure what it the
> default is, so the actual precision is uncertain. What nobody so far
> has suggested (unless I missed it) is to use a handy Fortran2008 feature:
>
> USE ISO_FORTRAN_ENV
>
> and then declare variables as:
>
> REAL(REAL64) :: whatever
>
> This guarantees you a 64-bit floating-point representation whether that
> is the default for REAL type on that hardware or not. Similarly REAL32
> and REAL128 are available, but I suppose the latter might not work on
> all systems.
But we VMS guys know that specifying 64 bits doesn't uniquely specify
the precision.
|