precision(3f) - [FORTRAN:INTRINSIC:NUMERIC MODEL] Decimal precision of a real kind
result = precision(x)
precision(x) returns the decimal precision in the model of the type of X.
X Shall be of type REAL or COMPLEX.
The return value is of type INTEGER and of the default integer kind.
Sample program:
program demo_precision implicit none real(kind=4) :: x(2) complex(kind=8) :: yprint *, precision(x), range(x) print *, precision(y), range(y) end program demo_precision
[[Fortran 95]] and later
[[Inquiry function]]
selected_real_kind(3), range(3)
precision (3) | March 11, 2021 |