precision(3f) - [FORTRAN:INTRINSIC] Decimal precision of a real kind
Syntax
Description
Arguments
Return Value
Example
Standard
Class
See Also
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 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]], [[range]]
precision (3) | March 19, 2019 |