...
 
Commits (2)
......@@ -8,13 +8,25 @@ program float
integer, parameter :: ep = selected_real_kind(18)
integer, parameter :: qp = selected_real_kind(33)
print '("A real of precision 6 is ", (i0), " bytes (binary32)")', sp
print '("A real of precision 15 is ", (i0), " bytes (binary64)")', dp
print '("A real of precision 18 is ", (i0), " bytes (80bit)")', ep
print '("A real of precision 33 is ", (i0), " bytes (binary128)")', qp
real(real32) :: r32
real(real64) :: r64
real(real128) :: r128
print '("A real32 is ", (i0), " bytes")', real32
print '("A real64 is ", (i0), " bytes")', real64
print '("A real128 is ", (i0), " bytes")', real128
print '(a, i0, a)', "A real of precision 6 is ", sp, " bytes (binary32)"
print '(a, i0, a)', "A real of precision 15 is ", dp, " bytes (binary64)"
print '(a, i0, a)', "A real of precision 18 is ", ep, " bytes (binary80)"
print '(a, i0, a)', "A real of precision 33 is ", qp, " bytes (binary128)"
print '(a, i0, a)', "A real32 is ", real32, " bytes"
print '(a, i0, a)', "A real64 is ", real64, " bytes"
print '(a, i0, a)', "A real128 is ", real128, " bytes"
print '(a, i0)', "The precision of a real32 is ", precision(r32)
print '(a, i0)', "The range of a real32 is ", range(r32)
print '(a, i0)', "The precision of a real64 is ", precision(r64)
print '(a, i0)', "The range of a real64 is ", range(r64)
print '(a, i0)', "The precision of a real128 is ", precision(r128)
print '(a, i0)', "The range of a real128 is ", range(r128)
end program float
......@@ -6,7 +6,7 @@ implicit none
real(dp), dimension(2) :: M
real(dp) :: ecc
real(dp), dimension(2) :: E
real(dp), dimension(size(M)) :: E
M = [2.0084512_dp, 0.0_dp]
ecc = 0.00877_dp
......