diff options
author | Robert Kern <robert.kern@gmail.com> | 2019-06-27 16:30:49 -0700 |
---|---|---|
committer | Robert Kern <robert.kern@gmail.com> | 2019-06-27 16:30:49 -0700 |
commit | e53abb58b2e0533cd214347406972784e53ec573 (patch) | |
tree | 2deae4534c843c6f3dd0d6225624e79afd64829b /numpy/random | |
parent | 5b0d1b56e334bc9b83e1ba6bf5a557788a8fd5bf (diff) | |
download | numpy-e53abb58b2e0533cd214347406972784e53ec573.tar.gz |
DOC: Fix description of PCG64 jump.
Also, make the jump step odd to make it a proper Weyl generator. No, this will
never, ever, ever, ever matter. But it feels nicer.
Diffstat (limited to 'numpy/random')
-rw-r--r-- | numpy/random/pcg64.pyx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/numpy/random/pcg64.pyx b/numpy/random/pcg64.pyx index 53ac21bf8..7cfa19771 100644 --- a/numpy/random/pcg64.pyx +++ b/numpy/random/pcg64.pyx @@ -131,17 +131,17 @@ cdef class PCG64(BitGenerator): Notes ----- - The step size is phi-1 when divided by 2**128 where phi is the - golden number. + The step size is phi-1 when multiplied by 2**128 where phi is the + golden ratio. """ - step = 0x9e3779b97f4a7c15f39cc0605cedc834 + step = 0x9e3779b97f4a7c15f39cc0605cedc835 self.advance(step * int(jumps)) def jumped(self, jumps=1): """ jumped(jumps=1) Returns a new bit generator with the state jumped - Jumps the state as-if jumps * 210306068529402873165736369884012333108 + Jumps the state as-if jumps * 210306068529402873165736369884012333109 random numbers have been generated. Parameters @@ -156,8 +156,8 @@ cdef class PCG64(BitGenerator): Notes ----- - The step size is phi-1 when divided by 2**128 where phi is the - golden number. + The step size is phi-1 when multiplied by 2**128 where phi is the + golden ratio. """ cdef PCG64 bit_generator |