2023-02-26 01:10

This commit is contained in:
2023-02-26 01:11:05 +09:00
commit 5960e7ca43
6 changed files with 25 additions and 0 deletions

18
hello/hello.f90 Normal file
View File

@@ -0,0 +1,18 @@
program variables
use, intrinsic :: iso_fortran_env, only: sp=>real32, dp=>real64
! use, intrinsic :: iso_c_binding, only: sp=>c_float, dp=>c_double
implicit none
real :: val0
real(sp) :: val1 ! 단정도
real(dp) :: val2 ! 배정도
val0 = 0.
val1 = 0._sp
val2 = 0._dp
print *, 'Max = ', huge(val0)
print *, 'Max32 = ', huge(val1)
print *, 'Max64 = ', huge(val2)
end program variables