Get a uniform [0,1) random real (double precision)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(rng_t), | intent(inout) | :: | self |
real(dp) function unif_01(self) class(rng_t), intent(inout) :: self integer(i8) :: x real(dp) :: tmp x = self%next() x = ior(shiftl(1023_i8, 52), shiftr(x, 12)) unif_01 = transfer(x, tmp) - 1.0_dp end function unif_01