Module with subrotuines for generating integer and real random numbers.
This subroutines were taken from Numerical Recipes in Fortran 90,
and provide a way for generating random numbers of 'better quality'
in a faster way than build-in Fortran random generators (at least
better than those of Fortran 77). For more details we refer the user
to Numerical Recipes in Fortran 90.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=8), | public, | parameter | :: | iv | = | 4101842887655102017_8 | |
integer(kind=8), | public, | parameter | :: | iw | = | 1_8 | |
integer(kind=8), | public, | parameter | :: | a | = | 4294957665_8 | |
integer(kind=8), | public, | parameter | :: | b | = | 4294967295_8 | |
integer(kind=8), | public, | parameter | :: | d | = | 2862933555777941757_8 | |
integer(kind=8), | public, | parameter | :: | e | = | 7046029254386353087_8 | |
real(kind=rp), | public, | parameter | :: | rcoeff | = | 5.42101086242752217E-20_rp | |
type(URAND), | private | :: | urand_vars |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=8), | intent(out), | optional | :: | irand |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4), | intent(out) | :: | irand32 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(out) | :: | rrand |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(inout), | DIMENSION(:) | :: | rrand |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer(kind=8), | public | :: | u | ||||
integer(kind=8), | public | :: | v | ||||
integer(kind=8), | public | :: | w |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=8), | intent(in) | :: | seed |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=8), | intent(out), | optional | :: | irand |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4), | intent(out) | :: | irand32 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(inout), | DIMENSION(:) | :: | rrand |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rp), | intent(out) | :: | rrand |