dist_rand Interface

public interface dist_rand

Version experimental

Generation of random integers with different kinds (Specification)


Contents


Module Procedures

private function dist_rand_iint8(n) result(res)

Random integer generation for various kinds result = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind Result will be operated by bitwise operators to generate desired integer and real pseudorandom numbers

Arguments

Type IntentOptional AttributesName
integer(kind=int8), intent(in) :: n

Return Value integer(kind=int8)

private function dist_rand_iint16(n) result(res)

Random integer generation for various kinds result = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind Result will be operated by bitwise operators to generate desired integer and real pseudorandom numbers

Arguments

Type IntentOptional AttributesName
integer(kind=int16), intent(in) :: n

Return Value integer(kind=int16)

private function dist_rand_iint32(n) result(res)

Random integer generation for various kinds result = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind Result will be operated by bitwise operators to generate desired integer and real pseudorandom numbers

Arguments

Type IntentOptional AttributesName
integer(kind=int32), intent(in) :: n

Return Value integer(kind=int32)

private function dist_rand_iint64(n) result(res)

Random integer generation for various kinds result = [-2^k, 2^k - 1], k = 7, 15, 31, 63, depending on input kind Result will be operated by bitwise operators to generate desired integer and real pseudorandom numbers

Arguments

Type IntentOptional AttributesName
integer(kind=int64), intent(in) :: n

Return Value integer(kind=int64)