Draw an exponential deviate with the given mean.
Inverse transform: -mean * log(u) with u uniform in (0, 1]. The
uniform is taken as 1 - next_real_dp(gen) rather than
next_real_dp(gen) because the latter can return exactly zero, and
log(0) is minus infinity. Subtracting from one moves the excluded
endpoint to the other side, where it is harmless.
A negative mean is not rejected; it simply mirrors the distribution
about zero, which is occasionally what a caller wants.
Exponential deviate from a SplitMix64 generator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(splitmix64_t), | intent(inout) | :: | gen |
Generator, advanced by one draw. |
||
| real(kind=dp), | intent(in) | :: | mean |
Mean of the distribution. |
Exponential deviate from a PCG32 generator.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(pcg32_t), | intent(inout) | :: | gen |
Generator, advanced by one draw. |
||
| real(kind=dp), | intent(in) | :: | mean |
Mean of the distribution. |