SPACING
— Smallest distance between two numbers of a given typeRESULT = SPACING(X)
X | Shall be of type REAL . |
PROGRAM test_spacing INTEGER, PARAMETER :: SGL = SELECTED_REAL_KIND(p=6, r=37) INTEGER, PARAMETER :: DBL = SELECTED_REAL_KIND(p=13, r=200) WRITE(*,*) spacing(1.0_SGL) ! "1.1920929E-07" on i686 WRITE(*,*) spacing(1.0_DBL) ! "2.220446049250313E-016" on i686 END PROGRAM
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-4.9.3/gfortran/SPACING.html