Ticket #709: test_spdp.f90

File test_spdp.f90, 886 bytes (added by Ian Culverwell, 3 years ago)

test_spdp.f90

Line 
1! ifort17 -o test_spdp.exe test_spdp.f90
2
3program test_spdp
4
5integer, parameter :: sp=KIND(1.0), dp=KIND(1.d0)
6integer, parameter :: wp=sp
7!integer, parameter :: wp=dp
8real(sp) :: x4
9real(dp) :: x8
10
11real(wp) :: freq
12
13print*,'sp, dp, wp = ', sp, dp, wp
14
15freq = 1575420000_wp
16write(*,'(A,E20.10)')' 1575420000_wp = ', freq
17
18freq = 1.57542E9_wp
19write(*,'(A,E20.10)')' 1.57542E9_wp = ', freq
20
21
22x4 = 1575420000_sp
23write(*,'(A,E20.10)')' x4 = ', x4
24write(*,'(A,I20)')' 1575420000_sp = ', 1575420000_sp
25write(*,'(A,E20.10)')' 1575420000.0_sp = ', 1575420000.0_sp
26!write(10) -1.5_sp
27!write(10) 1.57542E9_sp
28write(10) 1575420000.0_sp
29
30x8 = 1575420000_dp
31write(*,'(A,E20.10)')' x8 = ', x8
32write(*,'(A,I20)')' 1575420000_dp = ', 1575420000_dp
33write(*,'(A,E20.10)')' 1575420000.0_dp = ', 1575420000.0_dp
34!write(11) -1.5_dp
35!write(11) 1.57542E9_dp
36write(11) 1575420000.0_dp
37
38
39end program test_spdp