diff options
| author | mattip <matti.picus@gmail.com> | 2019-06-26 06:31:09 +0300 |
|---|---|---|
| committer | mattip <matti.picus@gmail.com> | 2019-06-26 06:31:09 +0300 |
| commit | 0897a68a124a18bebcadeb30d92134ea4f049c96 (patch) | |
| tree | cbe3b8168cb61928f2bfac7be4b97cdb05be4f99 /numpy/random/src | |
| parent | 4668b46310e74b2f3c78eb213b6d796456278942 (diff) | |
| download | numpy-0897a68a124a18bebcadeb30d92134ea4f049c96.tar.gz | |
BUG: fix PCG64 ng->inc.high initialization
Diffstat (limited to 'numpy/random/src')
| -rw-r--r-- | numpy/random/src/pcg64/pcg64.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/random/src/pcg64/pcg64.h b/numpy/random/src/pcg64/pcg64.h index 20d64f8ab..67695d002 100644 --- a/numpy/random/src/pcg64/pcg64.h +++ b/numpy/random/src/pcg64/pcg64.h @@ -168,7 +168,7 @@ static inline void pcg_setseq_128_srandom_r(pcg_state_setseq_128 *rng, pcg128_t initseq) { rng->state = PCG_128BIT_CONSTANT(0ULL, 0ULL); rng->inc.high = initseq.high << 1u; - rng->inc.high |= initseq.low & 0x800000000000ULL; + rng->inc.high |= initseq.low >> 63u; rng->inc.low = (initseq.low << 1u) | 1u; pcg_setseq_128_step_r(rng); rng->state = pcg128_add(rng->state, initstate); |
