next_real_dp Interface

public interface next_real_dp

Draw a uniform real(dp) in [0, 1).

Construction, identical for both engines and on every compiler: take a fresh 64-bit word w from the generator, keep its top 53 bits u = ibits(w, 11, 53) (an integer in [0, 253)), and return real(u, dp) * 2**-53. Every integer below 253 is exact in IEEE binary64 and 2-53 is a power of two, so the product is exact: no rounding, no compiler-dependent fused multiply-add, and the result can never reach 1.0. Values are therefore multiples of 2-53 in [0, 1 - 2**-53].

Calls

interface~~next_real_dp~~CallsGraph interface~next_real_dp next_real_dp proc~pcg32_next_real_dp pcg32_next_real_dp interface~next_real_dp->proc~pcg32_next_real_dp proc~splitmix64_next_real_dp splitmix64_next_real_dp interface~next_real_dp->proc~splitmix64_next_real_dp proc~pcg32_next_u64 pcg32_t%pcg32_next_u64 proc~pcg32_next_real_dp->proc~pcg32_next_u64 proc~real_from_word real_from_word proc~pcg32_next_real_dp->proc~real_from_word proc~splitmix64_next_real_dp->proc~real_from_word proc~splitmix64_next_u64 splitmix64_t%splitmix64_next_u64 proc~splitmix64_next_real_dp->proc~splitmix64_next_u64 proc~pcg32_step pcg32_step proc~pcg32_next_u64->proc~pcg32_step proc~splitmix64_next splitmix64_t%splitmix64_next proc~splitmix64_next_u64->proc~splitmix64_next proc~rotate_right32 rotate_right32 proc~pcg32_step->proc~rotate_right32 proc~u64_add u64_add proc~pcg32_step->proc~u64_add proc~u64_mul u64_mul proc~pcg32_step->proc~u64_mul proc~u64_shr u64_shr proc~pcg32_step->proc~u64_shr proc~mix64 mix64 proc~splitmix64_next->proc~mix64 proc~splitmix64_next->proc~u64_add proc~mix64->proc~u64_mul proc~mix64->proc~u64_shr

Called by

interface~~next_real_dp~~CalledByGraph interface~next_real_dp next_real_dp proc~pcg32_next_exponential_dp pcg32_next_exponential_dp proc~pcg32_next_exponential_dp->interface~next_real_dp proc~pcg32_next_normal_dp pcg32_next_normal_dp proc~pcg32_next_normal_dp->interface~next_real_dp proc~splitmix64_next_exponential_dp splitmix64_next_exponential_dp proc~splitmix64_next_exponential_dp->interface~next_real_dp proc~splitmix64_next_normal_dp splitmix64_next_normal_dp proc~splitmix64_next_normal_dp->interface~next_real_dp interface~next_exponential_dp next_exponential_dp interface~next_exponential_dp->proc~pcg32_next_exponential_dp interface~next_exponential_dp->proc~splitmix64_next_exponential_dp interface~next_normal_dp next_normal_dp interface~next_normal_dp->proc~pcg32_next_normal_dp interface~next_normal_dp->proc~splitmix64_next_normal_dp

Module Procedures

private function splitmix64_next_real_dp(gen) result(r)

Uniform real(dp) in [0, 1) from a SplitMix64 generator.

Arguments

Type IntentOptional Attributes Name
type(splitmix64_t), intent(inout) :: gen

Return Value real(kind=dp)

private function pcg32_next_real_dp(gen) result(r)

Uniform real(dp) in [0, 1) from a PCG32 generator. Consumes two 32-bit outputs.

Arguments

Type IntentOptional Attributes Name
type(pcg32_t), intent(inout) :: gen

Return Value real(kind=dp)