8000 MAINT, BUG: fixes from seedsequence by mattip · Pull Request #13837 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

MAINT, BUG: fixes from seedsequence #13837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
BUG: fix PCG64 ng->inc.high initialization
  • Loading branch information
mattip committed Jun 26, 2019
commit 0897a68a124a18bebcadeb30d92134ea4f049c96
2 changes: 1 addition & 1 deletion numpy/random/src/pcg64/pcg64.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
0