46 #if defined(NECSXAURORA) 47 INTEGER,
PARAMETER ::
i8 = 8
49 INTEGER,
PARAMETER ::
i8 = selected_int_kind(18)
61 FUNCTION kiss64(seed)
RESULT(res)
64 INTEGER(KIND=I8) :: res
65 INTEGER(KIND=I8),
OPTIONAL :: seed
67 INTEGER(KIND=I8),
save :: x, y, z, c
70 / 1234567890987654321_i8, &
71 362436362436362436_i8, &
72 1066149217761810_i8, &
73 123456123456123456_i8 /
75 IF(
PRESENT(seed))
THEN 80 IF (ishft(x,-63_i8) .EQ. ishft(t,-63_i8))
THEN 81 c = ishft(x, -6) + ishft(x, -63_i8)
83 c = ishft(x, -6) + 1 - ishft(x+t, -63_i8)
86 y = ieor(y, ishft(y,13_i8))
87 y = ieor(y, ishft(y,-17_i8))
88 y = ieor(y, ishft(y,43_i8))
90 z = 6906969069_i8 * z + 1234567
100 INTEGER(KIND=I8),
save :: i,q(20632),carry,xcng,xs,indx
101 data i,carry,xcng,xs,indx &
110 #if !defined(NECSXAURORA) 115 xcng = xcng*6906969069_i8+123
116 xs = ieor(xs,ishft(xs,13))
117 xs = ieor(xs,ishft(xs,-17))
118 xs = ieor(xs,ishft(xs,43))
123 IF(indx <= 20632)
THEN 130 xcng=xcng*6906969069_i8+123
131 xs=ieor(xs,ishft(xs,13))
132 xs=ieor(xs,ishft(xs,-17))
133 xs=ieor(xs,ishft(xs,43))
137 FUNCTION refill()
RESULT(s)
140 INTEGER(KIND=I8) :: i,s,z,h
144 z = ishft(ishft(q(i),41),-1) &
145 + ishft(ishft(q(i),39),-1) &
147 carry=ishft(q(i),-23)+ishft(q(i),-25)+ishft(z,-63)
148 q(i)=not(ishft(z,1)+h)
160 FUNCTION i8tod(x)
RESULT(res)
163 INTEGER(KIND=I8) :: x
165 #if defined(NECSXAURORA) 166 INTEGER(KIND=8) :: long
169 #if defined(NECSXAURORA) 173 res = (
REAL(x) / huge(long)) / 2048. + 0.5
175 res = 0.5e+0 * (
REAL(x) /
REAL(huge(x))) + 0.5e+0
integer(kind=i8) function, public superkiss64()
real function, public dkiss64()
integer(kind=i8) function, public kiss64(seed)
integer(kind=i8) function refill()
integer, parameter, public i8
real function i8tod(x)
Convert integer I8 random numbers to double precision real values in [0,1].