We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rtol
ishftc
1 parent 6ea8484 commit 933916bCopy full SHA for 933916b
src/stdlib_random.fypp
@@ -78,27 +78,16 @@ module stdlib_random
78
integer(int64) :: res, t
79
80
if(.not. seed_initialized) call random_distribution_seed_iint64(si,t)
81
- res = rol64(st(2) * 5, 7) * 9
+ res = ishftc(st(2) * 5, 7) * 9
82
t = shiftl(st(2), 17)
83
st(3) = ieor(st(3), st(1))
84
st(4) = ieor(st(4), st(2))
85
st(2) = ieor(st(2), st(3))
86
st(1) = ieor(st(1), st(4))
87
st(3) = ieor(st(3), t)
88
- st(4) = rol64(st(4), 45)
+ st(4) = ishftc(st(4), 45)
89
end function xoshiro256ss
90
91
- pure function rol64(x, k) result(res)
92
- integer(int64), intent(in) :: x
93
- integer, intent(in) :: k
94
- integer(int64) :: t1, t2, res
95
-
96
- t1 = shiftr(x, (64 - k))
97
- t2 = shiftl(x, k)
98
- res = ior(t1, t2)
99
- end function rol64
100
101
102
function splitmix64(s) result(res)
103
! Written in 2015 by Sebastiano Vigna (vigna@acm.org)
104
! This is a fixed-increment version of Java 8's SplittableRandom
0 commit comments