Clicky
Showing changes from revision #2 to #3:
(追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)
digits(x)
returns the number of significant digits of the internal model representation of x
. For example, on a system using a 32-bit floating point representation, a default real number would likely return 24.
Fortran 95 and later
(削除) Inquiry function (削除ここまで)(追記) Inquiry function (追記ここまで)
result = digits(x)
x
- The type may be integer
or real
.The return value is of type integer
.
program test_digits
integer :: i = 12345
real :: x = 3.143
real(8) :: y = 2.33
print *, digits(i)
print *, digits(x)
print *, digits(y)
end program test_digits