32#ifndef _random123_ufixed01_dot_h_
33#define _random123_ufixed01_dot_h_
117#define R123_0x1p_31f (1.f / (1024.f * 1024.f * 1024.f * 2.f))
118#define R123_0x1p_24f (128.f * R123_0x1p_31f)
119#define R123_0x1p_23f (256.f * R123_0x1p_31f)
120#define R123_0x1p_32 (1. / (1024. * 1024. * 1024. * 4.))
121#define R123_0x1p_63 (2. * R123_0x1p_32 * R123_0x1p_32)
122#define R123_0x1p_53 (1024. * R123_0x1p_63)
123#define R123_0x1p_52 (2048. * R123_0x1p_63)
127#ifndef R123_USE_U01_DOUBLE
128#define R123_USE_U01_DOUBLE 1
138 return ((i & 0x7fffffc0) + (i & 0x40)) * R123_0x1p_31f;
147#if R123_USE_U01_DOUBLE
151 return ((i & R123_64BIT(0x7ffffffffffffe00)) + (i & 0x200)) * R123_0x1p_63;
167 return (((
double)(i & 1)) + i) * R123_0x1p_32;
#define R123_STATIC_INLINE
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_closed_open_32_double(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_closed_open_64_double(uint64_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_open_open_32_double(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_closed_closed_32_double(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_open_closed_32_double(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE float u01fixedpt_open_closed_32_float(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE float u01fixedpt_open_open_32_float(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_open_open_64_double(uint64_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE float u01fixedpt_closed_closed_32_float(uint32_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_open_closed_64_double(uint64_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE double u01fixedpt_closed_closed_64_double(uint64_t i)
R123_CUDA_DEVICE R123_STATIC_INLINE float u01fixedpt_closed_open_32_float(uint32_t i)