Pseudo-random numbers/Splitmix64: Difference between revisions
Doh. Confidently incorrect. Fix some precedence / bit masking problems. Replace wrong expected results with correct ones.
m (→{{header|Factor}}: use 2^ instead of ^) |
Thundergnat (talk | contribs) (Doh. Confidently incorrect. Fix some precedence / bit masking problems. Replace wrong expected results with correct ones.) |
||
Line 34:
* Show the first five integers generated using the seed 1234567.
3203168211198807973
4593380528125082431
16408922859458223821
* Show that for an initial seed of 987654321, the counts of 100_000 repetitions of <code>floor next_float() * 5</code> is as follows:
0:
* Show your output here, on this page.
Line 59 ⟶ 60:
;* [[Pseudo-random numbers/PCG32]]
;* [[Pseudo-random_numbers/Xorshift_star]]
=={{header|C}}==
Line 222 ⟶ 225:
method next-int {
my $next = $!state
$next = ($next +^
$next = ($next +^
($next +^
}
Line 243 ⟶ 246:
{{out}}
<pre>Seed: 1234567; first five Int values
6457827717110365317
3203168211198807973
9817491932198370423
4593380528125082431
16408922859458223821
Seed: 987654321; first 1e5 Rat values histogram
Bag(0(
=={{header|Wren}}==
|