You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
subroutinelcg_int32(x)
! Linear congruential generator
! https://en.wikipedia.org/wiki/Linear_congruential_generator
integer(int32), intent(out) :: x
integer(int32), save:: s =26250493
s = modulo(s *48271, 2147483647)
x = s
endsubroutinesubroutinelcg_real32(x)
real(real32), intent(out) :: x
integer(int32) :: s
call lcg_int32(s)
x = s /2147483647._real32endsubroutine
The text was updated successfully, but these errors were encountered:
There are several algorithms that might be good for benchmarks:
LCG algorithm:
The text was updated successfully, but these errors were encountered: