8000 DOC: Fix description of PCG64 jump. · rkern/numpy@e53abb5 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e53abb5

Browse files
committed
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.
1 parent 5b0d1b5 commit e53abb5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

numpy/random/pcg64.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,17 @@ cdef class PCG64(BitGenerator):
131131
132132
Notes
133133
-----
134-
The step size is phi-1 when divided by 2**128 where phi is the
135-
golden number.
134+
The step size is phi-1 when multiplied by 2**128 where phi is the
135+
golden ratio.
136136
"""
137-
step = 0x9e3779b97f4a7c15f39cc0605cedc834
137+
step = 0x9e3779b97f4a7c15f39cc0605cedc835
138138
self.advance(step * int(jumps))
139139

140140
def jumped(self, jumps=1):
141141
"""
142142
jumped(jumps=1)
143143
Returns a new bit generator with the state jumped
144-
Jumps the state as-if jumps * 210306068529402873165736369884012333108
144+
Jumps the state as-if jumps * 210306068529402873165736369884012333109
145145
random numbers have been generated.
146146
147147
Parameters
@@ -156,8 +156,8 @@ cdef class PCG64(BitGenerator):
156156
157157
Notes
158158
-----
159-
The step size is phi-1 when divided by 2**128 where phi is the
160-
golden number.
159+
The step size is phi-1 when multiplied by 2**128 where phi is the
160+
golden ratio.
161161
"""
162162
cdef PCG64 bit_generator
163163

0 commit comments

Comments
 (0)
0