├── .gitignore ├── CONTRIBUTING.md ├── LICENSE-APACHE.txt ├── LICENSE-MIT.txt ├── LICENSE.spdx ├── Makefile ├── README.md ├── include ├── pcg_extras.hpp ├── pcg_random.hpp └── pcg_uint128.hpp ├── sample ├── .gitignore ├── Makefile ├── codebook.cpp ├── cppref-sample.cpp ├── make-partytrick.cpp ├── pcg-demo.cpp ├── spew.cpp └── use-partytrick.cpp └── test-high ├── .gitignore ├── Makefile ├── check-pcg128_once_insecure.cpp ├── check-pcg128_oneseq_once_insecure.cpp ├── check-pcg16_once_insecure.cpp ├── check-pcg16_oneseq_once_insecure.cpp ├── check-pcg32.cpp ├── check-pcg32_c1024.cpp ├── check-pcg32_c1024_fast.cpp ├── check-pcg32_c64.cpp ├── check-pcg32_c64_fast.cpp ├── check-pcg32_c64_oneseq.cpp ├── check-pcg32_fast.cpp ├── check-pcg32_k1024.cpp ├── check-pcg32_k1024_fast.cpp ├── check-pcg32_k16384.cpp ├── check-pcg32_k16384_fast.cpp ├── check-pcg32_k2.cpp ├── check-pcg32_k2_fast.cpp ├── check-pcg32_k64.cpp ├── check-pcg32_k64_fast.cpp ├── check-pcg32_k64_oneseq.cpp ├── check-pcg32_once_insecure.cpp ├── check-pcg32_oneseq.cpp ├── check-pcg32_oneseq_once_insecure.cpp ├── check-pcg32_unique.cpp ├── check-pcg64.cpp ├── check-pcg64_c1024.cpp ├── check-pcg64_c1024_fast.cpp ├── check-pcg64_c32.cpp ├── check-pcg64_c32_fast.cpp ├── check-pcg64_c32_oneseq.cpp ├── check-pcg64_fast.cpp ├── check-pcg64_k1024.cpp ├── check-pcg64_k1024_fast.cpp ├── check-pcg64_k32.cpp ├── check-pcg64_k32_fast.cpp ├── check-pcg64_k32_oneseq.cpp ├── check-pcg64_once_insecure.cpp ├── check-pcg64_oneseq.cpp ├── check-pcg64_oneseq_once_insecure.cpp ├── check-pcg64_unique.cpp ├── check-pcg8_once_insecure.cpp ├── check-pcg8_oneseq_once_insecure.cpp ├── expected ├── .gitignore ├── check-pcg128_once_insecure.out ├── check-pcg128_oneseq_once_insecure.out ├── check-pcg16_once_insecure.out ├── check-pcg16_oneseq_once_insecure.out ├── check-pcg32.out ├── check-pcg32_c1024.out ├── check-pcg32_c1024_fast.out ├── check-pcg32_c64.out ├── check-pcg32_c64_fast.out ├── check-pcg32_c64_oneseq.out ├── check-pcg32_fast.out ├── check-pcg32_k1024.out ├── check-pcg32_k1024_fast.out ├── check-pcg32_k16384.out ├── check-pcg32_k16384_fast.out ├── check-pcg32_k2.out ├── check-pcg32_k2_fast.out ├── check-pcg32_k64.out ├── check-pcg32_k64_fast.out ├── check-pcg32_k64_oneseq.out ├── check-pcg32_once_insecure.out ├── check-pcg32_oneseq.out ├── check-pcg32_oneseq_once_insecure.out ├── check-pcg64.out ├── check-pcg64_c1024.out ├── check-pcg64_c1024_fast.out ├── check-pcg64_c32.out ├── check-pcg64_c32_fast.out ├── check-pcg64_c32_oneseq.out ├── check-pcg64_fast.out ├── check-pcg64_k1024.out ├── check-pcg64_k1024_fast.out ├── check-pcg64_k32.out ├── check-pcg64_k32_fast.out ├── check-pcg64_k32_oneseq.out ├── check-pcg64_once_insecure.out ├── check-pcg64_oneseq.out ├── check-pcg64_oneseq_once_insecure.out ├── check-pcg8_once_insecure.out └── check-pcg8_oneseq_once_insecure.out ├── pcg-test-noadvance.cpp ├── pcg-test.cpp └── run-tests.sh /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Debug Information 26 | *.dSYM 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | 33 | # Actual Project Executables 34 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | The license for this work does not require you to share changes you make 4 | in your own version of the code. Contributions are welcome, however. 5 | 6 | ## License 7 | 8 | This work is licensed under either of 9 | 10 | * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE.txt) or http://www.apache.org/licenses/LICENSE-2.0) 11 | * MIT license ([LICENSE-MIT](LICENSE-MIT.txt) or http://opensource.org/licenses/MIT) 12 | 13 | at your option. 14 | 15 | ## Contribution Policy 16 | 17 | Unless you explicitly state otherwise, any contribution intentionally 18 | submitted for inclusion in this work by you, as defined in the 19 | Apache-2.0 license, shall be dual licensed as above, without any 20 | additional terms or conditions. 21 | -------------------------------------------------------------------------------- /LICENSE-APACHE.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-MIT.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /LICENSE.spdx: -------------------------------------------------------------------------------- 1 | SPDXVersion: SPDX-2.1 2 | DataLicense: CC0-1.0 3 | PackageName: pcg-cpp 4 | PackageOriginator: Melissa O'Neill 5 | PackageHomePage: http://www.pcg-random.org 6 | PackageLicenseDeclared: (MIT OR Apache-2.0) 7 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # PCG Random Number Generation for C++. 3 | # 4 | # Copyright 2014-2017 Melissa O'Neill , 5 | # and the PCG Project contributors. 6 | # 7 | # SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | # 9 | # Licensed under the Apache License, Version 2.0 (provided in 10 | # LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | # or under the MIT license (provided in LICENSE-MIT.txt and at 12 | # http://opensource.org/licenses/MIT), at your option. This file may not 13 | # be copied, modified, or distributed except according to those terms. 14 | # 15 | # Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | # express or implied. See your chosen license for details. 17 | # 18 | # For additional information about the PCG random number generation scheme, 19 | # visit http://www.pcg-random.org/. 20 | # 21 | 22 | all: 23 | cd test-high; $(MAKE) 24 | cd sample; $(MAKE) 25 | 26 | PREFIX = /usr/local 27 | 28 | install: all 29 | install -d $(DESTDIR)$(PREFIX)/include 30 | install -m 0644 include/*.hpp $(DESTDIR)$(PREFIX)/include 31 | 32 | test: all 33 | cd test-high; $(MAKE) test 34 | 35 | clean: 36 | cd test-high; $(MAKE) clean 37 | cd sample; $(MAKE) clean 38 | 39 | 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PCG Random Number Generation, C++ Edition 2 | 3 | [PCG-Random website]: http://www.pcg-random.org 4 | 5 | This code provides an implementation of the PCG family of random number 6 | generators, which are fast, statistically excellent, and offer a number of 7 | useful features. 8 | 9 | Full details can be found at the [PCG-Random website]. This version 10 | of the code provides many family members -- if you just want one 11 | simple generator, you may prefer the minimal C version of the library. 12 | 13 | There are two kinds of generator, normal generators and extended generators. 14 | Extended generators provide *k* dimensional equidistribution and can perform 15 | party tricks, but generally speaking most people only need the normal 16 | generators. 17 | 18 | There are two ways to access the generators, using a convenience typedef 19 | or by using the underlying templates directly (similar to C++11's `std::mt19937` typedef vs its `std::mersenne_twister_engine` template). For most users, the convenience typedef is what you want, and probably you're fine with `pcg32` for 32-bit numbers. If you want 64-bit numbers, either use `pcg64` (or, if you're on a 32-bit system, making 64 bits from two calls to `pcg32_k2` may be faster). 20 | 21 | ## Documentation and Examples 22 | 23 | Visit [PCG-Random website] for information on how to use this library, or look 24 | at the sample code in the `sample` directory -- hopefully it should be fairly 25 | self explanatory. 26 | 27 | ## Building 28 | 29 | The code is written in C++11, as an include-only library (i.e., there is 30 | nothing you need to build). There are some provided demo programs and tests 31 | however. On a Unix-style system (e.g., Linux, Mac OS X) you should be able 32 | to just type 33 | 34 | make 35 | 36 | To build the demo programs. 37 | 38 | ## Testing 39 | 40 | Run 41 | 42 | make test 43 | 44 | ## Directory Structure 45 | 46 | The directories are arranged as follows: 47 | 48 | * `include` -- contains `pcg_random.hpp` and supporting include files 49 | * `test-high` -- test code for the high-level API where the functions have 50 | shorter, less scary-looking names. 51 | * `sample` -- sample code, some similar to the code in `test-high` but more 52 | human readable, some other examples too 53 | -------------------------------------------------------------------------------- /include/pcg_extras.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This file provides support code that is useful for random-number generation 24 | * but not specific to the PCG generation scheme, including: 25 | * - 128-bit int support for platforms where it isn't available natively 26 | * - bit twiddling operations 27 | * - I/O of 128-bit and 8-bit integers 28 | * - Handling the evilness of SeedSeq 29 | * - Support for efficiently producing random numbers less than a given 30 | * bound 31 | */ 32 | 33 | #ifndef PCG_EXTRAS_HPP_INCLUDED 34 | #define PCG_EXTRAS_HPP_INCLUDED 1 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | #ifdef __GNUC__ 49 | #include 50 | #endif 51 | 52 | /* 53 | * Abstractions for compiler-specific directives 54 | */ 55 | 56 | #ifdef __GNUC__ 57 | #define PCG_NOINLINE __attribute__((noinline)) 58 | #else 59 | #define PCG_NOINLINE 60 | #endif 61 | 62 | /* 63 | * Some members of the PCG library use 128-bit math. When compiling on 64-bit 64 | * platforms, both GCC and Clang provide 128-bit integer types that are ideal 65 | * for the job. 66 | * 67 | * On 32-bit platforms (or with other compilers), we fall back to a C++ 68 | * class that provides 128-bit unsigned integers instead. It may seem 69 | * like we're reinventing the wheel here, because libraries already exist 70 | * that support large integers, but most existing libraries provide a very 71 | * generic multiprecision code, but here we're operating at a fixed size. 72 | * Also, most other libraries are fairly heavyweight. So we use a direct 73 | * implementation. Sadly, it's much slower than hand-coded assembly or 74 | * direct CPU support. 75 | * 76 | */ 77 | #if __SIZEOF_INT128__ && !PCG_FORCE_EMULATED_128BIT_MATH 78 | namespace pcg_extras { 79 | typedef __uint128_t pcg128_t; 80 | } 81 | #define PCG_128BIT_CONSTANT(high,low) \ 82 | ((pcg_extras::pcg128_t(high) << 64) + low) 83 | #else 84 | #include "pcg_uint128.hpp" 85 | namespace pcg_extras { 86 | typedef pcg_extras::uint_x4 pcg128_t; 87 | } 88 | #define PCG_128BIT_CONSTANT(high,low) \ 89 | pcg_extras::pcg128_t(high,low) 90 | #define PCG_EMULATED_128BIT_MATH 1 91 | #endif 92 | 93 | 94 | namespace pcg_extras { 95 | 96 | /* 97 | * We often need to represent a "number of bits". When used normally, these 98 | * numbers are never greater than 128, so an unsigned char is plenty. 99 | * If you're using a nonstandard generator of a larger size, you can set 100 | * PCG_BITCOUNT_T to have it define it as a larger size. (Some compilers 101 | * might produce faster code if you set it to an unsigned int.) 102 | */ 103 | 104 | #ifndef PCG_BITCOUNT_T 105 | typedef uint8_t bitcount_t; 106 | #else 107 | typedef PCG_BITCOUNT_T bitcount_t; 108 | #endif 109 | 110 | /* 111 | * C++ requires us to be able to serialize RNG state by printing or reading 112 | * it from a stream. Because we use 128-bit ints, we also need to be able 113 | * ot print them, so here is code to do so. 114 | * 115 | * This code provides enough functionality to print 128-bit ints in decimal 116 | * and zero-padded in hex. It's not a full-featured implementation. 117 | */ 118 | 119 | template 120 | std::basic_ostream& 121 | operator<<(std::basic_ostream& out, pcg128_t value) 122 | { 123 | auto desired_base = out.flags() & out.basefield; 124 | bool want_hex = desired_base == out.hex; 125 | 126 | if (want_hex) { 127 | uint64_t highpart = uint64_t(value >> 64); 128 | uint64_t lowpart = uint64_t(value); 129 | auto desired_width = out.width(); 130 | if (desired_width > 16) { 131 | out.width(desired_width - 16); 132 | } 133 | if (highpart != 0 || desired_width > 16) 134 | out << highpart; 135 | CharT oldfill = '\0'; 136 | if (highpart != 0) { 137 | out.width(16); 138 | oldfill = out.fill('0'); 139 | } 140 | auto oldflags = out.setf(decltype(desired_base){}, out.showbase); 141 | out << lowpart; 142 | out.setf(oldflags); 143 | if (highpart != 0) { 144 | out.fill(oldfill); 145 | } 146 | return out; 147 | } 148 | constexpr size_t MAX_CHARS_128BIT = 40; 149 | 150 | char buffer[MAX_CHARS_128BIT]; 151 | char* pos = buffer+sizeof(buffer); 152 | *(--pos) = '\0'; 153 | constexpr auto BASE = pcg128_t(10ULL); 154 | do { 155 | auto div = value / BASE; 156 | auto mod = uint32_t(value - (div * BASE)); 157 | *(--pos) = '0' + char(mod); 158 | value = div; 159 | } while(value != pcg128_t(0ULL)); 160 | return out << pos; 161 | } 162 | 163 | template 164 | std::basic_istream& 165 | operator>>(std::basic_istream& in, pcg128_t& value) 166 | { 167 | typename std::basic_istream::sentry s(in); 168 | 169 | if (!s) 170 | return in; 171 | 172 | constexpr auto BASE = pcg128_t(10ULL); 173 | pcg128_t current(0ULL); 174 | bool did_nothing = true; 175 | bool overflow = false; 176 | for(;;) { 177 | CharT wide_ch = in.get(); 178 | if (!in.good()) { 179 | in.clear(std::ios::eofbit); 180 | break; 181 | } 182 | auto ch = in.narrow(wide_ch, '\0'); 183 | if (ch < '0' || ch > '9') { 184 | in.unget(); 185 | break; 186 | } 187 | did_nothing = false; 188 | pcg128_t digit(uint32_t(ch - '0')); 189 | pcg128_t timesbase = current*BASE; 190 | overflow = overflow || timesbase < current; 191 | current = timesbase + digit; 192 | overflow = overflow || current < digit; 193 | } 194 | 195 | if (did_nothing || overflow) { 196 | in.setstate(std::ios::failbit); 197 | if (overflow) 198 | current = ~pcg128_t(0ULL); 199 | } 200 | 201 | value = current; 202 | 203 | return in; 204 | } 205 | 206 | /* 207 | * Likewise, if people use tiny rngs, we'll be serializing uint8_t. 208 | * If we just used the provided IO operators, they'd read/write chars, 209 | * not ints, so we need to define our own. We *can* redefine this operator 210 | * here because we're in our own namespace. 211 | */ 212 | 213 | template 214 | std::basic_ostream& 215 | operator<<(std::basic_ostream&out, uint8_t value) 216 | { 217 | return out << uint32_t(value); 218 | } 219 | 220 | template 221 | std::basic_istream& 222 | operator>>(std::basic_istream& in, uint8_t& target) 223 | { 224 | uint32_t value = 0xdecea5edU; 225 | in >> value; 226 | if (!in && value == 0xdecea5edU) 227 | return in; 228 | if (value > uint8_t(~0)) { 229 | in.setstate(std::ios::failbit); 230 | value = ~0U; 231 | } 232 | target = uint8_t(value); 233 | return in; 234 | } 235 | 236 | /* Unfortunately, the above functions don't get found in preference to the 237 | * built in ones, so we create some more specific overloads that will. 238 | * Ugh. 239 | */ 240 | 241 | inline std::ostream& operator<<(std::ostream& out, uint8_t value) 242 | { 243 | return pcg_extras::operator<< (out, value); 244 | } 245 | 246 | inline std::istream& operator>>(std::istream& in, uint8_t& value) 247 | { 248 | return pcg_extras::operator>> (in, value); 249 | } 250 | 251 | 252 | 253 | /* 254 | * Useful bitwise operations. 255 | */ 256 | 257 | /* 258 | * XorShifts are invertable, but they are someting of a pain to invert. 259 | * This function backs them out. It's used by the whacky "inside out" 260 | * generator defined later. 261 | */ 262 | 263 | template 264 | inline itype unxorshift(itype x, bitcount_t bits, bitcount_t shift) 265 | { 266 | if (2*shift >= bits) { 267 | return x ^ (x >> shift); 268 | } 269 | itype lowmask1 = (itype(1U) << (bits - shift*2)) - 1; 270 | itype highmask1 = ~lowmask1; 271 | itype top1 = x; 272 | itype bottom1 = x & lowmask1; 273 | top1 ^= top1 >> shift; 274 | top1 &= highmask1; 275 | x = top1 | bottom1; 276 | itype lowmask2 = (itype(1U) << (bits - shift)) - 1; 277 | itype bottom2 = x & lowmask2; 278 | bottom2 = unxorshift(bottom2, bits - shift, shift); 279 | bottom2 &= lowmask1; 280 | return top1 | bottom2; 281 | } 282 | 283 | /* 284 | * Rotate left and right. 285 | * 286 | * In ideal world, compilers would spot idiomatic rotate code and convert it 287 | * to a rotate instruction. Of course, opinions vary on what the correct 288 | * idiom is and how to spot it. For clang, sometimes it generates better 289 | * (but still crappy) code if you define PCG_USE_ZEROCHECK_ROTATE_IDIOM. 290 | */ 291 | 292 | template 293 | inline itype rotl(itype value, bitcount_t rot) 294 | { 295 | constexpr bitcount_t bits = sizeof(itype) * 8; 296 | constexpr bitcount_t mask = bits - 1; 297 | #if PCG_USE_ZEROCHECK_ROTATE_IDIOM 298 | return rot ? (value << rot) | (value >> (bits - rot)) : value; 299 | #else 300 | return (value << rot) | (value >> ((- rot) & mask)); 301 | #endif 302 | } 303 | 304 | template 305 | inline itype rotr(itype value, bitcount_t rot) 306 | { 307 | constexpr bitcount_t bits = sizeof(itype) * 8; 308 | constexpr bitcount_t mask = bits - 1; 309 | #if PCG_USE_ZEROCHECK_ROTATE_IDIOM 310 | return rot ? (value >> rot) | (value << (bits - rot)) : value; 311 | #else 312 | return (value >> rot) | (value << ((- rot) & mask)); 313 | #endif 314 | } 315 | 316 | /* Unfortunately, both Clang and GCC sometimes perform poorly when it comes 317 | * to properly recognizing idiomatic rotate code, so for we also provide 318 | * assembler directives (enabled with PCG_USE_INLINE_ASM). Boo, hiss. 319 | * (I hope that these compilers get better so that this code can die.) 320 | * 321 | * These overloads will be preferred over the general template code above. 322 | */ 323 | #if PCG_USE_INLINE_ASM && __GNUC__ && (__x86_64__ || __i386__) 324 | 325 | inline uint8_t rotr(uint8_t value, bitcount_t rot) 326 | { 327 | asm ("rorb %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); 328 | return value; 329 | } 330 | 331 | inline uint16_t rotr(uint16_t value, bitcount_t rot) 332 | { 333 | asm ("rorw %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); 334 | return value; 335 | } 336 | 337 | inline uint32_t rotr(uint32_t value, bitcount_t rot) 338 | { 339 | asm ("rorl %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); 340 | return value; 341 | } 342 | 343 | #if __x86_64__ 344 | inline uint64_t rotr(uint64_t value, bitcount_t rot) 345 | { 346 | asm ("rorq %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); 347 | return value; 348 | } 349 | #endif // __x86_64__ 350 | 351 | #elif defined(_MSC_VER) 352 | // Use MSVC++ bit rotation intrinsics 353 | 354 | #pragma intrinsic(_rotr, _rotr64, _rotr8, _rotr16) 355 | 356 | inline uint8_t rotr(uint8_t value, bitcount_t rot) 357 | { 358 | return _rotr8(value, rot); 359 | } 360 | 361 | inline uint16_t rotr(uint16_t value, bitcount_t rot) 362 | { 363 | return _rotr16(value, rot); 364 | } 365 | 366 | inline uint32_t rotr(uint32_t value, bitcount_t rot) 367 | { 368 | return _rotr(value, rot); 369 | } 370 | 371 | inline uint64_t rotr(uint64_t value, bitcount_t rot) 372 | { 373 | return _rotr64(value, rot); 374 | } 375 | 376 | #endif // PCG_USE_INLINE_ASM 377 | 378 | 379 | /* 380 | * The C++ SeedSeq concept (modelled by seed_seq) can fill an array of 381 | * 32-bit integers with seed data, but sometimes we want to produce 382 | * larger or smaller integers. 383 | * 384 | * The following code handles this annoyance. 385 | * 386 | * uneven_copy will copy an array of 32-bit ints to an array of larger or 387 | * smaller ints (actually, the code is general it only needing forward 388 | * iterators). The copy is identical to the one that would be performed if 389 | * we just did memcpy on a standard little-endian machine, but works 390 | * regardless of the endian of the machine (or the weirdness of the ints 391 | * involved). 392 | * 393 | * generate_to initializes an array of integers using a SeedSeq 394 | * object. It is given the size as a static constant at compile time and 395 | * tries to avoid memory allocation. If we're filling in 32-bit constants 396 | * we just do it directly. If we need a separate buffer and it's small, 397 | * we allocate it on the stack. Otherwise, we fall back to heap allocation. 398 | * Ugh. 399 | * 400 | * generate_one produces a single value of some integral type using a 401 | * SeedSeq object. 402 | */ 403 | 404 | /* uneven_copy helper, case where destination ints are less than 32 bit. */ 405 | 406 | template 407 | SrcIter uneven_copy_impl( 408 | SrcIter src_first, DestIter dest_first, DestIter dest_last, 409 | std::true_type) 410 | { 411 | typedef typename std::iterator_traits::value_type src_t; 412 | typedef typename std::iterator_traits::value_type dest_t; 413 | 414 | constexpr bitcount_t SRC_SIZE = sizeof(src_t); 415 | constexpr bitcount_t DEST_SIZE = sizeof(dest_t); 416 | constexpr bitcount_t DEST_BITS = DEST_SIZE * 8; 417 | constexpr bitcount_t SCALE = SRC_SIZE / DEST_SIZE; 418 | 419 | size_t count = 0; 420 | src_t value = 0; 421 | 422 | while (dest_first != dest_last) { 423 | if ((count++ % SCALE) == 0) 424 | value = *src_first++; // Get more bits 425 | else 426 | value >>= DEST_BITS; // Move down bits 427 | 428 | *dest_first++ = dest_t(value); // Truncates, ignores high bits. 429 | } 430 | return src_first; 431 | } 432 | 433 | /* uneven_copy helper, case where destination ints are more than 32 bit. */ 434 | 435 | template 436 | SrcIter uneven_copy_impl( 437 | SrcIter src_first, DestIter dest_first, DestIter dest_last, 438 | std::false_type) 439 | { 440 | typedef typename std::iterator_traits::value_type src_t; 441 | typedef typename std::iterator_traits::value_type dest_t; 442 | 443 | constexpr auto SRC_SIZE = sizeof(src_t); 444 | constexpr auto SRC_BITS = SRC_SIZE * 8; 445 | constexpr auto DEST_SIZE = sizeof(dest_t); 446 | constexpr auto SCALE = (DEST_SIZE+SRC_SIZE-1) / SRC_SIZE; 447 | 448 | while (dest_first != dest_last) { 449 | dest_t value(0UL); 450 | unsigned int shift = 0; 451 | 452 | for (size_t i = 0; i < SCALE; ++i) { 453 | value |= dest_t(*src_first++) << shift; 454 | shift += SRC_BITS; 455 | } 456 | 457 | *dest_first++ = value; 458 | } 459 | return src_first; 460 | } 461 | 462 | /* uneven_copy, call the right code for larger vs. smaller */ 463 | 464 | template 465 | inline SrcIter uneven_copy(SrcIter src_first, 466 | DestIter dest_first, DestIter dest_last) 467 | { 468 | typedef typename std::iterator_traits::value_type src_t; 469 | typedef typename std::iterator_traits::value_type dest_t; 470 | 471 | constexpr bool DEST_IS_SMALLER = sizeof(dest_t) < sizeof(src_t); 472 | 473 | return uneven_copy_impl(src_first, dest_first, dest_last, 474 | std::integral_constant{}); 475 | } 476 | 477 | /* generate_to, fill in a fixed-size array of integral type using a SeedSeq 478 | * (actually works for any random-access iterator) 479 | */ 480 | 481 | template 482 | inline void generate_to_impl(SeedSeq&& generator, DestIter dest, 483 | std::true_type) 484 | { 485 | generator.generate(dest, dest+size); 486 | } 487 | 488 | template 489 | void generate_to_impl(SeedSeq&& generator, DestIter dest, 490 | std::false_type) 491 | { 492 | typedef typename std::iterator_traits::value_type dest_t; 493 | constexpr auto DEST_SIZE = sizeof(dest_t); 494 | constexpr auto GEN_SIZE = sizeof(uint32_t); 495 | 496 | constexpr bool GEN_IS_SMALLER = GEN_SIZE < DEST_SIZE; 497 | constexpr size_t FROM_ELEMS = 498 | GEN_IS_SMALLER 499 | ? size * ((DEST_SIZE+GEN_SIZE-1) / GEN_SIZE) 500 | : (size + (GEN_SIZE / DEST_SIZE) - 1) 501 | / ((GEN_SIZE / DEST_SIZE) + GEN_IS_SMALLER); 502 | // this odd code ^^^^^^^^^^^^^^^^^ is work-around for 503 | // a bug: http://llvm.org/bugs/show_bug.cgi?id=21287 504 | 505 | if (FROM_ELEMS <= 1024) { 506 | uint32_t buffer[FROM_ELEMS]; 507 | generator.generate(buffer, buffer+FROM_ELEMS); 508 | uneven_copy(buffer, dest, dest+size); 509 | } else { 510 | uint32_t* buffer = static_cast(malloc(GEN_SIZE * FROM_ELEMS)); 511 | generator.generate(buffer, buffer+FROM_ELEMS); 512 | uneven_copy(buffer, dest, dest+size); 513 | free(static_cast(buffer)); 514 | } 515 | } 516 | 517 | template 518 | inline void generate_to(SeedSeq&& generator, DestIter dest) 519 | { 520 | typedef typename std::iterator_traits::value_type dest_t; 521 | constexpr bool IS_32BIT = sizeof(dest_t) == sizeof(uint32_t); 522 | 523 | generate_to_impl(std::forward(generator), dest, 524 | std::integral_constant{}); 525 | } 526 | 527 | /* generate_one, produce a value of integral type using a SeedSeq 528 | * (optionally, we can have it produce more than one and pick which one 529 | * we want) 530 | */ 531 | 532 | template 533 | inline UInt generate_one(SeedSeq&& generator) 534 | { 535 | UInt result[N]; 536 | generate_to(std::forward(generator), result); 537 | return result[i]; 538 | } 539 | 540 | template 541 | auto bounded_rand(RngType& rng, typename RngType::result_type upper_bound) 542 | -> typename RngType::result_type 543 | { 544 | typedef typename RngType::result_type rtype; 545 | rtype threshold = (RngType::max() - RngType::min() + rtype(1) - upper_bound) 546 | % upper_bound; 547 | for (;;) { 548 | rtype r = rng() - RngType::min(); 549 | if (r >= threshold) 550 | return r % upper_bound; 551 | } 552 | } 553 | 554 | template 555 | void shuffle(Iter from, Iter to, RandType&& rng) 556 | { 557 | typedef typename std::iterator_traits::difference_type delta_t; 558 | typedef typename std::remove_reference::type::result_type result_t; 559 | auto count = to - from; 560 | while (count > 1) { 561 | delta_t chosen = delta_t(bounded_rand(rng, result_t(count))); 562 | --count; 563 | --to; 564 | using std::swap; 565 | swap(*(from + chosen), *to); 566 | } 567 | } 568 | 569 | /* 570 | * Although std::seed_seq is useful, it isn't everything. Often we want to 571 | * initialize a random-number generator some other way, such as from a random 572 | * device. 573 | * 574 | * Technically, it does not meet the requirements of a SeedSequence because 575 | * it lacks some of the rarely-used member functions (some of which would 576 | * be impossible to provide). However the C++ standard is quite specific 577 | * that actual engines only called the generate method, so it ought not to be 578 | * a problem in practice. 579 | */ 580 | 581 | template 582 | class seed_seq_from { 583 | private: 584 | RngType rng_; 585 | 586 | typedef uint_least32_t result_type; 587 | 588 | public: 589 | template 590 | seed_seq_from(Args&&... args) : 591 | rng_(std::forward(args)...) 592 | { 593 | // Nothing (else) to do... 594 | } 595 | 596 | template 597 | void generate(Iter start, Iter finish) 598 | { 599 | for (auto i = start; i != finish; ++i) 600 | *i = result_type(rng_()); 601 | } 602 | 603 | constexpr size_t size() const 604 | { 605 | return (sizeof(typename RngType::result_type) > sizeof(result_type) 606 | && RngType::max() > ~size_t(0UL)) 607 | ? ~size_t(0UL) 608 | : size_t(RngType::max()); 609 | } 610 | }; 611 | 612 | /* 613 | * Sometimes you might want a distinct seed based on when the program 614 | * was compiled. That way, a particular instance of the program will 615 | * behave the same way, but when recompiled it'll produce a different 616 | * value. 617 | */ 618 | 619 | template 620 | struct static_arbitrary_seed { 621 | private: 622 | static constexpr IntType fnv(IntType hash, const char* pos) { 623 | return *pos == '\0' 624 | ? hash 625 | : fnv((hash * IntType(16777619U)) ^ *pos, (pos+1)); 626 | } 627 | 628 | public: 629 | static constexpr IntType value = fnv(IntType(2166136261U ^ sizeof(IntType)), 630 | __DATE__ __TIME__ __FILE__); 631 | }; 632 | 633 | // Sometimes, when debugging or testing, it's handy to be able print the name 634 | // of a (in human-readable form). This code allows the idiom: 635 | // 636 | // cout << printable_typename() 637 | // 638 | // to print out my_foo_type_t (or its concrete type if it is a synonym) 639 | 640 | #if __cpp_rtti || __GXX_RTTI 641 | 642 | template 643 | struct printable_typename {}; 644 | 645 | template 646 | std::ostream& operator<<(std::ostream& out, printable_typename) { 647 | const char *implementation_typename = typeid(T).name(); 648 | #ifdef __GNUC__ 649 | int status; 650 | char* pretty_name = 651 | abi::__cxa_demangle(implementation_typename, nullptr, nullptr, &status); 652 | if (status == 0) 653 | out << pretty_name; 654 | free(static_cast(pretty_name)); 655 | if (status == 0) 656 | return out; 657 | #endif 658 | out << implementation_typename; 659 | return out; 660 | } 661 | 662 | #endif // __cpp_rtti || __GXX_RTTI 663 | 664 | } // namespace pcg_extras 665 | 666 | #endif // PCG_EXTRAS_HPP_INCLUDED 667 | -------------------------------------------------------------------------------- /sample/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Debug Information 26 | *.dSYM 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | 33 | # Actual Project Executables 34 | pcg-demo 35 | codebook 36 | cppref-sample 37 | make-partytrick 38 | spew 39 | use-partytrick 40 | -------------------------------------------------------------------------------- /sample/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # PCG Random Number Generation for C++. 3 | # 4 | # Copyright 2014-2017 Melissa O'Neill , 5 | # and the PCG Project contributors. 6 | # 7 | # SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | # 9 | # Licensed under the Apache License, Version 2.0 (provided in 10 | # LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | # or under the MIT license (provided in LICENSE-MIT.txt and at 12 | # http://opensource.org/licenses/MIT), at your option. This file may not 13 | # be copied, modified, or distributed except according to those terms. 14 | # 15 | # Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | # express or implied. See your chosen license for details. 17 | # 18 | # For additional information about the PCG random number generation scheme, 19 | # visit http://www.pcg-random.org/. 20 | # 21 | 22 | TARGETS = pcg-demo codebook cppref-sample make-partytrick 23 | BINARYOUT_TARGETS = spew use-partytrick 24 | 25 | CPPFLAGS += -I../include 26 | CXXFLAGS += -std=c++11 -O2 27 | CC = $(CXX) # Cheat so that linking uses the C++ compiler 28 | 29 | all: $(TARGETS) 30 | 31 | posix-binaryoutput: spew use-partytrick 32 | 33 | clean: 34 | rm -f *.o $(TARGETS) $(BINARYOUT_TARGETS) 35 | 36 | codebook.o: codebook.cpp ../include/pcg_random.hpp \ 37 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 38 | cppref-sample.o: cppref-sample.cpp ../include/pcg_random.hpp \ 39 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 40 | make-partytrick.o: make-partytrick.cpp ../include/pcg_random.hpp \ 41 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 42 | pcg-demo.o: pcg-demo.cpp ../include/pcg_random.hpp \ 43 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 44 | spew.o: spew.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 45 | ../include/pcg_uint128.hpp 46 | use-partytrick.o: use-partytrick.cpp ../include/pcg_random.hpp \ 47 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 48 | -------------------------------------------------------------------------------- /sample/codebook.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * Outputs a little spy codebook 24 | */ 25 | 26 | #include "pcg_random.hpp" 27 | #include 28 | #include 29 | #include 30 | 31 | int main() 32 | { 33 | pcg32 rng(pcg_extras::seed_seq_from{}); 34 | std::clog << "RNG used: " << rng << "\n\n"; 35 | 36 | for (int i = 0; i < 16; ++i) { 37 | for (int j = 0; j < 16; ++j) { 38 | printf("%03u ", rng(1000)); 39 | } 40 | printf("\n"); 41 | } 42 | } 43 | 44 | 45 | -------------------------------------------------------------------------------- /sample/cppref-sample.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Random Number Generation Example 3 | * 4 | * Copyright 2012-2014 cppreference.com Contributors 5 | * Copyright 2014-2017 Melissa O'Neill 6 | * and the PCG Project contributors. 7 | * 8 | * SPDX-License-Identifier: (CC-BY-SA-3.0 OR Apache-2.0 OR MIT) 9 | * 10 | * Code in this file is based on code from cppreference.com, specifically 11 | * the sample code at http://en.cppreference.com/w/cpp/numeric/random 12 | * which is distributed under the Creative Commons Attribution-Share Alike 13 | * license. You may distribute this file (and only this file) under 14 | * that license, see http://creativecommons.org/licenses/by-sa/3.0/. 15 | * 16 | * Also licensed under the Apache License, Version 2.0 (provided in 17 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 18 | * or under the MIT license (provided in LICENSE-MIT.txt and at 19 | * http://opensource.org/licenses/MIT), at your option. This file may not 20 | * be copied, modified, or distributed except according to those terms. 21 | * 22 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 23 | * express or implied. See your chosen license for details. 24 | * 25 | * For additional information about the PCG random number generation scheme, 26 | * visit http://www.pcg-random.org/. 27 | */ 28 | 29 | /* 30 | */ 31 | 32 | /* 33 | * Produce a histogram of a normal distribution. 34 | */ 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #include "pcg_random.hpp" 44 | 45 | int main() 46 | { 47 | // Seed with a real random value, if available 48 | pcg_extras::seed_seq_from seed_source; 49 | 50 | // Make a random number engine 51 | pcg32 rng(seed_source); 52 | 53 | // Choose a random mean between 1 and 6 54 | std::uniform_int_distribution uniform_dist(1, 6); 55 | int mean = uniform_dist(rng); 56 | std::cout << "Randomly-chosen mean: " << mean << '\n'; 57 | 58 | // Generate a normal distribution around that mean 59 | std::normal_distribution<> normal_dist(mean, 2); 60 | 61 | // Make a copy of the RNG state to use later 62 | pcg32 rng_checkpoint = rng; 63 | 64 | std::map hist; 65 | for (int n = 0; n < 10000; ++n) { 66 | ++hist[std::round(normal_dist(rng))]; 67 | } 68 | std::cout << "Normal distribution around " << mean << ":\n"; 69 | for (auto p : hist) { 70 | std::cout << std::fixed << std::setprecision(1) << std::setw(2) 71 | << p.first << ' ' << std::string(p.second/30, '*') 72 | << '\n'; 73 | } 74 | 75 | std::cout << "Required " << (rng - rng_checkpoint) << " random numbers.\n"; 76 | } 77 | -------------------------------------------------------------------------------- /sample/make-partytrick.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This program uses pcg32_k64, a 64-dimensionally equidistributed generator 24 | * to create a party-trick generator that, after 1MB of output, produces some 25 | * output that may not look "very random" to you. ;-) 26 | */ 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | 34 | #include "pcg_random.hpp" 35 | 36 | /* 256 bytes of "non-random" data we want to place in the output sequence 37 | * of our 64-dimensionally equidistributed 32-bit (4 byte) integers 38 | * (64 * 4 = 256). 39 | */ 40 | 41 | char desired[] = "LalalalaMEEPMEEPMEEPLOOKRandomChanceThatAWasWordUnlikely things happen, right?This generator has period 2^2112, it contains many valid English sentences, including this one. It'll be a *long* time before you see another one though. Good luck. Back to work!"; 42 | 43 | /* Rather than put our 256 bytes in one block, we will scatter it around. 44 | * This table shows the offset of one byte to the next, in 256-byte (i.e., 45 | * 64-tuple) increments. '0' -> 0, '1' -> 1, '/' -> -1, '.' -> -2 46 | */ 47 | 48 | char breaks[] = "00/020.040001000/000200010000010000020001.0020003000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000"; 49 | 50 | int main() 51 | { 52 | // We'll output a totally different party-trick generator each time. 53 | // In each of 2^63 streams, there will be 2^64 generators that produce 54 | // this same party trick output. 55 | pcg32_k64 rng(pcg_extras::seed_seq_from{}); 56 | 57 | for (int i = 0; i < 256; ++i) { 58 | char c = desired[i]; 59 | int offset = (breaks[i] - '0') * 64; 60 | if (offset > 0) 61 | rng.advance(offset); 62 | else if (offset < 0) 63 | rng.backstep(-offset); 64 | uint32_t prior = rng(); 65 | uint32_t mask = ~(0xFFu << 8*(i % 4)); 66 | uint32_t adj = (prior & mask) | (uint32_t(c) << 8*(i % 4)); 67 | // Back up to overwrite the random number we just got 68 | rng.backstep(1); 69 | rng.set(adj); 70 | // Only advance to next number if we've done all four bytes. 71 | if ((i % 4) != 3) 72 | rng.backstep(1); 73 | } 74 | 75 | // Backstep to the start. 76 | rng.backstep(64*32); 77 | 78 | // Backstep a further 1MB 79 | rng.backstep(1024 * 1024 / 4); 80 | 81 | // Output the RNG state 82 | std::cout << rng << "\n"; 83 | return 0; 84 | } 85 | 86 | 87 | -------------------------------------------------------------------------------- /sample/pcg-demo.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This file is based on the demo program for the C generation schemes. 24 | * It shows some basic generation tasks. 25 | */ 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include // for random_device 37 | 38 | #include "pcg_random.hpp" 39 | 40 | // This code can be compiled with the preprocessor symbol RNG set to the 41 | // PCG generator you'd like to test. 42 | 43 | #ifndef RNG 44 | #define RNG pcg32 45 | #define TWO_ARG_INIT 1 46 | #endif 47 | 48 | #define STRINGIFY_IMPL(x) #x 49 | #define STRINGIFY(x) STRINGIFY_IMPL(x) 50 | 51 | using namespace std; 52 | using pcg_extras::operator<<; // Cause uint8_t to be printed as an int. 53 | 54 | int main(int argc, char** argv) 55 | { 56 | // Read command-line options 57 | 58 | int rounds = 5; 59 | bool nondeterministic_seed = false; 60 | 61 | ++argv; 62 | --argc; 63 | if (argc > 0 && strcmp(argv[0], "-r") == 0) { 64 | nondeterministic_seed = true; 65 | ++argv; 66 | --argc; 67 | } 68 | if (argc > 0) { 69 | rounds = atoi(argv[0]); 70 | } 71 | 72 | /* Many of the generators can be initialized with two arguments; the second 73 | * one specifies the stream. 74 | */ 75 | 76 | #if TWO_ARG_INIT 77 | RNG rng(42u, 54u); 78 | #else 79 | RNG rng(42u); 80 | #endif 81 | 82 | if (nondeterministic_seed) { 83 | // Seed with external entropy from std::random_device (a handy 84 | // utility provided by pcg_extras). 85 | rng.seed(pcg_extras::seed_seq_from()); 86 | } 87 | 88 | constexpr auto bits = sizeof(RNG::result_type) * CHAR_BIT; 89 | constexpr int how_many_nums = bits <= 8 ? 14 90 | : bits <= 16 ? 10 91 | : 6; 92 | constexpr int wrap_nums_at = bits > 64 ? 2 93 | : bits > 32 ? 3 94 | : how_many_nums; 95 | 96 | cout << STRINGIFY(RNG) << ":\n" 97 | // << " - aka: " << pcg_extras::printable_typename() 98 | // ^-- we skip this line because the output is long, scary, ugly, and 99 | // and varies depending on the platform 100 | << " - result: " << bits << "-bit unsigned int\n" 101 | << " - period: 2^" << RNG::period_pow2(); 102 | if (RNG::streams_pow2() > 0) 103 | cout << " (* 2^" << RNG::streams_pow2() << " streams)"; 104 | cout << "\n - size: " << sizeof(RNG) << " bytes\n\n"; 105 | 106 | for (int round = 1; round <= rounds; ++round) { 107 | printf("Round %d:\n", round); 108 | 109 | /* Make some N-bit numbers */ 110 | cout << setw(4) << setfill(' ') << bits << "bit:"; 111 | for (int i = 0; i < how_many_nums; ++i) { 112 | if (i > 0 && i % wrap_nums_at == 0) 113 | cout << "\n\t"; 114 | cout << " 0x" << hex << setfill('0') 115 | << setw(sizeof(RNG::result_type)*2) << rng(); 116 | } 117 | cout << endl; 118 | 119 | cout << " Again:"; 120 | rng.backstep(6); 121 | for (int i = 0; i < how_many_nums; ++i) { 122 | if (i > 0 && i % wrap_nums_at == 0) 123 | cout << "\n\t"; 124 | cout << " 0x" << hex << setfill('0') 125 | << setw(sizeof(RNG::result_type)*2) << rng(); 126 | } 127 | cout << dec << endl; 128 | 129 | /* Toss some coins */ 130 | cout << " Coins: "; 131 | for (int i = 0; i < 65; ++i) 132 | cout << (rng(2) ? "H" : "T"); 133 | cout << endl; 134 | 135 | RNG rng_copy{rng}; 136 | /* Roll some dice */ 137 | printf(" Rolls:"); 138 | for (int i = 0; i < 33; ++i) 139 | cout << " " << (uint32_t(rng(6)) + 1); 140 | cout << "\n --> rolling dice used " 141 | << (rng - rng_copy) << " random numbers" << endl; 142 | 143 | /* Deal some cards using std::shuffle 144 | * It's unspecified *how* std::shuffle shuffles the cards, or how many 145 | * random numbers it will use to do so, so we call std::shuffle and 146 | * measure how good it is. We won't use it for the final shuffle 147 | * to avoid platform-dependent output. 148 | */ 149 | rng_copy = rng; 150 | enum { SUITS = 4, NUMBERS = 13, CARDS = 52 }; 151 | char cards[CARDS]; 152 | iota(begin(cards), end(cards), 0); 153 | std::shuffle(begin(cards), end(cards), rng); 154 | auto std_shuffle_steps = rng - rng_copy; 155 | 156 | /* Restore RNG and deal again using pcg_extras::shuffle, which follows 157 | * the algorithm for shuffling that most programmers would expect. 158 | */ 159 | rng = rng_copy; 160 | iota(begin(cards), end(cards), 0); 161 | pcg_extras::shuffle(begin(cards), end(cards), rng); 162 | auto my_shuffle_steps = rng - rng_copy; 163 | 164 | /* Output the shuffled deck */ 165 | printf(" Cards:"); 166 | static const signed char number[] = {'A', '2', '3', '4', '5', '6', '7', 167 | '8', '9', 'T', 'J', 'Q', 'K'}; 168 | static const signed char suit[] = {'h', 'c', 'd', 's'}; 169 | int i = 0; 170 | for (auto card : cards) { 171 | ++i; 172 | cout << " " << number[card / SUITS] << suit[card % SUITS]; 173 | if (i % 22 == 0) 174 | cout << "\n\t"; 175 | } 176 | 177 | /* Output statistics about shuffling */ 178 | cout << "\n --> std::shuffle used " 179 | << std_shuffle_steps << " random numbers"; 180 | typedef RNG::state_type rngdelta_t; 181 | if (std_shuffle_steps > rngdelta_t(52)) { 182 | cout << "\n\t -- that's " << (std_shuffle_steps - rngdelta_t(51)) 183 | << " more than we'd expect; inefficient implementation"; 184 | } 185 | cout << "\n --> pcg_extras::shuffle used " 186 | << my_shuffle_steps << " random numbers"; 187 | 188 | cout << "\n" << endl; 189 | } 190 | 191 | return 0; 192 | } 193 | -------------------------------------------------------------------------------- /sample/spew.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This program outputs 215 GB of random bits (binary data). This is 24 | * about the same as the total output of random.org in its 15 year history. 25 | * The code uses 1.25e-8 of the period, and chooses an arbitrary stream from 26 | * 2^64 streams. 27 | * 28 | * Typical usage: 29 | * ./spew | hexdump -C | less 30 | */ 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | 38 | #include // We use POSIX read/write for binary I/O 39 | 40 | #include "pcg_random.hpp" 41 | 42 | int main() 43 | { 44 | pcg32_fast rng(pcg_extras::seed_seq_from{}); 45 | std::clog << rng << "\n\n"; 46 | 47 | constexpr size_t BUFFER_SIZE = 1024ull * 128ull; 48 | uint32_t buffer[BUFFER_SIZE]; 49 | constexpr size_t ROUNDS = 215 * 1073741824ull / sizeof(buffer); 50 | 51 | for (size_t i = 0; i < ROUNDS; ++i) { 52 | for (auto& v : buffer) 53 | v = rng(); 54 | write(1, (void*) buffer, sizeof(buffer)); 55 | } 56 | return 0; 57 | } 58 | 59 | 60 | -------------------------------------------------------------------------------- /sample/use-partytrick.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This program behaves like the spew program, the only difference is that 24 | * after 1 MB of output, the output gets "interesting" for a brief while. 25 | * See make-partytrick.cpp for more details. 26 | * 27 | * Typical usage: 28 | * ./use-partytrick | hexdump -C | less 29 | */ 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | #include 40 | 41 | #include "pcg_random.hpp" 42 | 43 | static const char* saved_state = 44 | "6364136223846793005 3503324247726078831 6557656048857751321 103238831 " 45 | "665891259 1902651333 4073047566 368781010 3371458373 3520911659 1176018374 " 46 | "1290944887 2479283234 2214499777 3287447736 4241043352 2808175048 83300271 " 47 | "162496091 3372211384 3773661488 3842517107 154403914 1983905875 185363760 " 48 | "3574548828 4259275054 2055322655 3183516320 3827707798 2358810643 3947601356 " 49 | "1518701804 2987610801 4256672123 243420444 2418646926 1593945712 3293969771 " 50 | "1047458160 4148325853 4134598831 813996594 2374617805 712898811 2110551176 " 51 | "233031372 1753202862 281911517 1950853967 3790278509 4176603202 4256155456 " 52 | "1413186342 1718872307 2898301505 1732438719 622306094 366401535 2963949396 " 53 | "2676833081 98878999 999895120 425860638 4096143638 4063627507 2566817785"; 54 | 55 | 56 | int main() 57 | { 58 | pcg32_k64 rng; 59 | std::istringstream inbuf(saved_state); 60 | inbuf >> rng; 61 | std::clog << inbuf.str() << "\n\n"; 62 | if (inbuf.fail()) 63 | abort(); 64 | 65 | constexpr size_t BUFFER_SIZE = 1024ull * 128ull; 66 | uint32_t buffer[BUFFER_SIZE]; 67 | constexpr size_t ROUNDS = 215 * 1073741824ull / sizeof(buffer); 68 | 69 | for (size_t i = 0; i < ROUNDS; ++i) { 70 | for (auto& v : buffer) 71 | v = rng(); 72 | write(1, (void*) buffer, sizeof(buffer)); 73 | } 74 | 75 | return 0; 76 | } 77 | 78 | 79 | -------------------------------------------------------------------------------- /test-high/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Debug Information 26 | *.dSYM 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | 33 | # Actual Project Executables 34 | check-pcg8_once_insecure 35 | check-pcg8_oneseq_once_insecure 36 | check-pcg16_once_insecure 37 | check-pcg16_oneseq_once_insecure 38 | check-pcg32 39 | check-pcg32_c1024 40 | check-pcg32_c1024_fast 41 | check-pcg32_c64 42 | check-pcg32_c64_fast 43 | check-pcg32_c64_oneseq 44 | check-pcg32_fast 45 | check-pcg32_k1024 46 | check-pcg32_k1024_fast 47 | check-pcg32_k16384 48 | check-pcg32_k16384_fast 49 | check-pcg32_k2 50 | check-pcg32_k2_fast 51 | check-pcg32_k64 52 | check-pcg32_k64_fast 53 | check-pcg32_k64_oneseq 54 | check-pcg32_once_insecure 55 | check-pcg32_oneseq 56 | check-pcg32_oneseq_once_insecure 57 | check-pcg32_unique 58 | check-pcg64 59 | check-pcg64_c1024 60 | check-pcg64_c1024_fast 61 | check-pcg64_c32 62 | check-pcg64_c32_fast 63 | check-pcg64_c32_oneseq 64 | check-pcg64_fast 65 | check-pcg64_k1024 66 | check-pcg64_k1024_fast 67 | check-pcg64_k32 68 | check-pcg64_k32_fast 69 | check-pcg64_k32_oneseq 70 | check-pcg64_once_insecure 71 | check-pcg64_oneseq 72 | check-pcg64_oneseq_once_insecure 73 | check-pcg64_unique 74 | check-pcg128_once_insecure 75 | check-pcg128_oneseq_once_insecure 76 | -------------------------------------------------------------------------------- /test-high/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # PCG Random Number Generation for C++. 3 | # 4 | # Copyright 2014-2017 Melissa O'Neill , 5 | # and the PCG Project contributors. 6 | # 7 | # SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | # 9 | # Licensed under the Apache License, Version 2.0 (provided in 10 | # LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | # or under the MIT license (provided in LICENSE-MIT.txt and at 12 | # http://opensource.org/licenses/MIT), at your option. This file may not 13 | # be copied, modified, or distributed except according to those terms. 14 | # 15 | # Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | # express or implied. See your chosen license for details. 17 | # 18 | # For additional information about the PCG random number generation scheme, 19 | # visit http://www.pcg-random.org/. 20 | # 21 | 22 | TARGETS = \ 23 | check-pcg8_once_insecure check-pcg8_oneseq_once_insecure \ 24 | check-pcg16_once_insecure check-pcg16_oneseq_once_insecure check-pcg32 \ 25 | check-pcg32_c1024 check-pcg32_c1024_fast check-pcg32_c64 \ 26 | check-pcg32_c64_fast check-pcg32_c64_oneseq check-pcg32_fast \ 27 | check-pcg32_k1024 check-pcg32_k1024_fast check-pcg32_k16384 \ 28 | check-pcg32_k16384_fast check-pcg32_k2 check-pcg32_k2_fast \ 29 | check-pcg32_k64 check-pcg32_k64_fast check-pcg32_k64_oneseq \ 30 | check-pcg32_once_insecure check-pcg32_oneseq \ 31 | check-pcg32_oneseq_once_insecure check-pcg32_unique check-pcg64 \ 32 | check-pcg64_c1024 check-pcg64_c1024_fast check-pcg64_c32 \ 33 | check-pcg64_c32_fast check-pcg64_c32_oneseq check-pcg64_fast \ 34 | check-pcg64_k1024 check-pcg64_k1024_fast check-pcg64_k32 \ 35 | check-pcg64_k32_fast check-pcg64_k32_oneseq check-pcg64_once_insecure \ 36 | check-pcg64_oneseq check-pcg64_oneseq_once_insecure check-pcg64_unique \ 37 | check-pcg128_once_insecure check-pcg128_oneseq_once_insecure 38 | 39 | # special flags for some compilers 40 | CPPFLAGS_clang++ += \ 41 | -Weverything \ 42 | -Wno-unknown-warning-option \ 43 | -Wno-c++98-compat \ 44 | -Wno-c++98-compat-pedantic \ 45 | -Wno-date-time \ 46 | -Wno-undef \ 47 | -Wno-header-hygiene \ 48 | -Wno-unused-macros 49 | 50 | CPPFLAGS += -I../include -Wall -Wextra $(CPPFLAGS_$(CXX)) 51 | CXXFLAGS += -std=c++11 52 | CC = $(CXX) # Cheat so that linking uses the C++ compiler 53 | 54 | all: $(TARGETS) 55 | 56 | test: $(TARGETS) 57 | sh run-tests.sh 58 | 59 | clean: 60 | rm -f *.o $(TARGETS) 61 | rm -rf actual 62 | 63 | pcg-test-noadvance.o: pcg-test-noadvance.cpp ../include/pcg_random.hpp \ 64 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 65 | pcg-test.o: pcg-test.cpp ../include/pcg_random.hpp \ 66 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 67 | check-pcg8_once_insecure.o: check-pcg8_once_insecure.cpp pcg-test.cpp \ 68 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 69 | ../include/pcg_uint128.hpp 70 | check-pcg8_oneseq_once_insecure.o: check-pcg8_oneseq_once_insecure.cpp \ 71 | pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 72 | ../include/pcg_uint128.hpp 73 | check-pcg16_once_insecure.o: check-pcg16_once_insecure.cpp pcg-test.cpp \ 74 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 75 | ../include/pcg_uint128.hpp 76 | check-pcg16_oneseq_once_insecure.o: check-pcg16_oneseq_once_insecure.cpp \ 77 | pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 78 | ../include/pcg_uint128.hpp 79 | check-pcg32.o: check-pcg32.cpp pcg-test.cpp ../include/pcg_random.hpp \ 80 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 81 | check-pcg32_c1024.o: check-pcg32_c1024.cpp pcg-test-noadvance.cpp \ 82 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 83 | ../include/pcg_uint128.hpp 84 | check-pcg32_c1024_fast.o: check-pcg32_c1024_fast.cpp \ 85 | pcg-test-noadvance.cpp ../include/pcg_random.hpp \ 86 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 87 | check-pcg32_c64.o: check-pcg32_c64.cpp pcg-test-noadvance.cpp \ 88 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 89 | ../include/pcg_uint128.hpp 90 | check-pcg32_c64_fast.o: check-pcg32_c64_fast.cpp pcg-test-noadvance.cpp \ 91 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 92 | ../include/pcg_uint128.hpp 93 | check-pcg32_c64_oneseq.o: check-pcg32_c64_oneseq.cpp \ 94 | pcg-test-noadvance.cpp ../include/pcg_random.hpp \ 95 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 96 | check-pcg32_fast.o: check-pcg32_fast.cpp pcg-test.cpp \ 97 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 98 | ../include/pcg_uint128.hpp 99 | check-pcg32_k1024.o: check-pcg32_k1024.cpp pcg-test.cpp \ 100 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 101 | ../include/pcg_uint128.hpp 102 | check-pcg32_k1024_fast.o: check-pcg32_k1024_fast.cpp pcg-test.cpp \ 103 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 104 | ../include/pcg_uint128.hpp 105 | check-pcg32_k16384.o: check-pcg32_k16384.cpp pcg-test.cpp \ 106 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 107 | ../include/pcg_uint128.hpp 108 | check-pcg32_k16384_fast.o: check-pcg32_k16384_fast.cpp pcg-test.cpp \ 109 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 110 | ../include/pcg_uint128.hpp 111 | check-pcg32_k2.o: check-pcg32_k2.cpp pcg-test.cpp \ 112 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 113 | ../include/pcg_uint128.hpp 114 | check-pcg32_k2_fast.o: check-pcg32_k2_fast.cpp pcg-test.cpp \ 115 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 116 | ../include/pcg_uint128.hpp 117 | check-pcg32_k64.o: check-pcg32_k64.cpp pcg-test.cpp \ 118 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 119 | ../include/pcg_uint128.hpp 120 | check-pcg32_k64_fast.o: check-pcg32_k64_fast.cpp pcg-test.cpp \ 121 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 122 | ../include/pcg_uint128.hpp 123 | check-pcg32_k64_oneseq.o: check-pcg32_k64_oneseq.cpp pcg-test.cpp \ 124 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 125 | ../include/pcg_uint128.hpp 126 | check-pcg32_once_insecure.o: check-pcg32_once_insecure.cpp pcg-test.cpp \ 127 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 128 | ../include/pcg_uint128.hpp 129 | check-pcg32_oneseq.o: check-pcg32_oneseq.cpp pcg-test.cpp \ 130 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 131 | ../include/pcg_uint128.hpp 132 | check-pcg32_oneseq_once_insecure.o: check-pcg32_oneseq_once_insecure.cpp \ 133 | pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 134 | ../include/pcg_uint128.hpp 135 | check-pcg32_unique.o: check-pcg32_unique.cpp pcg-test-noadvance.cpp \ 136 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 137 | ../include/pcg_uint128.hpp 138 | check-pcg64.o: check-pcg64.cpp pcg-test.cpp ../include/pcg_random.hpp \ 139 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 140 | check-pcg64_c1024.o: check-pcg64_c1024.cpp pcg-test-noadvance.cpp \ 141 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 142 | ../include/pcg_uint128.hpp 143 | check-pcg64_c1024_fast.o: check-pcg64_c1024_fast.cpp \ 144 | pcg-test-noadvance.cpp ../include/pcg_random.hpp \ 145 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 146 | check-pcg64_c32.o: check-pcg64_c32.cpp pcg-test-noadvance.cpp \ 147 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 148 | ../include/pcg_uint128.hpp 149 | check-pcg64_c32_fast.o: check-pcg64_c32_fast.cpp pcg-test-noadvance.cpp \ 150 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 151 | ../include/pcg_uint128.hpp 152 | check-pcg64_c32_oneseq.o: check-pcg64_c32_oneseq.cpp \ 153 | pcg-test-noadvance.cpp ../include/pcg_random.hpp \ 154 | ../include/pcg_extras.hpp ../include/pcg_uint128.hpp 155 | check-pcg64_fast.o: check-pcg64_fast.cpp pcg-test.cpp \ 156 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 157 | ../include/pcg_uint128.hpp 158 | check-pcg64_k1024.o: check-pcg64_k1024.cpp pcg-test.cpp \ 159 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 160 | ../include/pcg_uint128.hpp 161 | check-pcg64_k1024_fast.o: check-pcg64_k1024_fast.cpp pcg-test.cpp \ 162 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 163 | ../include/pcg_uint128.hpp 164 | check-pcg64_k32.o: check-pcg64_k32.cpp pcg-test.cpp \ 165 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 166 | ../include/pcg_uint128.hpp 167 | check-pcg64_k32_fast.o: check-pcg64_k32_fast.cpp pcg-test.cpp \ 168 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 169 | ../include/pcg_uint128.hpp 170 | check-pcg64_k32_oneseq.o: check-pcg64_k32_oneseq.cpp pcg-test.cpp \ 171 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 172 | ../include/pcg_uint128.hpp 173 | check-pcg64_once_insecure.o: check-pcg64_once_insecure.cpp pcg-test.cpp \ 174 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 175 | ../include/pcg_uint128.hpp 176 | check-pcg64_oneseq.o: check-pcg64_oneseq.cpp pcg-test.cpp \ 177 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 178 | ../include/pcg_uint128.hpp 179 | check-pcg64_oneseq_once_insecure.o: check-pcg64_oneseq_once_insecure.cpp \ 180 | pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 181 | ../include/pcg_uint128.hpp 182 | check-pcg64_unique.o: check-pcg64_unique.cpp pcg-test-noadvance.cpp \ 183 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 184 | ../include/pcg_uint128.hpp 185 | check-pcg128_once_insecure.o: check-pcg128_once_insecure.cpp pcg-test.cpp \ 186 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 187 | ../include/pcg_uint128.hpp 188 | check-pcg128_oneseq_once_insecure.o: \ 189 | check-pcg128_oneseq_once_insecure.cpp pcg-test.cpp \ 190 | ../include/pcg_random.hpp ../include/pcg_extras.hpp \ 191 | ../include/pcg_uint128.hpp 192 | -------------------------------------------------------------------------------- /test-high/check-pcg128_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg128_once_insecure 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg128_oneseq_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg128_oneseq_once_insecure 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg16_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg16_once_insecure 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg16_oneseq_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg16_oneseq_once_insecure 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_c1024.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_c1024 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_c1024_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_c1024_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_c64.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_c64 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_c64_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_c64_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_c64_oneseq.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_c64_oneseq 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k1024.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k1024 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k1024_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k1024_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k16384.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k16384 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k16384_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k16384_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k2.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k2 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k2_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k2_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k64.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k64 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k64_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k64_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_k64_oneseq.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_k64_oneseq 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_once_insecure 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_oneseq.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_oneseq 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_oneseq_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_oneseq_once_insecure 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg32_unique.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg32_unique 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg64.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg64_c1024.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_c1024 2 | #define TWO_ARG_INIT 1 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test-noadvance.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_c1024_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_c1024_fast 2 | #define TWO_ARG_INIT 0 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test-noadvance.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_c32.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_c32 2 | #define TWO_ARG_INIT 1 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test-noadvance.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_c32_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_c32_fast 2 | #define TWO_ARG_INIT 0 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test-noadvance.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_c32_oneseq.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_c32_oneseq 2 | #define TWO_ARG_INIT 0 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test-noadvance.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_fast 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg64_k1024.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_k1024 2 | #define TWO_ARG_INIT 1 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_k1024_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_k1024_fast 2 | #define TWO_ARG_INIT 0 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_k32.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_k32 2 | #define TWO_ARG_INIT 1 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_k32_fast.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_k32_fast 2 | #define TWO_ARG_INIT 0 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_k32_oneseq.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_k32_oneseq 2 | #define TWO_ARG_INIT 0 3 | #define AWKWARD_128BIT_CODE 1 4 | 5 | #include "pcg-test.cpp" 6 | 7 | -------------------------------------------------------------------------------- /test-high/check-pcg64_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_once_insecure 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg64_oneseq.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_oneseq 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg64_oneseq_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_oneseq_once_insecure 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg64_unique.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg64_unique 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test-noadvance.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg8_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg8_once_insecure 2 | #define TWO_ARG_INIT 1 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/check-pcg8_oneseq_once_insecure.cpp: -------------------------------------------------------------------------------- 1 | #define RNG pcg8_oneseq_once_insecure 2 | #define TWO_ARG_INIT 0 3 | 4 | #include "pcg-test.cpp" 5 | 6 | -------------------------------------------------------------------------------- /test-high/expected/.gitignore: -------------------------------------------------------------------------------- 1 | # These .out files shouldn't be ignored 2 | !*.out 3 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg128_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg128_once_insecure: 2 | - result: 128-bit unsigned int 3 | - period: 2^128 (* 2^127 streams) 4 | - size: 32 bytes 5 | 6 | Round 1: 7 | 128bit: 0x5f4ea96e8510af0686b1da1d72062b68 0x341b1cb1e675ec461304aa46c9853d39 8 | 0xcfdc46c17f1c9974a3670e9e0dd50358 0x02d273b87fe9110cf9090e529a7dae00 9 | 0x9b4e47fda576f0ddc85b9fd837996f2c 0x17cee59c8cb9c0a1606121f8e3919196 10 | Again: 0x5f4ea96e8510af0686b1da1d72062b68 0x341b1cb1e675ec461304aa46c9853d39 11 | 0xcfdc46c17f1c9974a3670e9e0dd50358 0x02d273b87fe9110cf9090e529a7dae00 12 | 0x9b4e47fda576f0ddc85b9fd837996f2c 0x17cee59c8cb9c0a1606121f8e3919196 13 | Coins: TTTHHHTTTHHHTTTTHHTTHHTHTHTTHHTHTTTTHHTTTHTHHTHTTTTHHTTTHHHTTTHTT 14 | Rolls: 4 4 1 5 3 1 1 3 4 5 4 6 2 5 2 5 3 1 3 3 1 4 6 2 5 4 4 3 3 6 6 3 2 15 | --> rolling dice used 33 random numbers 16 | Cards: As 2s 8h Tc 3c 5h Ac 5c 9d 8d Td Ts 4c 7d 9c Jh 3d Th 8s 5s 2h 6d 17 | 7h 3h Qd 7c Qh Ks Js Kh 6s 3s Qc Ah 6h 9s Ad Kc 6c Kd 5d Jd 2d Jc 18 | 2c 4d Qs 9h 7s 8c 4h 4s 19 | 20 | Round 2: 21 | 128bit: 0x95a15dc187be75191773ba241e7a792a 0x7f9a9c8dc8ee5d30e41aed7117b0bc10 22 | 0x859f2aaeb7456bae36bac8d9432af525 0xd83833165d913fb0e0c78e2f3c850a38 23 | 0xa437ee7e51a835ebe3ad939c1c7ce70d 0x9a515b18be44d777a302fdced8c79e93 24 | Again: 0x95a15dc187be75191773ba241e7a792a 0x7f9a9c8dc8ee5d30e41aed7117b0bc10 25 | 0x859f2aaeb7456bae36bac8d9432af525 0xd83833165d913fb0e0c78e2f3c850a38 26 | 0xa437ee7e51a835ebe3ad939c1c7ce70d 0x9a515b18be44d777a302fdced8c79e93 27 | Coins: TTTTHTHTHHTHTHTTTTTHHTTHHHHTHTHHHHHHHTHHHTHHTHTTTHHHHTTHHTTTHTHTH 28 | Rolls: 6 5 3 3 2 3 3 2 5 2 6 6 6 4 2 2 5 5 2 2 4 1 5 3 1 5 5 6 2 4 5 2 1 29 | --> rolling dice used 33 random numbers 30 | Cards: 3s Qd Qc 6s 7c 8d 5s 5c Kc 7h Kd Ad 4d 6c Kh Qh 2c Jc Th Jh 4c Ks 31 | Td 8s Jd 2h Ac 9c 7s 8c 3c Ah 9h 3h 7d 8h Js Qs As 4s 6d 5d 9s 9d 32 | 5h 3d 6h Tc 4h Ts 2d 2s 33 | 34 | Round 3: 35 | 128bit: 0x6bfdb8dec74ac18ac96006593aed3b62 0xeef8b9c71cb3b932f04d5afa3f197bf1 36 | 0x904d15f0ead523cfce6f729cc913a50f 0x34d0abbd7c06a00798b5fc4fbb1e4aea 37 | 0xa7d1cc41ac8cf8d1802dce1b410fc8c3 0x1622c80e085b475ae3bac0a14f6e5033 38 | Again: 0x6bfdb8dec74ac18ac96006593aed3b62 0xeef8b9c71cb3b932f04d5afa3f197bf1 39 | 0x904d15f0ead523cfce6f729cc913a50f 0x34d0abbd7c06a00798b5fc4fbb1e4aea 40 | 0xa7d1cc41ac8cf8d1802dce1b410fc8c3 0x1622c80e085b475ae3bac0a14f6e5033 41 | Coins: HTTHTHTTTTTHTTTHHTHTHHTHHHHHHHHHTTTHTHTHTHHTTTTTTHHHHTHTTTTHHHHHH 42 | Rolls: 1 4 4 1 5 1 2 1 4 5 6 3 3 1 6 5 6 5 4 6 6 5 2 6 6 6 1 4 4 6 5 4 1 43 | --> rolling dice used 33 random numbers 44 | Cards: Jh Th 3s 4d 7c Kd Kc 4h 8h 3c 9d 3h Ac 5h 9s 8d 6d 7h 5s Qs 5d Ah 45 | Td 8s Ad 6s 7s 7d Ts 2h 5c As Tc 3d Js 4s 2s Jc 2d Ks 6h 2c 4c 6c 46 | Qc Qd 9c Kh 8c Jd Qh 9h 47 | 48 | Round 4: 49 | 128bit: 0x776dd6f62f789d2368da679de81de48a 0x325b1acf6c0987ad7ee3c031fa0aa440 50 | 0x4c2fa58857bd28a36eb1663983530403 0x2da890444508568bfec4d7a9a7aec823 51 | 0x2d0d7462ff348734bce221c255ee9467 0xf27f193f4fdbda86460a42a962b8a2f9 52 | Again: 0x776dd6f62f789d2368da679de81de48a 0x325b1acf6c0987ad7ee3c031fa0aa440 53 | 0x4c2fa58857bd28a36eb1663983530403 0x2da890444508568bfec4d7a9a7aec823 54 | 0x2d0d7462ff348734bce221c255ee9467 0xf27f193f4fdbda86460a42a962b8a2f9 55 | Coins: HHHTTTTHHHHHTTTTTTTHHHTHHHHTTHTTTHTTTTHTHHHHTHHTTTHHHTHHTTHHHTHTH 56 | Rolls: 5 1 4 1 2 6 5 4 1 2 1 3 2 2 5 3 5 1 4 2 2 4 1 1 1 2 4 4 5 3 6 5 6 57 | --> rolling dice used 33 random numbers 58 | Cards: 8h Ks 2s 5h Kh 2c Kc 9d 8c 9c 3s Jd Ts 5d 7c 8s Ah Jc 5s 4h Ad 4s 59 | 7d Qc 4c Jh 3d 6s Qh 7s 4d Tc 2h Ac 6c Js 3c Qd As 8d 9s 5c 9h 3h 60 | 6h Th Kd 6d 2d Td 7h Qs 61 | 62 | Round 5: 63 | 128bit: 0x2a51386ff58abc4f9e0d084cff42fe2f 0x4f5b3035738c6f7a63cd8347aae338ea 64 | 0xacdba2191e7281ad112aae00540d3fa1 0xa46125301827966c53968bc829afd6ec 65 | 0xc11d0f0a93287f5c1b9900eb6c5b6d90 0xd723aefa2d73f7b7e89ed17ea33cb420 66 | Again: 0x2a51386ff58abc4f9e0d084cff42fe2f 0x4f5b3035738c6f7a63cd8347aae338ea 67 | 0xacdba2191e7281ad112aae00540d3fa1 0xa46125301827966c53968bc829afd6ec 68 | 0xc11d0f0a93287f5c1b9900eb6c5b6d90 0xd723aefa2d73f7b7e89ed17ea33cb420 69 | Coins: HTTTTTHTHTHHHTHTTTHTHHTHHTHTTTHHTTHHHTTTTHTTHHTHHTHHHTTHHTHTHHHHH 70 | Rolls: 6 4 5 5 1 2 1 3 1 5 4 4 5 4 6 2 2 6 6 4 2 3 4 5 3 1 2 1 5 6 1 3 2 71 | --> rolling dice used 33 random numbers 72 | Cards: 8s 8h Td 8c Js Jd 5s Kd 8d 9s 4d Ah 2d 4h As Th 4s 6s Qc Ad 9h 3h 73 | Qh 5d 3s 9c 7c 3c Ts Kc 6c Jh 6d 2h 7d 9d Ac 5c Qs 2c 6h Ks 4c 3d 74 | Kh 2s 7s Qd Jc 5h 7h Tc 75 | 76 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg128_oneseq_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg128_oneseq_once_insecure: 2 | - result: 128-bit unsigned int 3 | - period: 2^128 4 | - size: 16 bytes 5 | 6 | Round 1: 7 | 128bit: 0xf7d42ec98a2a818c287472e87ff5705a 0x1e69ebc79672e381bbd190b04ed0b545 8 | 0xefb0314dea875a49b6cee3580db14880 0xff56268e0e45f685bf5f7d7e4c3d1864 9 | 0x03f0bf312cd0282c734eedbe7e50bbc5 0xfcfdd5e15426494fa5b6b5f867691c77 10 | Again: 0xf7d42ec98a2a818c287472e87ff5705a 0x1e69ebc79672e381bbd190b04ed0b545 11 | 0xefb0314dea875a49b6cee3580db14880 0xff56268e0e45f685bf5f7d7e4c3d1864 12 | 0x03f0bf312cd0282c734eedbe7e50bbc5 0xfcfdd5e15426494fa5b6b5f867691c77 13 | Coins: HHTHHHTTHTHHTTTHHHTHHHTTTTTHHTHTTTTHHTHHTTTTTTHHTHTHTTTTTHTHHTTHT 14 | Rolls: 3 6 4 3 6 2 4 3 5 4 1 4 3 3 5 6 3 5 5 3 4 5 5 1 3 4 6 2 3 4 3 3 1 15 | --> rolling dice used 33 random numbers 16 | Cards: 3s Jd Qd Ts 8s 4c Kh 4s Ac Ad 9c Ah 5d 7d 7h Jc Ks Qh 6h Th 6d 9d 17 | 6c 9h 7s 2d Qs Kc 3h Jh Qc 4h As 2h Tc Td 2c 8h Js 7c 5s 6s 5h 3c 18 | 2s 9s Kd 5c 3d 8c 8d 4d 19 | 20 | Round 2: 21 | 128bit: 0xf657b5d68ca3880a7d97ee72fb94fdf0 0xb6d7db0f93fbc13fb35f07d53cc42b66 22 | 0x3090b33f287f5fc90854c5caec0c251f 0x7bd6f8253f1bb54df37961a645554320 23 | 0xc080f66ee911f6861d1d213622351b24 0x42504eca45b1ed4c6edbb396c73fb49f 24 | Again: 0xf657b5d68ca3880a7d97ee72fb94fdf0 0xb6d7db0f93fbc13fb35f07d53cc42b66 25 | 0x3090b33f287f5fc90854c5caec0c251f 0x7bd6f8253f1bb54df37961a645554320 26 | 0xc080f66ee911f6861d1d213622351b24 0x42504eca45b1ed4c6edbb396c73fb49f 27 | Coins: HHTTHHHTHHHHHTTHHHTHHTHTHTTTHHTHHHHHHTHTTHHHHHTHTTHTHHHTHHTTHHHHH 28 | Rolls: 3 2 2 6 1 1 4 6 2 6 3 1 4 3 2 1 4 1 5 5 3 5 1 2 6 4 1 1 3 6 6 4 1 29 | --> rolling dice used 33 random numbers 30 | Cards: 7h Qs 4d 2h Qh Jd 6d Tc 3d Ac 9h Js 8c 6h 5s 5d 2d Kc 6c 3h Qd As 31 | Qc 2c 7c 4s Jh Td Ah Th 5h 4h 9d 4c Kh Kd 5c 3c Ad 9s 8d Ks 9c 2s 32 | 6s 7s Ts 8h Jc 7d 8s 3s 33 | 34 | Round 3: 35 | 128bit: 0x474a8b4dd63fff9a187ee00430cec695 0xd4f3e727b584915338efe3fb60c70613 36 | 0xc49d27028d4f01593949bd01ef38c552 0x60ef12216f0362b9d3f1543a45f3b48f 37 | 0x8eae641ccbbcb70dfb81a0482dc602cd 0xd15396a34394d7f6b48e4f661e4c7fc5 38 | Again: 0x474a8b4dd63fff9a187ee00430cec695 0xd4f3e727b584915338efe3fb60c70613 39 | 0xc49d27028d4f01593949bd01ef38c552 0x60ef12216f0362b9d3f1543a45f3b48f 40 | 0x8eae641ccbbcb70dfb81a0482dc602cd 0xd15396a34394d7f6b48e4f661e4c7fc5 41 | Coins: THTTTHHTHHHHHHTHTTTTHHTHTHTHHHTHTTTTTHHTHTTTTTHTTTTTHHTHHHTTTTHHT 42 | Rolls: 1 3 4 6 1 3 4 5 5 6 3 2 4 5 1 1 5 3 4 5 6 2 2 1 3 1 2 5 2 3 3 4 5 43 | --> rolling dice used 33 random numbers 44 | Cards: Ac As 6s Ks Tc Qd Js 6c 8c 8d 4d Ad Jh Jc Qc 6d 7h 3c 5h 5d 4s Th 45 | 5c 7d Qs 3d Kd Kc Ah 9d 5s 2c 2h 2s Qh Jd 9c 9h 8h 7s 3h Ts 6h 4c 46 | 8s Kh 9s 7c 3s 4h 2d Td 47 | 48 | Round 4: 49 | 128bit: 0x2f507b073ac8d692d04c0a3a8cf6c571 0x36ea864decf51f82bc94812fe9ec2c93 50 | 0x6b484924a27f6dbd691f3e3aa2f42c77 0x954cc5481ed0a339b7188d5162d89a1e 51 | 0x71cf26b7d22eeeaa17fbf02e08fee28a 0x1c485acb575bc6b71aa17486e288664f 52 | Again: 0x2f507b073ac8d692d04c0a3a8cf6c571 0x36ea864decf51f82bc94812fe9ec2c93 53 | 0x6b484924a27f6dbd691f3e3aa2f42c77 0x954cc5481ed0a339b7188d5162d89a1e 54 | 0x71cf26b7d22eeeaa17fbf02e08fee28a 0x1c485acb575bc6b71aa17486e288664f 55 | Coins: THTHHHTTTHHHHHTTHHHHHTTHHTTHTHTTHHHHHTHTTHTTTTHTTTHTHHHHTTHHTTHTH 56 | Rolls: 3 4 3 2 6 3 1 6 6 5 3 1 1 5 2 2 1 3 1 3 3 6 4 4 4 5 2 2 6 4 6 4 3 57 | --> rolling dice used 33 random numbers 58 | Cards: 4h Qd 7c Ks Jh Jd 3s 9d Js 5s 2h 3d Jc 3h Kh 8c 4d 6c 7s 2d Ac 6h 59 | Qc 4s Ad 8s 6d 9s 7h Tc 9h Kd As Ah Ts 3c 2s Qh 8h 7d 5d 2c 5h 8d 60 | Th Kc 5c 4c Td Qs 6s 9c 61 | 62 | Round 5: 63 | 128bit: 0x5429101b49650cc710bda17a1292d5aa 0xda89dc366ccf5b0bf0cd1384e25b3497 64 | 0x2e9e600e8203edde8e592be49a6a6181 0x554d49c17d5ce73a5edc4faf5cda5865 65 | 0x604de2e6fe77a156b2ecea43437a3f8c 0xaaf05073cb7cd14c98dbb99c3550f0e4 66 | Again: 0x5429101b49650cc710bda17a1292d5aa 0xda89dc366ccf5b0bf0cd1384e25b3497 67 | 0x2e9e600e8203edde8e592be49a6a6181 0x554d49c17d5ce73a5edc4faf5cda5865 68 | 0x604de2e6fe77a156b2ecea43437a3f8c 0xaaf05073cb7cd14c98dbb99c3550f0e4 69 | Coins: HTHTHHHHHHTHHTTHHHTTTTTTHTTTHHHTHHHHHHHHHTTTTHHTTTHTHHHHTTHHHHTTH 70 | Rolls: 1 5 6 6 5 4 2 4 4 3 5 6 6 1 4 1 5 5 2 3 5 4 1 5 1 2 5 6 3 4 1 6 2 71 | --> rolling dice used 33 random numbers 72 | Cards: Th 3h 3s 8h 6h Kh 4c 4s Js 8c 2s 6c Qc 9c 9s Ks As Ad 5d 7h 5h 3c 73 | 8d Qs Ts 4d Jh Tc Ac 6s 2c Jc 3d 9d 5s 4h Ah 6d 7c 8s 7d Td Qh Kc 74 | 2d 9h 5c Qd Jd 2h Kd 7s 75 | 76 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg16_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg16_once_insecure: 2 | - result: 16-bit unsigned int 3 | - period: 2^16 (* 2^15 streams) 4 | - size: 4 bytes 5 | 6 | Round 1: 7 | 16bit: 0x9bec 0x5957 0x960e 0xd08d 0x4e05 0xde00 0x03f7 0x1fa6 0xee22 0xf6fa 8 | Again: 0x4e05 0xde00 0x03f7 0x1fa6 0xee22 0xf6fa 0x4aad 0xed64 0x9b8a 0x8a77 9 | Coins: TTTHTTHTTHHHTTHHTTTTHTHHTHHTHTTHHHTTHTTHTHHTTTHTHTTHTHTHHTHTTTHTH 10 | Rolls: 1 4 1 3 6 4 4 4 3 1 6 4 3 6 3 5 2 6 5 2 4 4 2 4 1 2 1 4 4 6 6 2 6 11 | --> rolling dice used 33 random numbers 12 | Cards: Js 4s Jd Ts 2h Qc 4c 9d Jh 3d 2d 8h 3c Jc Tc 9h Kh 4h 6h 4d As Qd 13 | 5d 8s 7s 6s 2s Kd Kc 7d 6d 7c Ks 5s Ad Qh 3s Ah 9s 6c 7h Ac Td 9c 14 | 3h Th 8d 2c Qs 5h 8c 5c 15 | 16 | Round 2: 17 | 16bit: 0x6d56 0x15fd 0xde82 0x6cef 0x283e 0x8b82 0x94b3 0xdb7a 0x6c9d 0xaeac 18 | Again: 0x283e 0x8b82 0x94b3 0xdb7a 0x6c9d 0xaeac 0x0522 0x1190 0xad62 0x9490 19 | Coins: THHHHHTTTTTTTHTHTHHHTHTHHTTHTHHHHTHHTHTHHTTTHTTTTTHHTHTTTTTHHHTTT 20 | Rolls: 3 4 5 5 1 1 4 6 3 4 3 4 3 4 1 6 3 5 1 6 3 4 5 5 5 4 5 6 2 6 5 4 6 21 | --> rolling dice used 33 random numbers 22 | Cards: 4c 8d 9d 5d 2c Kh 5h 6c Ks 7h 8c 8s 7d 5s Jh Ah Qs 8h Th 2s 5c Jc 23 | 4d 6h 3c 9h Qh As 6s 3s Ac Kd Qc 7s Jd 9s 3d Ad Td Js Kc 6d Tc 3h 24 | 4h 2h 4s 2d 9c Ts 7c Qd 25 | 26 | Round 3: 27 | 16bit: 0x7d5b 0xfd3f 0x64a4 0x1752 0x70b2 0x093f 0x9888 0xed16 0xa2d3 0x485b 28 | Again: 0x70b2 0x093f 0x9888 0xed16 0xa2d3 0x485b 0x89ac 0x0b44 0x1028 0xd78f 29 | Coins: HHHTHTTTTHTTHTTTHHHHTTTTTTTTHTTTTTTHHHTHTTTHHTHTHHHHHTHHHHHTTTHHT 30 | Rolls: 4 6 5 1 2 4 3 5 1 3 6 6 5 3 2 3 5 1 2 5 6 4 5 6 1 3 2 2 6 6 5 4 2 31 | --> rolling dice used 33 random numbers 32 | Cards: 4c 6c 5s 5h 3s Kd 6d Ac Jc As 5c 7d Qh 4d Ah 5d Qd 2d 9d Th 3c 8s 33 | 9c Td 6h Ts Kc 7c Qc Tc 2c 8d 7s 7h Jh 2h Qs Js 8c 9s 9h 8h 2s Ks 34 | 3d 3h 4h Kh Jd Ad 6s 4s 35 | 36 | Round 4: 37 | 16bit: 0xb560 0xc497 0xf27a 0x7b73 0x1c23 0x38f4 0xe221 0x10aa 0x030c 0x8ea3 38 | Again: 0x1c23 0x38f4 0xe221 0x10aa 0x030c 0x8ea3 0xf40f 0xc014 0x1fe2 0xa1c2 39 | Coins: TTHHTTTTTTHTTHTHHTTTHTTHHHHHHTTHHTHHTHTHTTHTTHTTHHHHTTHHHTTTTTHHH 40 | Rolls: 4 1 1 2 4 1 3 3 2 2 3 4 2 1 3 4 5 1 6 6 2 3 6 5 6 6 2 6 4 3 1 5 2 41 | --> rolling dice used 33 random numbers 42 | Cards: 2s Jd Kc Tc 9d Qs Js 8c 5h 3d 6c 8h 8d Td 4s 2c 2d Th Kd Ah 9s 5d 43 | 7c 7h 4d Qh 7d 6d Ac Ad 7s Jc Jh 3s 4c Ts 2h 9c 8s 3c 3h 6h 4h Kh 44 | As 5s Qc 9h Qd 5c 6s Ks 45 | 46 | Round 5: 47 | 16bit: 0xd3e8 0xe4e6 0xa68f 0xe732 0x7e4e 0xbd98 0x537b 0x0be1 0x720b 0x2087 48 | Again: 0x7e4e 0xbd98 0x537b 0x0be1 0x720b 0x2087 0x5534 0x84ba 0x94b4 0x30f1 49 | Coins: HTTHTTTTTHHTHHTTTTHTHTTTTHTTHHHTTTTHTHTTTHTHHTHHHTTTHHTTTTHHHTHTH 50 | Rolls: 5 5 2 6 4 2 3 4 6 3 5 3 2 3 2 6 2 3 4 4 3 4 6 1 1 1 1 3 6 6 1 3 3 51 | --> rolling dice used 33 random numbers 52 | Cards: 3d Ah 6c Ts 3h Kh 4s 9h 6s As 5c 7c 8h 9s Kd 6d Th Qs 7h Ad Qh Js 53 | 5h 9c Qd Jh 8s 7d 3c 9d 3s Ac 4h 2c 8c Td Tc 5s Qc Kc 4d 2h Jd 7s 54 | 2s Ks 5d Jc 8d 4c 6h 2d 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg16_oneseq_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg16_oneseq_once_insecure: 2 | - result: 16-bit unsigned int 3 | - period: 2^16 4 | - size: 2 bytes 5 | 6 | Round 1: 7 | 16bit: 0x7f90 0x7f82 0x54f7 0xe8c8 0x9444 0xba1a 0xb7fb 0x2167 0x39dd 0xb0f2 8 | Again: 0x9444 0xba1a 0xb7fb 0x2167 0x39dd 0xb0f2 0x71e2 0xa94c 0x05c4 0x8119 9 | Coins: THHHTTTHHHHHHTHHHTTTTTHHHHTHHTHHTTTTHTHTTHHHHTHTHTHTTHTHTHHTTHTHH 10 | Rolls: 1 1 1 6 4 2 5 2 3 5 6 5 1 2 5 2 2 5 3 2 5 4 4 3 5 4 3 5 3 2 3 4 4 11 | --> rolling dice used 33 random numbers 12 | Cards: 3s 5s 2h 9c 4d Qc Ks Ad 3h 8s 8d Td Ts 3d 4s As Js 8c 7c Qd Tc 5c 13 | Jd 6h Th Qh 4c 2c Ac 6s 9d 7s 3c Kc 9h Qs 7h 9s Jh 8h 2d 6c 7d Jc 14 | 5d Ah 6d Kh 4h Kd 2s 5h 15 | 16 | Round 2: 17 | 16bit: 0x19d4 0xadde 0xdce3 0xe222 0x7199 0xe4aa 0x9e56 0xe264 0x238e 0xe5b9 18 | Again: 0x7199 0xe4aa 0x9e56 0xe264 0x238e 0xe5b9 0x6d73 0x83e3 0x281e 0x91cc 19 | Coins: HTTHHTHTHTTHHHTHHHHHTHTHHTHTTTTTHHHHHHHHHHTTTTTTHTTHTHHHHTHTTTTHH 20 | Rolls: 4 3 1 1 5 3 5 5 4 1 3 1 1 1 4 3 2 2 4 1 5 3 1 6 4 6 4 6 6 2 5 2 6 21 | --> rolling dice used 33 random numbers 22 | Cards: 4s 8d Tc Kd 9h 7h Qc 4h 7c Kh 5d 4c 5h Kc 7s Ac Js Ts Ks Jd Th 8s 23 | 4d 3d 5s 8c 3c Jc Td 7d Ad 3h Qh 9d 2s 6h 6s 2h 2d 8h As 9c 6d Qd 24 | Ah 2c 3s 6c 5c 9s Qs Jh 25 | 26 | Round 3: 27 | 16bit: 0x0b43 0x96d8 0x6d84 0xfb69 0xfdbc 0x053b 0x64bc 0x145d 0xd617 0xaaed 28 | Again: 0xfdbc 0x053b 0x64bc 0x145d 0xd617 0xaaed 0x4438 0x09f3 0x90da 0x0ecc 29 | Coins: HTTTHTHHHTTTHTHHTHHHHTHTHHTHHTTHTTTHTTTHHHTTHHHHTTTTHHHTHTTHTHTTH 30 | Rolls: 2 3 3 5 3 4 6 2 2 3 4 6 5 2 1 2 3 1 4 1 3 4 1 6 4 2 2 6 3 3 5 6 2 31 | --> rolling dice used 33 random numbers 32 | Cards: 4c Jd 2s 2c 8s Td 3d Ac 9c 9d Th 6s Qd 4d 6d 7s 9s Jh 8h Kh 8d 7h 33 | 5h 3h 4h 7d Tc 2h Qc Qh Ts 7c 2d 5c 3c Jc Ks 5d As 9h Ad 8c Qs Ah 34 | 6h 3s 5s 6c Kc 4s Kd Js 35 | 36 | Round 4: 37 | 16bit: 0x8e36 0x32bf 0x52af 0x7420 0x6630 0x6d3b 0x9052 0xf56d 0xdc76 0x018d 38 | Again: 0x6630 0x6d3b 0x9052 0xf56d 0xdc76 0x018d 0xfdee 0xbb1e 0x9892 0xa779 39 | Coins: THHTTTTTHTTHHHTTTHHTHHTHTHTTHHHTHHTHTTTTHTTHTTHHHHHTHHTTHHTHHTHTT 40 | Rolls: 2 4 6 4 3 6 4 1 5 5 1 5 2 3 3 1 2 1 1 4 6 3 1 3 6 3 1 4 1 5 1 2 1 41 | --> rolling dice used 33 random numbers 42 | Cards: Td 6s Qh 3c Ts 7d Js 5h 3d 6h 7h Ac 9s Th 2d Ah 4d As 8h 8s 8c 4h 43 | 8d Jd 5s Kd 7s Tc Ks 6d Jh Jc 7c Qs 5d 9c 9h 5c 2h Kc 2s 3s 3h 6c 44 | Qc Qd 4c 4s Ad 2c 9d Kh 45 | 46 | Round 5: 47 | 16bit: 0x50cc 0xc1f3 0x63d4 0x436e 0xabb8 0x1983 0xe595 0x6424 0xf0f6 0x7a55 48 | Again: 0xabb8 0x1983 0xe595 0x6424 0xf0f6 0x7a55 0xf5d1 0xa53f 0x3e76 0x1bd5 49 | Coins: TTTHTHHTHTHTTTTHTTHTTHTTTHTTTTTTHHHHTTHHTTHTTHHHHHTTHHHTTTHTHTHHT 50 | Rolls: 1 1 6 1 1 1 4 4 2 4 6 1 6 2 4 1 2 6 2 2 5 6 2 4 2 6 1 1 1 6 5 6 1 51 | --> rolling dice used 33 random numbers 52 | Cards: Th 6c 2d 7s Ad 9d 8s 8c Jc Kc Jh 6s Qc Ac Tc 9c 4d 2s 3d 2h 4h 3c 53 | Qh 2c As 5d Qs 7h Kh Jd 4c 5c 8h 9s Qd 5h 9h Td 3h 5s Ks 3s Ts Ah 54 | 6h Js Kd 8d 7c 6d 4s 7d 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32.out: -------------------------------------------------------------------------------- 1 | pcg32: 2 | - result: 32-bit unsigned int 3 | - period: 2^64 (* 2^63 streams) 4 | - size: 16 bytes 5 | 6 | Round 1: 7 | 32bit: 0xa15c02b7 0x7b47f409 0xba1d3330 0x83d2f293 0xbfa4784b 0xcbed606e 8 | Again: 0xa15c02b7 0x7b47f409 0xba1d3330 0x83d2f293 0xbfa4784b 0xcbed606e 9 | Coins: HHTTTHTHHHTHTTTHHHHHTTTHHHTHTHTHTTHTTTHHHHHHTTTTHHTTTTTHTTTTTTTHT 10 | Rolls: 3 4 1 1 2 2 3 2 4 3 2 4 3 3 5 2 3 1 3 1 5 1 4 1 5 6 4 6 6 2 6 3 3 11 | --> rolling dice used 33 random numbers 12 | Cards: Qd Ks 6d 3s 3d 4c 3h Td Kc 5c Jh Kd Jd As 4s 4h Ad Th Ac Jc 7s Qs 13 | 2s 7h Kh 2d 6c Ah 4d Qh 9h 6s 5s 2c 9c Ts 8d 9s 3c 8c Js 5d 2h 6h 14 | 7d 8s 9d 5h 8h Qc 7c Tc 15 | 16 | Round 2: 17 | 32bit: 0x74ab93ad 0x1c1da000 0x494ff896 0x34462f2f 0xd308a3e5 0x0fa83bab 18 | Again: 0x74ab93ad 0x1c1da000 0x494ff896 0x34462f2f 0xd308a3e5 0x0fa83bab 19 | Coins: HHHHHHHHHHTHHHTHTHTHTHTTTTHHTTTHHTHHTHTTHHTTTHHHHHHTHTTHTHTTTTTTT 20 | Rolls: 5 1 1 3 3 2 4 5 3 2 2 6 4 3 2 4 2 4 3 2 3 6 3 2 3 4 2 4 1 1 5 4 4 21 | --> rolling dice used 33 random numbers 22 | Cards: 7d 2s 7h Td 8s 3c 3d Js 2d Tc 4h Qs 5c 9c Th 2c Jc Qd 9d Qc 7s 3s 23 | 5s 6h 4d Jh 4c Ac 4s 5h 5d Kc 8h 8d Jd 9s Ad 6s 6c Kd 2h 3h Kh Ts 24 | Qh 9h 6d As 7c Ks Ah 8c 25 | 26 | Round 3: 27 | 32bit: 0x39af5f9f 0x04196b18 0xc3c3eb28 0xc076c60c 0xc693e135 0xf8f63932 28 | Again: 0x39af5f9f 0x04196b18 0xc3c3eb28 0xc076c60c 0xc693e135 0xf8f63932 29 | Coins: HTTHHTTTTTHTTHHHTHTTHHTTHTHHTHTHTTTTHHTTTHHTHHTTHTTHHHTHHHTHTTTHT 30 | Rolls: 5 1 5 3 2 2 4 5 3 3 1 3 4 6 3 2 3 4 2 2 3 1 5 2 4 6 6 4 2 4 3 3 6 31 | --> rolling dice used 33 random numbers 32 | Cards: Kd Jh Kc Qh 4d Qc 4h 9d 3c Kh Qs 8h 5c Jd 7d 8d 3h 7c 8s 3s 2h Ks 33 | 9c 9h 2c 8c Ad 7s 4s 2s 5h 6s 4c Ah 7h 5s Ac 3d 5d Qd As Tc 6h 9s 34 | 2d 6c 6d Td Jc Ts Th Js 35 | 36 | Round 4: 37 | 32bit: 0x55ce6851 0x97a7726d 0x17e10815 0x58007d43 0x962fb148 0xb9bb55bd 38 | Again: 0x55ce6851 0x97a7726d 0x17e10815 0x58007d43 0x962fb148 0xb9bb55bd 39 | Coins: HHTHHTTTTHTHHHHHTTHHHTTTHHTHTHTHTHHTTHTHHHHHHTHHTHHTHHTTTTHHTHHTT 40 | Rolls: 6 6 3 2 3 4 2 6 4 2 6 3 2 3 5 5 3 4 4 6 6 2 6 5 4 4 6 1 6 1 3 6 5 41 | --> rolling dice used 33 random numbers 42 | Cards: Qd 8h 5d 8s 8d Ts 7h Th Qs Js 7s Kc 6h 5s 4d Ac Jd 7d 7c Td 2c 6s 43 | 5h 6d 3s Kd 9s Jh Kh As Ah 9h 3c Qh 9c 2d Tc 9d 2s 3d Ks 4h Qc Ad 44 | Jc 8c 2h 3h 4s 4c 5c 6c 45 | 46 | Round 5: 47 | 32bit: 0xfcef7cd6 0x1b488b5a 0xd0daf7ea 0x1d9a70f7 0x241a37cf 0x9a3857b7 48 | Again: 0xfcef7cd6 0x1b488b5a 0xd0daf7ea 0x1d9a70f7 0x241a37cf 0x9a3857b7 49 | Coins: HHHHTHHTTHTTHHHTTTHHTHTHTTTTHTTHTHTTTHHHTHTHTTHTTHTHHTHTHHHTHTHTT 50 | Rolls: 5 4 1 2 6 1 3 1 5 6 3 6 2 1 4 4 5 2 1 5 6 5 6 4 4 4 5 2 6 4 3 5 6 51 | --> rolling dice used 33 random numbers 52 | Cards: 4d 9s Qc 9h As Qs 7s 4c Kd 6h 6s 2c 8c 5d 7h 5h Jc 3s 7c Jh Js Ks 53 | Tc Jd Kc Th 3h Ts Qh Ad Td 3c Ah 2d 3d 5c Ac 8s 5s 9c 2h 6c 6d Kh 54 | Qd 8d 7d 2s 8h 4h 9d 4s 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_c1024.out: -------------------------------------------------------------------------------- 1 | pcg32_c1024: 2 | - result: 32-bit unsigned int 3 | - period: 2^32832 (* 2^63 streams) 4 | - size: 4112 bytes 5 | 6 | Round 1: 7 | 32bit: 0x9f2e1932 0x778f59b0 0x288e298c 0x7c86f454 0x5380867e 0xbc1ebfef 8 | Coins: TTTTHTHTTHTTHHTTTTTTHHTHHHTTTHHHHHHTTTHHTTHHHTTTTTTHHHTHTTTTHTHHT 9 | Rolls: 3 6 4 1 6 2 2 3 4 3 1 3 4 3 3 2 6 1 1 3 3 6 3 4 5 6 3 4 4 3 2 6 6 10 | Cards: 8d 3c 8c Kh 5d 6s 6h Th 7s Ad 9s 3h 9h 9c 7h 5s Qd As Jc 8s 2h 6c 11 | Ah 5c Qh Kd Ts 7d Qs 8h 4h 4s Jd 3s Ac 5h Qc 2s 3d 7c 6d 9d 2c Js 12 | Td Kc 2d Ks Jh 4c 4d Tc 13 | 14 | Round 2: 15 | 32bit: 0x566843ac 0x905997f7 0x5b238391 0x66aed7fc 0xba6c7310 0x977fc9df 16 | Coins: TTHTTTTHHTTHTHHTHTHTTTHHHHTHHHHTTHHHHTHTTTTTHHHHHHHTHHHTTHTTHTTHH 17 | Rolls: 3 6 5 6 3 3 3 5 2 2 3 2 6 2 1 5 5 4 4 3 3 3 1 3 4 5 1 4 5 6 4 4 1 18 | Cards: 2h As 2c Qh 7d 5s Jc 6s 7h Kh 9s 4h 3s 2d 6h Qc Kc 8c Ah Tc 4c 7c 19 | Ad 3c 7s 9c 3d 2s 5d 6c Qd 6d Jd 5h 9h 5c 8d Ks 8h 4s Ts Jh Th 8s 20 | Js 4d Ac Td Qs Kd 3h 9d 21 | 22 | Round 3: 23 | 32bit: 0xddea7331 0x79f2e4e5 0x60cc53a2 0xa5c5ccc5 0x3e3053ad 0x1434a470 24 | Coins: TTTTTTTHHTHHHTHHTHHHTTTTHHTTHHHHTTTHTTTHTTHTHHHTHTHHTHTTHHTHTTTTT 25 | Rolls: 5 6 1 5 3 2 4 1 4 3 4 2 4 2 2 2 5 6 6 3 5 4 3 4 2 1 3 1 1 1 3 2 2 26 | Cards: 4s Kh 6c Qc 5s Jc 3d 2s 6h 7s Th 3s 5d Ts Ks 9c Jd 5c Qh Ah 8s Td 27 | 7h Ac As 9s 2d 2c Ad 9h Qs 2h 8c 4h 6s 8h 5h 7d 3c Jh 9d Qd 7c 6d 28 | Kd 8d Tc Js Kc 3h 4d 4c 29 | 30 | Round 4: 31 | 32bit: 0x37d70079 0x274cad70 0xbcab1ee3 0x423840d4 0xf1becf52 0x26cfcace 32 | Coins: HTHTHHTTHHTHHTHHTHTHHTTHTTTHTHHTHTTTHTTTHTHHTTTTTTTTHTHHHHTTHTHTT 33 | Rolls: 5 5 5 2 1 1 1 2 2 1 3 2 5 5 3 1 6 5 5 2 3 4 6 1 4 4 5 3 1 5 6 5 4 34 | Cards: Jh 8d 3s 5c 5d Ac 3c Kd 4s Jd Tc Qs Qd Js 8h 9h Th Kh Ts 7d Td 7h 35 | 9c Kc 2s 7c 9d 6s 6d Qc 4d 3d 4c 3h Ad Ks 7s Jc 2d 2c 5s Qh 6c 4h 36 | 8c Ah 6h 5h 9s 8s As 2h 37 | 38 | Round 5: 39 | 32bit: 0x85d178c2 0xc263a20b 0x232a5ea9 0xaf7570ce 0x2e0b0f69 0x11823de5 40 | Coins: TTTHTHHHTTHTTHHHTHTTHHTTTHHTTHTTTHTTHHTTHTTTHTTHTTHHTHTHHHHTTTTTH 41 | Rolls: 1 5 2 1 4 3 3 6 1 5 6 1 5 5 4 4 1 6 2 3 6 1 3 5 5 3 2 2 5 3 6 4 4 42 | Cards: 3d 8c 2d 2s As 4s 4c Tc Kc 7c Jd 5s 3c 2h 7h 6c 8s 5c Ah 6h Jc 7d 43 | Qs Ac 9c 2c 6s Th Kd Jh 9d 8h Js Td Kh Ad 3s 4h 9s 4d 9h Qc Qh Ks 44 | Qd Ts 5d 3h 7s 8d 6d 5h 45 | 46 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_c1024_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_c1024_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^32832 4 | - size: 4104 bytes 5 | 6 | Round 1: 7 | 32bit: 0x1e355225 0xe4a06497 0xbb5f3b7b 0x5eae6c11 0xbe34aa20 0xcbd73863 8 | Coins: THTTHHHTTTHTHTTHHHTTHHHTHHTHTHTTTHHHTHHTHTTTHHHHTTTHHHHTTTTTHTTTT 9 | Rolls: 1 5 1 5 1 4 2 3 2 4 3 3 6 1 1 6 6 5 5 4 4 3 2 3 2 2 6 4 5 4 4 1 2 10 | Cards: 7c Ac Jc Qd 5c 5h Kh 8d 2h Js 5d Ts Qs 3d 4c 6c 9c 8s 7h 7s Qc As 11 | 9d 8h 6s Ks Kc 3s 4d 2c 4s Qh Kd 5s 3c Th Ah 2d Td Jd Ad 8c 2s 4h 12 | Tc 9s 6h Jh 7d 9h 3h 6d 13 | 14 | Round 2: 15 | 32bit: 0x2a0995a5 0x33960b87 0x44137706 0x1c4df60f 0x03788d7f 0x20a26cfa 16 | Coins: HHTTTTTTTHHHHHTHHTHHHTHHTTTTTTHHHTHTTTTHHTHHHTHHTHHHTHTTTHHTHHTHH 17 | Rolls: 5 5 6 1 2 6 5 3 3 6 4 5 4 5 4 4 6 2 5 5 1 6 2 5 5 5 1 5 2 5 6 4 3 18 | Cards: Qc 4s 6c 6d Qd 2h Ts 2s Qs 7h Ad 3h 5c 4c Kd 6s 2d 4d Jh Ac 7d 3s 19 | 8h 5s 9h 8s Ah 8d 9d Td Tc Ks 8c Js 3c Kc 7c 6h 2c 9s 5d 7s Qh Th 20 | 4h 3d Jd 9c Kh 5h Jc As 21 | 22 | Round 3: 23 | 32bit: 0x163fedf6 0xf81a02e1 0x5337b072 0xb1089395 0xcb17724c 0xd19f73d1 24 | Coins: HHHHHTTHHHHHTTTTHHTHHHTTTHHHTTTHHHHHHHTHTTHHHTHHHHTHTTTHTHTHTTTTT 25 | Rolls: 4 4 3 5 3 2 6 2 3 3 6 1 6 2 2 2 5 5 6 1 2 5 1 4 1 1 3 4 6 6 6 6 4 26 | Cards: 2c Jd 8c Kh 2d Qh Jc 7c Ah 7d Qd 3h 8h Td 5h 8s 6c 9s Th Qs 6h Tc 27 | Qc Ts 8d 2s Jh Kd 3d 5d 3s Js Ad 6d 5c 2h Ks 9h 7s 3c 9d 5s 6s 4h 28 | 4d Kc 4s As Ac 7h 9c 4c 29 | 30 | Round 4: 31 | 32bit: 0x4ca9b37f 0x5f024b85 0x6dfb8620 0xbf0d2c53 0x1408579f 0xf8915f8b 32 | Coins: HTTHHTTHTHTHTTTHHTTHTTHTHHHHTTTTHHTHHTHHHHHTTHTHTHHHHTTHTHHTHHTTH 33 | Rolls: 1 6 2 4 4 5 6 3 1 3 5 2 4 3 4 4 6 6 5 2 3 3 2 2 4 1 6 4 5 2 5 5 2 34 | Cards: Jc 4h 8c 3c 5c 7d 4c 2c Ad Kh Ah 3h 2d Qs 7h Qh Qc Ks 7s 4d Th Ts 35 | 4s Td Kd 6c 6s 2s 9h 9s Tc 8d 8s 6h Jd Js As 7c 2h Jh Qd 9c Kc 3s 36 | 6d 5h Ac 8h 5s 3d 5d 9d 37 | 38 | Round 5: 39 | 32bit: 0x242c363b 0x1fa88c24 0xd3dc68bb 0xc935d193 0xce165b29 0x5cbafaf4 40 | Coins: TTHHTTHTHHHHTHHTTHTTTTHHTHHTTTTTHTTHTHHTHHTHHTHTTHTTHTHHTTHTTHTTT 41 | Rolls: 5 6 1 2 5 2 4 6 3 5 3 4 1 4 2 4 5 3 2 3 6 4 4 6 1 6 2 3 2 2 3 3 5 42 | Cards: Jd 7c Ad Kc 4h 5d 7d 8d 6d Th 7h 9s Ac 5h 4d Tc 9h Kh As 9c Qs 3c 43 | 3h 3s Jc 2h Js Ts 8h 8c 9d Td 2c Ks Jh 6s 2s 4c 6c Kd 7s 4s 2d 8s 44 | 5c Ah 6h 3d Qc Qh Qd 5s 45 | 46 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_c64.out: -------------------------------------------------------------------------------- 1 | pcg32_c64: 2 | - result: 32-bit unsigned int 3 | - period: 2^2112 (* 2^63 streams) 4 | - size: 272 bytes 5 | 6 | Round 1: 7 | 32bit: 0x020b2353 0x7a157379 0xada83160 0x2953c47e 0x77c0190d 0x3f19bcb1 8 | Coins: TTTHHHHTTHHTHHHHTHHHHHTHTTHTTHTTHHTHTTTTTHHTTHHTHHHHHTHTTHHTHTHTT 9 | Rolls: 4 3 2 1 6 2 3 6 2 2 3 6 3 6 2 1 4 4 2 1 4 5 1 4 6 2 4 1 2 5 6 2 4 10 | Cards: Qc Jh 9c 5c 7s Kh 2c Ts 8h Ks Ad 5h Th Qs 4h 6d 2s Qh Js 6c 7c 5s 11 | 8c Ac 2d 8d 9d Kc 3h 4c 9s 9h Kd 3s 6h 5d Td Ah As Qd 3d 4s 8s Jd 12 | 2h Tc 6s 7d 3c Jc 4d 7h 13 | 14 | Round 2: 15 | 32bit: 0x24751219 0x62509dfc 0xad1edbf0 0x8358d34a 0x281bfe2a 0x6fb4e17d 16 | Coins: HHTHTHTHTHHHHTHTTHTTHHTTHHTTTHHTHHHHTTHHTTTHTTHHHHHTHHHHHHTTTHTTT 17 | Rolls: 6 1 5 3 1 3 4 6 3 3 3 2 6 1 3 1 3 6 5 2 4 2 3 6 6 3 4 3 4 4 6 5 3 18 | Cards: 6c Jc Qh 7c Qd 5d 6s Ks Ts 5h 6d 2s 5c Kh 4d 8h As 9h 9s 2d Qc Jh 19 | Ah 8s Td 7s 2c Ad Qs 9c 2h Kd Kc 8d 5s Tc 4c Js 6h Th 8c 7d Jd 3h 20 | 3d 7h 3c 9d 4h 4s 3s Ac 21 | 22 | Round 3: 23 | 32bit: 0xaefc5f6a 0x8837288e 0x99485a39 0x6b33e8ec 0x3b0d9da8 0xa22e1914 24 | Coins: HTTHTHHTTHHTHHHTHHTHTHTTHTHTTTTHHTHHTHHHHHHHHHHHTHHTHHHTTTTTTTHHT 25 | Rolls: 2 4 6 4 2 6 2 3 2 5 1 4 3 5 6 5 6 1 3 2 4 6 4 6 2 3 3 3 3 3 4 6 1 26 | Cards: 7s 3c Ad Jh 7d Qs As 2d 4d 9d Kc 8h 9s 3s 2c 8c 5c 6h Jd Ah 9h Th 27 | Qh Tc 6c Js Kd 2h 4s 7h 6s 8s 5d Td Qc 4c Kh Qd Ks 5s Ts 8d Jc 2s 28 | 4h 6d Ac 7c 9c 3d 3h 5h 29 | 30 | Round 4: 31 | 32bit: 0x910a66f1 0xfaea9f3a 0x1fb82293 0x4842083e 0xe10fbb53 0x9f265bdf 32 | Coins: HHTTHHTHHHHHHTHHHHHTTHHTTHHTHTTTHHTHTHHHHHHTHHTTHHTHTTHHHHTTTHHTT 33 | Rolls: 1 3 2 6 4 3 2 4 4 3 6 5 1 5 4 3 2 4 2 1 2 3 2 5 5 3 6 2 6 2 6 1 1 34 | Cards: 5d 3s Ac Kd Qc Qs 4s 6s Ks 8h 3c Jc Th Ad 5h 9s 9c 5c 2s 9d 7h 4d 35 | 2d Ah Tc 2c 4h 5s 9h Jd Td Ts Kh 6c 7c Qh 7d As 7s 3h 6d 8c Qd Kc 36 | 3d 6h 8s 2h Js 4c Jh 8d 37 | 38 | Round 5: 39 | 32bit: 0xd8fe156d 0xeee08bf3 0x6e5beff9 0x1defb7b7 0xbc64b375 0x11e75f12 40 | Coins: HHHHHTTTHTTHTHHHHHHHHHHHTHHTTTHHTHTTHHTHTHTHHTTHHTTTTTTHHHHHTTTTH 41 | Rolls: 5 1 5 5 6 1 3 6 1 4 6 4 2 4 1 3 3 5 3 2 4 6 2 2 3 4 6 3 6 4 5 3 2 42 | Cards: 7d 3s 2d Ac 9s 9d Qh Jh 5c 4c 6h 9c 9h 5h Td 5s 7h Jc 4d 6s 3d Js 43 | 4s 7c 2h 8s Qd 6c 8d 7s Kc Qc Jd Ks 8h Qs 5d 2s Kd Ah Ad 4h 3c Tc 44 | 6d 2c Kh Th 3h Ts 8c As 45 | 46 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_c64_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_c64_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^2110 4 | - size: 264 bytes 5 | 6 | Round 1: 7 | 32bit: 0x24b21aff 0x7d390e28 0x82e2dfab 0x0a2ae49e 0x3b9b07d7 0xd6c66bd1 8 | Coins: HTTTHHTHTHTTHHTHHHHHHHTHHHHTHTHHHTTHHHTTHHTHTHTHHHHTHHHHHHTTHHTHH 9 | Rolls: 5 5 3 6 1 3 2 3 6 6 5 1 3 4 2 5 5 3 1 4 3 2 1 5 2 3 5 6 6 5 4 6 3 10 | Cards: Qc 6h 2h 8c Tc 5c Ac 7h Ts 5d Jd 8h 3s Th 9s 9h Ad 2d Kd Jh 7c 4h 11 | 4c 9c 8s 6c Kh 6d Ks 4s 2c 3d Td Kc Qs 8d 7s 5s 3c 9d Ah 7d 2s Qd 12 | Jc 3h As 6s Qh 4d Js 5h 13 | 14 | Round 2: 15 | 32bit: 0x33668329 0x05512f11 0x86b4a881 0xe69e1d73 0x078ed3c7 0xd05cee1e 16 | Coins: HTHTTTHHTTTHTTHHTHHHHHHTTHHHTHHHHHHHTTHHHTTTHHHHHTTHTHHHTHTTTTTTH 17 | Rolls: 1 1 5 3 5 6 6 4 1 4 4 1 1 4 5 2 2 2 4 1 4 6 5 1 4 2 4 6 3 5 2 4 3 18 | Cards: Ad 3d Kc Tc 6c 3c Ts Qd Qh 6d Jd Ks Td 8s 4h Jh As 5d Th 3s Kh 9d 19 | Ac 7s 6h 9c 8h 2h 2s 4c 7d 5c 5h Ah 6s Js 9s Qs 2d 4d 8c 9h 4s 7h 20 | 8d 3h 7c Qc 2c Jc Kd 5s 21 | 22 | Round 3: 23 | 32bit: 0x0ef168f2 0x0e0f90fe 0x34f4889d 0x78274f67 0xee43a56f 0x966c625a 24 | Coins: HHHTTTHHHHTHHHHHTHHHHTHHHTTTTTTTHTHHHTTTHHTHTHTTTTTHHTHHTHTHTTHHH 25 | Rolls: 4 4 2 2 1 1 5 1 3 3 1 2 2 4 2 5 1 4 4 3 5 2 3 2 4 5 1 1 1 6 6 6 4 26 | Cards: Qs 8s 2d Qd 8c 6c Kh Ts Ah 4h 3d 3c 5h Qc 3s 4d Kd Ks 6s 3h Kc Jc 27 | Td Jh 7c Qh Ad 4c 9s 8h 6d 7d Jd 7h 7s 5c Ac 2s 4s 9d 9h 2c 2h 6h 28 | As 8d Js 5d 5s 9c Th Tc 29 | 30 | Round 4: 31 | 32bit: 0xeb88b9b7 0x6877b6d1 0xe4689557 0x8e7a0f18 0x1f111185 0x1c862358 32 | Coins: HHTTHHHTHHHTTTTTHHTTHTTTHTTHTTTTHTHHHTHTTTHHHHTHHTTTTTTTHHHTHHTTH 33 | Rolls: 1 1 2 4 2 1 4 1 5 1 4 1 5 5 6 3 6 4 4 3 6 6 1 5 2 5 1 1 6 4 5 1 4 34 | Cards: Kc 7c 4s 6s Js 3d 8c 2d 9s 5c 6c 6d Qc Qd 2h 2c Tc 7s 2s 5h 5d 9h 35 | Jd Jc 3s Qs 7h 8h Td Ts Qh Kd 4c 7d 8s 3c 6h Ah Ad 4h 9d Th 9c As 36 | 8d 3h 5s Jh Ks 4d Kh Ac 37 | 38 | Round 5: 39 | 32bit: 0x92c5be80 0xf87ee090 0x9d648d40 0xf7de421a 0xba013d74 0xdb8c6381 40 | Coins: TTTTTTHHHTHTTTTTHHTTTHTTTTHTHHHTTTHHTHTHHHHTHTTTTHTTTHHHTTTHHTTHT 41 | Rolls: 1 6 1 2 5 4 3 5 5 2 4 4 5 5 2 1 1 2 2 1 3 5 1 6 2 6 3 3 5 6 4 1 6 42 | Cards: 5s 3h 5c Td Ah 7c 3d Tc 7h 6d 5h Th 4h Qc 9s 6c 6h Jc 4d Ts 8c 9h 43 | 9d 2d Js Jh 9c 8s Ad 2s 4s 8h 4c 7d 2c Ac 8d Jd 5d Kd As Qs 3c 2h 44 | Qh Ks Qd 3s 6s Kh 7s Kc 45 | 46 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_c64_oneseq.out: -------------------------------------------------------------------------------- 1 | pcg32_c64_oneseq: 2 | - result: 32-bit unsigned int 3 | - period: 2^2112 4 | - size: 264 bytes 5 | 6 | Round 1: 7 | 32bit: 0x77b22db0 0xc0d701de 0xa73ff12e 0x7bec2cfc 0x94682a9d 0x493de263 8 | Coins: TTHTTHHTTTTHHTHHTHTHTHTTHHHHTTTHTHHHHTHTTHHTTHHTHTHTHHHHHTTTHHTHH 9 | Rolls: 6 4 6 6 6 2 3 3 3 2 3 1 1 1 4 2 3 6 4 3 5 3 1 6 2 1 5 3 1 5 4 4 5 10 | Cards: Kc 2d 9h 2s 7d 5c Td 6h 9c Th 5s 8h 3s 3h Jc 4d Qc 4h Ac Js 6s Kd 11 | 4c 9s 9d 8d 8c Kh Qh Jh 6d Ts 7s 8s 2c 2h Tc Ad 5h 3c 7h As Qd 5d 12 | Jd 3d 4s 6c Ks 7c Ah Qs 13 | 14 | Round 2: 15 | 32bit: 0x4c0edc92 0x07406631 0x62de4826 0x27621708 0xf3fe1e49 0x812b2e17 16 | Coins: THHHHHHHHHTTTHTHTTTTHTTTHTHHTTTTTTTHHTTHTTHHTHTHHTTTTTTTTTHTTHTHH 17 | Rolls: 2 5 4 2 6 6 1 6 4 1 4 2 3 1 2 2 2 3 3 6 6 1 2 1 2 1 3 4 2 6 2 6 2 18 | Cards: Tc 4c Qs Td Ac Qh 7c 5d Ts 9s 2c 8d Ah Jd Th 5s 9c As 6d 8h 8s 3h 19 | 6h 9d 7d 5c 7h 3s 6s Kc Jc 8c Ks Qd Qc 3c 4d 4h 5h Jh 2s 2h 7s Kd 20 | 9h Js 2d 3d Kh Ad 6c 4s 21 | 22 | Round 3: 23 | 32bit: 0xe761bbf8 0x7993beb4 0xaff5e793 0x391ebef8 0xa4397fba 0xfba6ecaa 24 | Coins: TTHHTHTHTHTTHHTTHHTTHHTHHTHTHTHHTHHHHTTHHHTTTTTTHTHHHTTHTTTTHHHHT 25 | Rolls: 2 1 4 4 2 4 2 3 6 2 3 1 5 5 1 4 1 6 6 6 1 4 6 5 1 1 6 2 5 5 6 3 3 26 | Cards: 9h 8h 9c Tc 2d 3h Kh Jd As 7d Qc Ts 3s 7s Ks 5d 3d Kd Jh 7h 8c 4h 27 | 5s Jc 6h 2h Ac Qh Ad 2s 2c Th 7c 8d 6s 6c 9d Kc 8s 9s 5h Ah Td 4d 28 | Js Qs 4c 6d Qd 4s 3c 5c 29 | 30 | Round 4: 31 | 32bit: 0x32a474ca 0x33a6179f 0x9184ae8c 0x9277ff8a 0xfc81ddca 0x844a798f 32 | Coins: THTTTTTHTTHHHTHHTTTHTHHHTHHHTTTHHTHHHTHTTHHHHHHHHHTHHTHHTHHTTHTTH 33 | Rolls: 1 4 5 2 4 5 1 4 5 6 5 3 2 6 2 3 3 1 6 1 3 2 4 4 4 6 6 2 2 1 4 5 4 34 | Cards: 5s Js 2c 2h 5h Tc Kh 8h 2s 2d 8c Kd 8s As Qs 3d Th 5d Qd Ac Td 4c 35 | 4h Jh 8d Qc 5c 6c 9s 4s Ks 9d 3c Ts 7d 9h 3s 3h 6d 6h Jc 4d 7c Kc 36 | Qh Jd Ad 9c 6s 7s 7h Ah 37 | 38 | Round 5: 39 | 32bit: 0xb8af4d5e 0x3b843775 0xa811b5aa 0xcd63ad11 0xa26b78e2 0x6c6704ec 40 | Coins: TTTHTHTTHHTTTHTTTTTTHTTHTHTTHTHTTTHHTTHHTHTHHHHTHHHHHTTTHTHTTHHTH 41 | Rolls: 6 5 2 1 4 5 2 3 5 4 4 3 5 2 5 5 1 4 2 3 2 3 5 4 2 4 1 1 3 5 3 4 6 42 | Cards: Ah 3s Th Ks 4d 2d 2s Qh 3c 6d 7s 3h 5d 6h Ts 8c Jc Jd 2c Jh 6s Kd 43 | 8h Qc 9s 3d Ac 7c 4s 2h Ad 5s Qd Qs 4h 7h 5h 5c Td 9h Kc Tc Kh 6c 44 | 4c Js 9c 8s 9d As 7d 8d 45 | 46 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^62 4 | - size: 8 bytes 5 | 6 | Round 1: 7 | 32bit: 0x00000000 0x5c400ccc 0x03a8459e 0x9bdb59c5 0xf1c9dcf5 0xaac0af3b 8 | Again: 0x00000000 0x5c400ccc 0x03a8459e 0x9bdb59c5 0xf1c9dcf5 0xaac0af3b 9 | Coins: HTHHTHHTTHTHHHTTTTTHHTTTTHTHTHTTHTTHHHHTHHTTTHHTTTTHTTTTHHHTHTHHT 10 | Rolls: 1 3 1 4 3 1 4 3 5 1 5 1 6 3 4 6 2 3 3 5 5 2 5 6 5 3 2 4 2 3 1 1 3 11 | --> rolling dice used 33 random numbers 12 | Cards: 2s 8d 7s 9h Ad Qc Jh 5s 3d 3s 7c Qs Kh Ts 3h Ac 5c 9d 6s 4c 8h 2d 13 | Kc 6c 9c 8c 6d 5d As 2h 7h Th Td Js Jd 3c 5h 7d Ah Qd 4d 2c Ks 4s 14 | 9s Jc 6h 8s 4h Kd Tc Qh 15 | 16 | Round 2: 17 | 32bit: 0x9d4c8720 0x888c050e 0x20a18d88 0x9af6f5ac 0xe9e08d16 0x30dc8422 18 | Again: 0x9d4c8720 0x888c050e 0x20a18d88 0x9af6f5ac 0xe9e08d16 0x30dc8422 19 | Coins: HTHHHTTTHHHTTHHTTTTTHHHHHHHHHTTHHHHHHTTHHTTTHHTTTHHHTTTHHTHHTHTHH 20 | Rolls: 1 6 5 2 2 4 3 6 3 6 4 2 4 3 4 6 6 3 4 4 5 6 4 4 5 4 6 2 1 2 6 2 3 21 | --> rolling dice used 33 random numbers 22 | Cards: 8c 3c 5h 2d 4s 7d 4h 5c Kh 5s 3s Kd 9h 6h Th 7h 8d 8h Qs Ks Tc Qh 23 | Qd Ac 9d Jd Td 6d Ts 8s Js Jh 6c 7c 6s 2c Kc 2h 4d 9c 3h Ah Qc 4c 24 | 5d 7s Jc 9s As 2s Ad 3d 25 | 26 | Round 3: 27 | 32bit: 0xd9561348 0xc5f085ff 0x55b15d21 0xb00d4c13 0x1ad51817 0xb1687c92 28 | Again: 0xd9561348 0xc5f085ff 0x55b15d21 0xb00d4c13 0x1ad51817 0xb1687c92 29 | Coins: THTHHHTTTHTHHTHTHTTTTHHTTTTHHHTHTTTTTHHTHTHHHHHTTTHTTTTHTTHTTHTHT 30 | Rolls: 5 3 4 1 4 1 5 5 3 1 2 5 4 1 1 6 2 2 1 2 2 2 4 6 3 6 2 4 6 5 2 5 1 31 | --> rolling dice used 33 random numbers 32 | Cards: 7d 5h As 8c Qh 6d Ts Qd Ah 6c 7c 9c 8d 9h 4s 4c 3d 4d Ad Ks Td 3s 33 | 3c Kd 8h Kc Jd Kh Th Qs Jh 8s 2c 7s Jc 2h 6h 9d 2d 9s Ac 2s Qc 5s 34 | Js 5d Tc 5c 4h 3h 6s 7h 35 | 36 | Round 4: 37 | 32bit: 0xb00d4873 0x97e247d1 0x3aed3e74 0xa6f02f6a 0x007428ae 0x88fb2312 38 | Again: 0xb00d4873 0x97e247d1 0x3aed3e74 0xa6f02f6a 0x007428ae 0x88fb2312 39 | Coins: HTTHTHTTTHHTHHTTHHTTHTHHTTTHTHTHHHTHTHTTTHHHHTHHTHHHHTTHHHHTHHHHT 40 | Rolls: 2 5 2 5 3 4 5 6 4 3 3 3 2 2 2 3 3 3 2 6 1 2 1 3 5 4 6 6 6 3 4 5 1 41 | --> rolling dice used 33 random numbers 42 | Cards: 4s Qc 2s 4h Kh 6d Ts 9s 2c Ks 5h Jc 2h Ac Qs Jd 8d 2d 7s 3c 8c 6c 43 | Kd Kc 7h 4c 9h 3h 5s Ah 8h 7c Td 3d 6h 5d Tc Qh 3s 4d 9c Ad Qd 9d 44 | 8s Jh 7d 5c As Js Th 6s 45 | 46 | Round 5: 47 | 32bit: 0x9b08b727 0x4b6859af 0x06de6f08 0x628f4193 0x39397e2d 0x9e8304d1 48 | Again: 0x9b08b727 0x4b6859af 0x06de6f08 0x628f4193 0x39397e2d 0x9e8304d1 49 | Coins: THTHHTTTTHTTHHHTHTHTHTHHTTTHHHHTHHHTTTHHTHTHHTHTHTTTTTHHHHHHTTTHT 50 | Rolls: 6 1 4 1 3 4 5 6 5 1 2 6 3 3 6 4 6 5 2 1 3 6 3 3 1 5 5 3 6 2 2 2 2 51 | --> rolling dice used 33 random numbers 52 | Cards: 4c 2h Qh 6d 6h 8h 5s Qd 6c 7d Ac 5h 8s Ad 4d 9s 2c Tc Js 3d Th Ah 53 | Jd 5d 3h 4s Ts Kc 6s 8d 8c 2d Kh 7h 9c Qc 3c Td As 7c Kd 2s 9d Ks 54 | Jh Jc 5c 4h 3s Qs 9h 7s 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k1024.out: -------------------------------------------------------------------------------- 1 | pcg32_k1024: 2 | - result: 32-bit unsigned int 3 | - period: 2^32832 (* 2^63 streams) 4 | - size: 4112 bytes 5 | 6 | Round 1: 7 | 32bit: 0x35101047 0x038b320a 0x2d64ba34 0x5358b5f9 0x94ec4dae 0x1018b3a1 8 | Again: 0x35101047 0x038b320a 0x2d64ba34 0x5358b5f9 0x94ec4dae 0x1018b3a1 9 | Coins: HTHHHTTHTHHTTTTTTTHHTTHTHHHHHHTTHHHTHHTTTTHHTTHTHTHTTTTTTHTHHHHTT 10 | Rolls: 3 5 4 6 6 2 1 2 2 4 4 6 5 2 2 4 3 6 1 1 4 1 4 5 1 3 5 2 1 4 4 6 4 11 | --> rolling dice used 33 random numbers 12 | Cards: Ad 4c 6s Tc Qh 7c Kd Td 5d Jc 9d 2s 4d Kc 9c Ks 8c Jh 6h 3s 3d 3c 13 | 5s Th 5h Ac 7h 2d Ah 6d 5c Ts Qc 8h 2c 6c 4h Qd 7s 8s Js 9s 4s 9h 14 | 2h Kh As 7d Jd 3h Qs 8d 15 | 16 | Round 2: 17 | 32bit: 0x86bbb4b0 0x521c7b58 0x9f04cb6d 0x99fa2db5 0x0fedab13 0x3784e5f2 18 | Again: 0x86bbb4b0 0x521c7b58 0x9f04cb6d 0x99fa2db5 0x0fedab13 0x3784e5f2 19 | Coins: THHHTTHHHHHHHHTTHTHHHHHTHTHHHHHTHTTTTTHHTHTHTTTHTTTHHHTHHHHHTHHHH 20 | Rolls: 1 1 3 2 3 6 2 6 4 2 4 2 3 1 1 4 5 6 2 2 6 4 1 1 4 3 3 5 5 3 5 2 3 21 | --> rolling dice used 33 random numbers 22 | Cards: 6h 4h 4s 7h 4c 2d 6c 7s Kc Js Ah 8h Kd Ts Jh Ks 3s 9d 3h 6s 4d Qs 23 | Jc 6d 9s Td 3d Jd 5s Qc 2c 8c 3c 5h Tc 7d Ad 2h 5d 9c 2s 9h As Th 24 | 8s Ac 7c Qd 5c 8d Kh Qh 25 | 26 | Round 3: 27 | 32bit: 0xf7229861 0xc4197aed 0xf047bd79 0xed006f07 0xa6c671c8 0xd53e3104 28 | Again: 0xf7229861 0xc4197aed 0xf047bd79 0xed006f07 0xa6c671c8 0xd53e3104 29 | Coins: HHHHTHHTTHHTTHTTHHHTHHHTTTHTTTHTHTHTHHTTTTTTHHHHHHTTTTTTTHTHHTHTT 30 | Rolls: 1 5 1 1 1 2 6 2 4 4 4 5 5 2 1 3 3 4 4 5 1 3 2 4 1 1 4 6 6 1 6 6 1 31 | --> rolling dice used 33 random numbers 32 | Cards: 8c Ac 6d Jc 2d Kh Jd Qs Ks 6c Jh 3d 4s 5h Js Qc 2c 5c Ad 7d Kc 9h 33 | 3s 8d 6s 2s Kd Qd 6h Ts 2h As 7h 9d 3c 4h 5s Td Ah 4d 8s Tc 4c 5d 34 | Th 3h Qh 9s 8h 9c 7s 7c 35 | 36 | Round 4: 37 | 32bit: 0x1e8c0c96 0x1e36c8b8 0x390dfe9c 0x2eefcb94 0xdc38c0ef 0xabf50bb7 38 | Again: 0x1e8c0c96 0x1e36c8b8 0x390dfe9c 0x2eefcb94 0xdc38c0ef 0xabf50bb7 39 | Coins: HHTTHTHTTTHHHHHHHTHTTHTHTHHTHHHHHHHHHTHTTTTTHTHHTHHHTTHHTTTTTHTTH 40 | Rolls: 3 6 6 4 4 6 2 2 3 1 2 6 2 6 6 3 3 3 4 2 6 1 6 1 1 5 6 5 4 4 5 6 1 41 | --> rolling dice used 33 random numbers 42 | Cards: 7s 7h 7c 3d 4s 5d Th 7d Qc 3c Qs 5c Tc 5h Js 6h 6c 8c 2d 5s 9c 3s 43 | 4h Qd 4c 6d Qh Td Kc 2s Ac Kd 4d Jd Kh Jc 2c As Ah 8h 9s 3h 8s 2h 44 | Jh 6s Ts 9d 8d Ad Ks 9h 45 | 46 | Round 5: 47 | 32bit: 0xaaab00d6 0x85f97565 0x45080fa4 0xb2568821 0x061724af 0xd520c0df 48 | Again: 0xaaab00d6 0x85f97565 0x45080fa4 0xb2568821 0x061724af 0xd520c0df 49 | Coins: THHHHTHTHHTTHHHTTTHHHHTHHHTTTTTTTHHTTHTTHTTHTHTHTHTHHHHTTTTTHTHHH 50 | Rolls: 2 3 2 1 6 2 5 1 3 1 3 5 2 2 5 6 5 5 6 1 4 4 4 3 5 3 1 4 5 4 6 4 3 51 | --> rolling dice used 33 random numbers 52 | Cards: 6h 8s Kc As 7d Qc 5c 7h 6d 2h Tc Qd 3c Td 9s 7c Ad Ts 8d Ac Kd Js 53 | Qs 4d 4h Ks 4s 4c 9h Qh 5s 8c 9c 6c 6s 5h Jc 3h 2d 3s 3d Jd Ah Th 54 | 5d Kh 9d 2c 2s Jh 8h 7s 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k1024_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_k1024_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^32832 4 | - size: 4104 bytes 5 | 6 | Round 1: 7 | 32bit: 0xc7221d08 0xff86f771 0x75f34ec3 0xa7a2023a 0x125ae5e7 0xb5ca5bc4 8 | Again: 0xc7221d08 0xff86f771 0x75f34ec3 0xa7a2023a 0x125ae5e7 0xb5ca5bc4 9 | Coins: TTTTHTTHTTTTTHHTTHHHHTTTTHHHTTHTHHHHHHTTHTTHTHTHTTTHHTTTHHTHTHTHT 10 | Rolls: 3 4 2 4 1 5 1 3 4 3 4 3 2 5 2 4 6 1 6 3 3 3 1 3 1 2 3 1 4 1 4 4 6 11 | --> rolling dice used 33 random numbers 12 | Cards: Qs 4h 8h 6d Qd Js Td 2c 3s 8d As Kh Ah Ts 5s Tc 2s 9d 7s 3c Ad 4s 13 | Jh 5c Kc 9h 5d 3d Jc Th Kd Qc 4d 2d 6h 9s 5h 6s Ac Ks 7d 7c 8c Qh 14 | 8s Jd 6c 3h 9c 2h 4c 7h 15 | 16 | Round 2: 17 | 32bit: 0x748a6a64 0xa03af0b2 0xb129b59b 0xcf5e4f80 0x4839d150 0xb0ee13b8 18 | Again: 0x748a6a64 0xa03af0b2 0xb129b59b 0xcf5e4f80 0x4839d150 0xb0ee13b8 19 | Coins: HTHTHHHHHTTTHHHHTHHHHHTTTHHTHHTHTTTTHTTHTHTTHHTHHTTTTTTHTHTTTTTTH 20 | Rolls: 5 1 3 6 3 4 5 1 1 1 1 2 3 2 2 4 4 3 6 6 6 6 2 1 2 6 6 2 1 1 3 3 6 21 | --> rolling dice used 33 random numbers 22 | Cards: Qd 2c 7s Ts 7h Ks 3c Kc 2s Js 9h 5c 8d 4s Jd 8c 9c Jc Kd 6c 8s Ac 23 | 2d 2h 9d Td Qs 7d Tc 6d 9s Ah 4h 5s 3d 3h 7c Qc 8h As 4d 6s Kh Ad 24 | Qh Th 6h Jh 5d 5h 3s 4c 25 | 26 | Round 3: 27 | 32bit: 0xeed322b4 0x7605071e 0x12f1f90b 0x84d6454e 0x9f738fea 0xa4e3bbb2 28 | Again: 0xeed322b4 0x7605071e 0x12f1f90b 0x84d6454e 0x9f738fea 0xa4e3bbb2 29 | Coins: HHTHHHTHHHHTTTHTTHTHHTHTTTHHTTHTTTHTTHTHHTTTTTTTTHHTTHTHHHTHHHHHT 30 | Rolls: 4 3 3 3 6 2 1 1 4 2 5 5 1 6 2 6 6 2 4 2 2 3 5 6 5 3 3 5 2 5 5 2 5 31 | --> rolling dice used 33 random numbers 32 | Cards: As Kh 4d 2s 3d 3h 4c Qc 8h 6d 7s Qs Kd 9c Ts 6s 7h 6h Ad Qh 9s 4h 33 | Jd Ah 6c 3c Jc Ks 5h 8s 2h 7c 3s 8d Js 9h 8c 9d 2d Ac Tc 4s 5c Th 34 | Kc Td 7d 2c 5s Jh 5d Qd 35 | 36 | Round 4: 37 | 32bit: 0x077dddbd 0x95ae5918 0x4df93a9d 0x35067e2b 0xb3a80eeb 0x621f87bd 38 | Again: 0x077dddbd 0x95ae5918 0x4df93a9d 0x35067e2b 0xb3a80eeb 0x621f87bd 39 | Coins: THTHHTTTHHTTHHTTTHHHTHHHTHHHHHHTHTTTHHHHHTHHTHTTHTHHHTTHHTTTTHHTT 40 | Rolls: 4 2 4 3 2 5 1 2 4 2 3 5 5 6 6 5 4 1 2 4 6 4 3 4 2 1 1 1 4 2 1 2 6 41 | --> rolling dice used 33 random numbers 42 | Cards: 5h Qc 7c 9d 5s 4d 3d 4s Jd Qs Ad 6h 7s 6c 7d Qh 8c Ts 5d 6s Tc 2c 43 | 3c 8h 6d Qd 3h 4h 8s 9h Th 9c 2d Kc Kh As Js 3s 2s Jh 8d 4c 9s 5c 44 | Kd 2h Ah Ac 7h Ks Jc Td 45 | 46 | Round 5: 47 | 32bit: 0x4a27d143 0x68c5d423 0xa02ed010 0x8412cad2 0x2356d187 0x9079eac3 48 | Again: 0x4a27d143 0x68c5d423 0xa02ed010 0x8412cad2 0x2356d187 0x9079eac3 49 | Coins: HHTHHTTTHHHTTHHTHTHHTHTTHHTHHTHHHTHHTTTHTTHTHHTTHHTTHHHHTTTTHTHTH 50 | Rolls: 1 6 4 1 1 4 6 1 1 5 3 2 4 5 2 6 5 1 4 2 5 4 3 6 2 4 2 5 4 5 6 3 4 51 | --> rolling dice used 33 random numbers 52 | Cards: 5c 4d Tc Kh Qc 6h 9h 7d 7s Th 4s 5s 6s Ks 6c 3d 7h 7c 2d Ad 5h Kd 53 | 9c 8d 4h Qh 9s 2c 4c 5d 8h 6d Kc 3c Ts 3s As Qd Ah Jd Qs 2s 2h Jh 54 | Td Jc 8c Js 9d Ac 8s 3h 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k16384.out: -------------------------------------------------------------------------------- 1 | pcg32_k16384: 2 | - result: 32-bit unsigned int 3 | - period: 2^524352 (* 2^63 streams) 4 | - size: 65552 bytes 5 | 6 | Round 1: 7 | 32bit: 0xe7cee806 0x5f20781c 0xfe49a493 0x18715647 0x4624a50a 0x7d1c9694 8 | Again: 0xe7cee806 0x5f20781c 0xfe49a493 0x18715647 0x4624a50a 0x7d1c9694 9 | Coins: HHTTHTHHTHTTHHTTTTTTTTTTHHHTTTTTTHHHHHHHHHHHTTHTHHHHTTHHHHHHTHTTT 10 | Rolls: 1 5 5 1 4 1 4 6 1 6 3 1 3 3 4 6 5 4 6 1 6 3 1 2 6 1 2 1 4 2 5 3 1 11 | --> rolling dice used 33 random numbers 12 | Cards: 4h 3c Qd Qh 4d 6d 9d 5s Jd 3d 4c 6c 9h 7h 2d Kc 6s 7d 4s 3s Kh Ah 13 | Qc Ac 8s 7c As Tc 3h 5h 8d Ts 2s 9c Td Qs 9s Ad 8h 8c Th Js Kd Jh 14 | 6h 5c 2c 7s Ks 5d Jc 2h 15 | 16 | Round 2: 17 | 32bit: 0x572f5c46 0xcf87184a 0x61374621 0x9ee8ee68 0x04a606ce 0x2ecb1cdf 18 | Again: 0x572f5c46 0xcf87184a 0x61374621 0x9ee8ee68 0x04a606ce 0x2ecb1cdf 19 | Coins: THTHTHHTTTHTTHTTTHHHTTHTHHTHTTHHTTHHHHTHTTTHHHTTHHHHHHHHHTTTTHTHH 20 | Rolls: 6 5 6 1 3 2 4 3 2 2 4 2 1 5 5 2 3 3 4 6 6 2 3 4 1 3 4 6 2 4 5 4 6 21 | --> rolling dice used 33 random numbers 22 | Cards: 5d Th 2d Qs Qd 6s 6d Kh 2c Kd Ad 4s Ah 6c Td Ac 4h 9s 7s Tc 8c Jc 23 | Jh 9h 8d 7h 2h Ts 5c Kc Jd 3d 8s 3c 2s Qc 7c 7d Ks 6h 5h 8h 4c Js 24 | Qh 4d 3s 9d 9c As 5s 3h 25 | 26 | Round 3: 27 | 32bit: 0xc21b1b6b 0xe17a116c 0x21895137 0xc0a7923d 0x389c0b3b 0x4a16d90e 28 | Again: 0xc21b1b6b 0xe17a116c 0x21895137 0xc0a7923d 0x389c0b3b 0x4a16d90e 29 | Coins: THTTTHHTTHHTHTTTTHHHTTHHTTHTHTHTTTHHHTHHHHHTHHHHHTHHHHHHHTTTTHTTH 30 | Rolls: 4 4 2 2 3 2 6 1 3 5 1 3 6 2 6 3 3 4 3 5 4 5 4 4 3 3 2 5 6 6 3 3 2 31 | --> rolling dice used 33 random numbers 32 | Cards: 7s Qd Ah 4c 6d 4d Ac 8d Tc As 2c Jc Qs 6c 3c 9s 5h 4s Kh Kd 2d Jd 33 | 9d 9c Ks Jh Kc 8c Td 3s 2h Ts 5c 4h 7h 9h Th 7d Js 7c 3h 6s Qc 5s 34 | 8h 5d 8s 6h Ad 3d Qh 2s 35 | 36 | Round 4: 37 | 32bit: 0x72fea21a 0x0a08832b 0x4daa4481 0x15c072de 0x84278d28 0x426515f4 38 | Again: 0x72fea21a 0x0a08832b 0x4daa4481 0x15c072de 0x84278d28 0x426515f4 39 | Coins: HHHTTTHHTHHHHHHTTTTHHHHTTTHTTTTTTTTHHHHHHTTHTHHTTTTHTTHHHHHHHTTHH 40 | Rolls: 4 5 6 3 4 2 2 3 6 6 2 3 2 1 6 5 1 1 6 6 3 4 6 2 2 1 2 6 2 3 3 6 3 41 | --> rolling dice used 33 random numbers 42 | Cards: 2h 6s Tc As 2c Ts 2s 5s 6c 8d 8s 7h 3h Ad 7c 9c Kc 4c 3c 5d 3s Qd 43 | Ac 9d Qs Td 5c Th 2d Js 9s 8h 6h Qh Ks 4d Kd Jc 4s Jd Qc 6d 9h 7s 44 | 7d 8c 5h Kh 3d 4h Ah Jh 45 | 46 | Round 5: 47 | 32bit: 0x253cb0a3 0x8c048602 0xe2c21841 0x948f5ed1 0xe460f940 0x606e28a7 48 | Again: 0x253cb0a3 0x8c048602 0xe2c21841 0x948f5ed1 0xe460f940 0x606e28a7 49 | Coins: HHTTHHTTTHTHHTTHHHTTHHTHHHHHTHHTHTTTTTHTTHHHTHTHTHTHHTHTTHHHTTTHT 50 | Rolls: 2 2 4 4 3 1 4 2 2 3 1 4 4 6 4 2 6 4 5 3 4 2 5 5 5 1 1 1 6 6 6 2 1 51 | --> rolling dice used 33 random numbers 52 | Cards: 2h Kh 6h Jc 3d Kd 7h 6s 5h Jh Ks 8d 6d Ad 4c 2s 7c Ah Js 7d 7s 6c 53 | Td 3s 8h 5d 4h As 3c Ts Qc 9d 2c Kc Jd 9s 5s 2d 8s 4d 3h Tc Qs 8c 54 | 9c 4s 5c Qd Qh Th Ac 9h 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k16384_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_k16384_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^524352 4 | - size: 65544 bytes 5 | 6 | Round 1: 7 | 32bit: 0x3308e4a7 0x8e821ae6 0x0a95201f 0xbfc13f62 0x392ac135 0x9a9a3aab 8 | Again: 0x3308e4a7 0x8e821ae6 0x0a95201f 0xbfc13f62 0x392ac135 0x9a9a3aab 9 | Coins: HHHTHHTHTTTHHHHHTHHHTHTHTHTTTHTTTTHHHTHTHTHTHTTHTHHTTHHTHHTHHHHTH 10 | Rolls: 6 2 2 3 5 2 5 6 5 3 1 4 6 5 6 4 2 1 6 4 1 1 1 6 2 2 2 5 1 1 2 1 4 11 | --> rolling dice used 33 random numbers 12 | Cards: 7h 4c 8s 7s 4d 2h 8c Th As 9s Qh Qc 4h 9d 6d Ad 6c 3s Kh 9h Js 5c 13 | Tc Ks Ac 7c 3h 2d 5s Qd 3d 2c Qs 2s 6h 8h Jd 5h Kd Ts Kc Jh 4s 7d 14 | Ah 9c Td 8d 5d 6s Jc 3c 15 | 16 | Round 2: 17 | 32bit: 0xdadd159c 0xbc2b894c 0xd0fe7abb 0xd3c99cc7 0xeec433b7 0xeb7f9d46 18 | Again: 0xdadd159c 0xbc2b894c 0xd0fe7abb 0xd3c99cc7 0xeec433b7 0xeb7f9d46 19 | Coins: THTTHTTHTTTTTHTTHTHHTTHTTHHTHTTTTTHHTTTHHTHTHHHHHTHHTHTTHHHTHTHHH 20 | Rolls: 3 6 3 5 5 6 2 5 1 5 6 6 2 6 3 6 6 2 6 3 5 1 2 6 5 1 5 3 3 2 2 5 3 21 | --> rolling dice used 33 random numbers 22 | Cards: 2s 7s Qd Ah 4c Ad 8s 5d 5h 3s Ts Kc Js 5s 8c 9h 2d Kd 4h 9d Jh 3d 23 | 2c Tc Ac 3c 4s 5c 7h Qc Qh 6h As 8d 2h 6d 7c Kh 3h Jd Th 9s Jc 4d 24 | Qs Td 7d 9c 6s 8h 6c Ks 25 | 26 | Round 3: 27 | 32bit: 0x1f019ace 0x4286124a 0x3f6959fc 0x6882a83f 0xd2c77978 0x721f00b2 28 | Again: 0x1f019ace 0x4286124a 0x3f6959fc 0x6882a83f 0xd2c77978 0x721f00b2 29 | Coins: HTHTHHTHTHHHTTTTTHHTTTHTTTHTTTHHTTHTHHHHTTHHHTTHHTHTHTTTHTHTTTHTH 30 | Rolls: 6 1 2 6 1 5 4 6 2 1 5 2 3 1 1 6 1 2 2 3 6 1 1 1 5 5 2 1 3 4 5 4 3 31 | --> rolling dice used 33 random numbers 32 | Cards: 6s 4d 2d 7h 9c 4c 4h As Js 3d Ts 3s Jh 8h Qc Qd Ac 8s Jc Ks 3c 5c 33 | 5d Jd 7c 7s Ad 6c 6h Kd 9h Tc 2s 2h 5s 6d 7d 2c 8c Qh Kh 8d Td 5h 34 | Qs Th Ah 4s 9s 9d Kc 3h 35 | 36 | Round 4: 37 | 32bit: 0xd607142f 0x2a130ecc 0xe1cdd7c8 0xbd5fd344 0xf003d169 0x0e7823df 38 | Again: 0xd607142f 0x2a130ecc 0xe1cdd7c8 0xbd5fd344 0xf003d169 0x0e7823df 39 | Coins: HTTHHHHTTHTHTHHTHHHHHTTTTHTHHHTHHHTHHHTTHTTHTHHTTTTTHHHHHHHTHHTHH 40 | Rolls: 1 4 3 2 4 3 2 5 1 4 4 4 3 1 4 3 3 2 5 3 1 2 5 6 4 3 5 1 2 1 6 1 6 41 | --> rolling dice used 33 random numbers 42 | Cards: 8s 7c 7s Kh Ks 7h Tc 7d 9c Kc 3d 6c 4d 9d 5h 6s 3c 3s Ad Jd Qh Qd 43 | 4c Jh 6h Ah 8d 3h 5s 5c 4h Ts 4s 8c Td 2h Jc 2d 5d 2s 6d Th Ac 2c 44 | 9h 9s Qc Js Kd As Qs 8h 45 | 46 | Round 5: 47 | 32bit: 0x1511e2e9 0x51bde329 0x7a8b724b 0x60a82f6f 0x13bf7f80 0x97870401 48 | Again: 0x1511e2e9 0x51bde329 0x7a8b724b 0x60a82f6f 0x13bf7f80 0x97870401 49 | Coins: HTTTHHTTHHHTTHHTHTTTHTHHTTTHHTTHHHHHHTTTHHTHHHHHTHTHHTTHHTTHTHHTH 50 | Rolls: 5 3 4 4 5 6 4 6 6 4 4 4 5 5 6 2 4 2 6 4 5 3 2 6 1 5 3 2 4 3 5 2 3 51 | --> rolling dice used 33 random numbers 52 | Cards: 8s As 2c Ad 7s Ac Kh Qh 5d 8c Jd Qc 8d 6h 5s 2h 2d 7c 7h Qs Jh 6c 53 | Kd 3s Js 9d 4s 3c 8h 7d Qd Th 4c 3h 6s 9c Ah 5h 4d Kc Tc 9h Td 6d 54 | 3d 9s 4h 2s Ks Ts 5c Jc 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k2.out: -------------------------------------------------------------------------------- 1 | pcg32_k2: 2 | - result: 32-bit unsigned int 3 | - period: 2^128 (* 2^63 streams) 4 | - size: 24 bytes 5 | 6 | Round 1: 7 | 32bit: 0x23ad45d5 0x6e2b9c53 0x23cf9e33 0x24e90350 0x7a160dc4 0x5cfeb7ad 8 | Again: 0x23ad45d5 0x6e2b9c53 0x23cf9e33 0x24e90350 0x7a160dc4 0x5cfeb7ad 9 | Coins: TTTTHTTTTHTTHTHTTHTTHTTTTTTTTHHHTHHTHTHTTHTHHTTHTHTTTHTHTHTTTHHHT 10 | Rolls: 3 4 4 6 5 5 5 6 6 1 6 6 6 3 4 5 6 5 3 3 6 4 5 2 1 2 1 1 4 4 4 2 5 11 | --> rolling dice used 33 random numbers 12 | Cards: 8c 9s 4d 5s As 9c 2s Tc 7c Ks 5d Td 2d 7h 8h 2h Ah 6s 2c Qs Jd Kc 13 | 4c 8s Jc 5h 6d 4h 6c Kh Th Kd Js 9d 7d Qd 6h Qc Jh 3s 9h Ac 3c Ts 14 | 7s Qh 5c Ad 3h 4s 8d 3d 15 | 16 | Round 2: 17 | 32bit: 0x76ce5fd8 0x93a10635 0x3dcb594c 0x927f49c7 0x4ab6117c 0x05f1e67d 18 | Again: 0x76ce5fd8 0x93a10635 0x3dcb594c 0x927f49c7 0x4ab6117c 0x05f1e67d 19 | Coins: THTHTHHHTHHHHHHHHHHTHTTHHTHHTTTHHHHTTHHTHHTHTHTTTTHHHHHTHTHTHTHTH 20 | Rolls: 3 1 2 2 1 1 6 1 2 2 4 3 2 5 5 5 1 1 3 5 3 1 2 1 5 6 3 1 4 5 2 5 3 21 | --> rolling dice used 33 random numbers 22 | Cards: 9h As 3d Tc 8h 5c 5d Jh 2s 6d 8s 4h 6c 9c 4s 4d Ts 2c 5h Ah Qh Js 23 | Td Jc 3h 9s 3s Th Kd 8c Qs 2h Kh Qc 7h 6h 4c Ac 7s Qd 8d Ad 9d 7c 24 | Kc 6s Ks 7d 2d 3c 5s Jd 25 | 26 | Round 3: 27 | 32bit: 0x5a9adcab 0x5d30c50f 0xfc94015f 0x3459e46f 0xc133138c 0x419a4672 28 | Again: 0x5a9adcab 0x5d30c50f 0xfc94015f 0x3459e46f 0xc133138c 0x419a4672 29 | Coins: HHTHTHHHTTHTTTTHHTTHHHHTTTTTTHTHHTTHTTHHHTTHHHTTHTTTHTTTTHTTTHTHT 30 | Rolls: 3 6 3 1 4 3 6 3 1 6 6 2 4 4 5 2 4 3 2 6 1 2 5 4 5 2 6 5 3 2 2 6 4 31 | --> rolling dice used 33 random numbers 32 | Cards: 7d Ac 3c 7c Tc 4h Ad 9d 3s 6d 2h 7s 3d 5d Kh Th 8s 8d 4s 2d 4d Qc 33 | 3h Js 5s Jc 6c 2s Qs 5c Ks Jd Jh Ts Kd 8c 7h Qh 2c 4c As Qd 9s 8h 34 | 6h 6s 9h 9c Td Kc Ah 5h 35 | 36 | Round 4: 37 | 32bit: 0x33e94d75 0x25b26823 0x9210e5fa 0x5dd9e791 0xf2c25d15 0x3e8c34d3 38 | Again: 0x33e94d75 0x25b26823 0x9210e5fa 0x5dd9e791 0xf2c25d15 0x3e8c34d3 39 | Coins: TTHTHHHHTHTHHTTHTTHTTHHHHHHHHHTTHHHHTHTHTTTHHHTTTHHTHTTHHHTTHHTTT 40 | Rolls: 5 1 4 3 2 5 6 6 2 6 5 6 5 5 6 3 4 5 4 2 4 1 6 2 6 6 1 1 5 5 5 5 1 41 | --> rolling dice used 33 random numbers 42 | Cards: Kh 6h 6d Ks 7c 7s 2c Qd Qc 5c 8s Th 8h 2s Td Ts As Jd 9c 4h Tc Qh 43 | 8c Ad 5h Jh 6c 4s 7d 2d 2h Kd 5d Ah 8d Kc 4d 9s 9d Js 4c Ac 3d Qs 44 | 5s 3s 7h 6s Jc 9h 3h 3c 45 | 46 | Round 5: 47 | 32bit: 0xb8130a51 0x3ffeab8a 0x38821a59 0x5a2600f2 0x3b6f403f 0x8117a786 48 | Again: 0xb8130a51 0x3ffeab8a 0x38821a59 0x5a2600f2 0x3b6f403f 0x8117a786 49 | Coins: TTHHTTTHHTHHTHHTTTTTTHTHHHTTTTTHTTHTTTTTTHHHTTTTHHHHHTHHHHHHTHHHH 50 | Rolls: 3 3 6 1 6 6 2 6 5 3 5 2 6 2 4 3 5 3 5 4 3 4 6 4 1 6 4 1 5 2 6 1 6 51 | --> rolling dice used 33 random numbers 52 | Cards: Kh 4d Qs 5s Ks As 7s 2d 4h Qd Kc 6s 7d 3h Ad Jc 5h Js Ah 8c 6h 6c 53 | Jd 9h 2h 2s 5d Kd 9c 8d 4c Tc 8h Jh 3c 8s 3d 7h 9d 3s 6d 5c Ts 4s 54 | Th Ac 2c Td Qc Qh 9s 7c 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k2_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_k2_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^128 4 | - size: 16 bytes 5 | 6 | Round 1: 7 | 32bit: 0xe30b7cba 0x6af364b0 0x27de7b5d 0xcc1c87c3 0x5cd80226 0xfec28ee6 8 | Again: 0xe30b7cba 0x6af364b0 0x27de7b5d 0xcc1c87c3 0x5cd80226 0xfec28ee6 9 | Coins: HTTHTHTHHTHHTHTTTHTHTHTHTHTHHHTHTHTTTTTTHTTTTTTHTTTHHHHTHHTTTHHTT 10 | Rolls: 1 3 4 5 3 6 2 4 2 5 1 6 4 5 5 4 2 4 3 4 5 1 2 1 4 6 5 4 2 2 5 1 4 11 | --> rolling dice used 33 random numbers 12 | Cards: Jc 7c 4c Kh As 6s Qc Qh Qd 3d Th 8d Qs 5s 5d Kd 7h 8h Ah 4d Jh 5h 13 | Kc 2h Tc 7d 9h 6c 4s 8c 8s 9s 9d 2d 6h 5c Jd 3h 4h 2s 3s Ks Td Ts 14 | 3c 9c 7s 2c 6d Js Ac Ad 15 | 16 | Round 2: 17 | 32bit: 0x162d493a 0x03abb49b 0x00ef59f5 0x7da5ed07 0xb9008c9c 0x1cf59ea5 18 | Again: 0x162d493a 0x03abb49b 0x00ef59f5 0x7da5ed07 0xb9008c9c 0x1cf59ea5 19 | Coins: THTTTTTTHTHHHHTHTTHHTTHHHHTTHHHHHTHTHHTTTHTHHHHTHTTTTTTTTTTTHTHTT 20 | Rolls: 6 1 3 1 1 3 5 3 2 2 3 5 3 1 4 5 1 6 4 2 4 6 2 4 6 3 2 3 4 1 6 2 5 21 | --> rolling dice used 33 random numbers 22 | Cards: 8h 3h 7s 9c 9d Ac Jh 7d 6h Ks 3s 7c 2s Ad Th 5c 4h Kh Tc Kd Jc 6s 23 | Qd 2d 3d Qc Qs Qh 5s 6d 5h As 9h 2h Ts 6c 4d Kc Js 3c 9s Jd 7h 4c 24 | Td 8d 2c 5d 8s Ah 8c 4s 25 | 26 | Round 3: 27 | 32bit: 0xc3981ded 0x898126c2 0x6bf9f962 0x0644d3dc 0x1e45ccb6 0x9d2ecaf2 28 | Again: 0xc3981ded 0x898126c2 0x6bf9f962 0x0644d3dc 0x1e45ccb6 0x9d2ecaf2 29 | Coins: THTHHHHHTTHTHHHHHTHTHHHHTTTTHHHHHHTTTTHHHTTHHHTHTTHTTHHHHTHTHHTHH 30 | Rolls: 4 2 5 5 6 6 6 2 1 6 2 2 4 3 4 3 1 5 2 2 6 6 1 4 6 5 1 3 2 2 1 3 6 31 | --> rolling dice used 33 random numbers 32 | Cards: 3c 8s 7d 5s Qc 4h Kc 5h 4s Kd 3d 3h Ah Qs 4d Jd 8d Ac 7c 2c 6s 7s 33 | Qh Ks 6d 9d 2d 6c Td Jh 4c Js Tc 3s Ad Qd 5c Th Jc Kh 9c 2s 7h As 34 | 9h 8c 6h 2h 5d Ts 9s 8h 35 | 36 | Round 4: 37 | 32bit: 0x8575f7de 0x96024950 0x9d505d02 0x5623edf7 0xa615206d 0xe9da85d2 38 | Again: 0x8575f7de 0x96024950 0x9d505d02 0x5623edf7 0xa615206d 0xe9da85d2 39 | Coins: HHHHHTTTHHHTTHHHTTTTHHHTTTTTHHTTHHTHHTHHHHTTTTTTTTHHTTHHHHTHHTHTH 40 | Rolls: 6 1 2 6 2 5 1 4 1 5 4 5 5 5 1 3 1 5 6 6 2 2 1 2 5 5 5 6 4 2 1 5 1 41 | --> rolling dice used 33 random numbers 42 | Cards: 7d 3h Qs 9h 5h Jh 9s Js Kd Jd Kh 2d 2s 8h Qd Qh Ac 9c Kc Jc 8d As 43 | 4c 3d 5s 5d 5c 8s 7s Qc 2c Td Ks 4s 7h Ad 2h 6h 6d 3c 6s 6c 9d Tc 44 | Ah 7c Ts 4d 3s Th 8c 4h 45 | 46 | Round 5: 47 | 32bit: 0x3c64d5ba 0x6de15115 0xd50081e4 0x4e0d6399 0x34b5cfc7 0x8f7825ab 48 | Again: 0x3c64d5ba 0x6de15115 0xd50081e4 0x4e0d6399 0x34b5cfc7 0x8f7825ab 49 | Coins: TTTTTTTHHHTTTHTTTTTTTTHHHTHTTHTTTHHTTTHTTTTHHTTHTTHTTHHTTTTHHTHTH 50 | Rolls: 4 2 5 5 2 1 2 4 5 4 5 1 3 6 3 3 3 1 5 3 2 3 1 6 5 5 1 5 6 6 1 3 2 51 | --> rolling dice used 33 random numbers 52 | Cards: 5h Kd Qd Qs Jc 3h 6s 7d 4c 4d Ts Tc 3d 7s 6h 3c 2d 9d 6d 6c 9s 2s 53 | 7h 8c 5c Ks 5d 7c 4s 8d Qh Td Ah Js As Kc 9h 9c Th 3s 2h Qc 4h Ac 54 | 5s Kh 8h 8s 2c Jd Ad Jh 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k64.out: -------------------------------------------------------------------------------- 1 | pcg32_k64: 2 | - result: 32-bit unsigned int 3 | - period: 2^2112 (* 2^63 streams) 4 | - size: 272 bytes 5 | 6 | Round 1: 7 | 32bit: 0xe85244a0 0x7112822f 0x9325f975 0xf50dea01 0x8cec9bba 0xaa9fa4b3 8 | Again: 0xe85244a0 0x7112822f 0x9325f975 0xf50dea01 0x8cec9bba 0xaa9fa4b3 9 | Coins: HHTTTHTHTTHHHHHHTHTHTHTTHHTHTHHHHTTTHHHTTHTHHHHTHTTHTTTTTTTTHTTTT 10 | Rolls: 4 6 3 6 2 3 3 5 5 2 4 3 6 6 2 5 3 6 1 3 1 2 6 4 6 5 4 5 6 1 3 2 2 11 | --> rolling dice used 33 random numbers 12 | Cards: Qs 2d 6s 8c 6d 4d 5d Ah Ks 3d 5s Qd 6h Td 5c 4h 2c 8h Ad 2s Js 7c 13 | 5h Qc Ac 7s 4s Jd Kc 9c 9s 2h Kh Ts Qh Jc 7h 8d Th Tc 3h As Jh 4c 14 | 8s 3c 9h 6c 3s 7d 9d Kd 15 | 16 | Round 2: 17 | 32bit: 0x98c55d02 0x0fd39f52 0x11b56e6c 0x54cbf14e 0x45bde3a6 0xa77ab20f 18 | Again: 0x98c55d02 0x0fd39f52 0x11b56e6c 0x54cbf14e 0x45bde3a6 0xa77ab20f 19 | Coins: THTHTHTHTTHHTHTHHTTTHTTHTTHTHTTHTTHTTTHHTHHTTTTHTHHTTTHHTTTTTTHHH 20 | Rolls: 5 2 1 3 5 5 3 5 4 2 4 1 2 1 1 6 6 6 6 1 1 2 1 4 5 1 1 1 6 4 1 2 6 21 | --> rolling dice used 33 random numbers 22 | Cards: 9s 6s 7c 4h 4d 8d 8h Jc 3h Qh 5s 9c 3s Tc 8s As Kh Kc 2c 2s Ac 8c 23 | 5c 4c 6c 2h Jh 5d 9d Qs 7d Qc Th Ks Ts 3c Js 7s 6h 7h Kd 5h Qd 9h 24 | 3d Td Ad Ah 2d 4s 6d Jd 25 | 26 | Round 3: 27 | 32bit: 0xf2fe5c00 0xacc7f4f5 0xeac130c7 0x7a2ce2be 0xd39bf181 0xce784be4 28 | Again: 0xf2fe5c00 0xacc7f4f5 0xeac130c7 0x7a2ce2be 0xd39bf181 0xce784be4 29 | Coins: THTTHTHTTHTTHHTHTHHHTHTTHTHTHHTHHTHTHHTTTHHHHTHTHTTHHTHTHTHHTTTTH 30 | Rolls: 4 2 3 3 2 6 6 1 6 1 4 4 3 4 1 2 2 1 5 6 1 1 2 6 5 4 4 6 3 1 5 1 1 31 | --> rolling dice used 33 random numbers 32 | Cards: 7c Jc 9s Ah 4h 3d 2d 5d 3s 7h Kh 6s 6h Ks 2c 9c 2s 8s Tc 7d 5h 3c 33 | 8h 4d Jh Td 4s 5s 2h Ac 9d 6c Js Ts Qd 8c 5c Ad 7s Kd Qc Jd Th 9h 34 | Qh 6d 8d Kc Qs 3h As 4c 35 | 36 | Round 4: 37 | 32bit: 0x1ef66795 0x83d37b1c 0xfc6d9564 0x9806e724 0xe10fbb53 0xdc1d6eab 38 | Again: 0x1ef66795 0x83d37b1c 0xfc6d9564 0x9806e724 0xe10fbb53 0xdc1d6eab 39 | Coins: TTTTHHHHHTTTTHHTHTTTHHTHTHTHHTHTTHTHTHTHHHHHTHHTHTHTTTHHTTTTHHHTT 40 | Rolls: 4 2 2 4 6 6 5 2 4 1 1 6 6 3 3 5 3 3 2 3 3 6 6 5 2 6 6 1 5 6 2 6 4 41 | --> rolling dice used 33 random numbers 42 | Cards: 2d 4s Qs 8h Jd 6d Jh 2s 7c 3s 5h Kd Js Td 3c 9s As Ts Ah Tc 8d 7h 43 | 5s 9h Th 7d 4c 8c Qc 5d 5c Qh Qd 8s Ac 6c 3d 2h 4h Kc Jc 9c 4d 6s 44 | Ks 7s Kh 9d Ad 6h 2c 3h 45 | 46 | Round 5: 47 | 32bit: 0x24b9177f 0x83dde908 0xd2719639 0x43d1afbf 0x35db4e5a 0x5d9f5718 48 | Again: 0x24b9177f 0x83dde908 0xd2719639 0x43d1afbf 0x35db4e5a 0x5d9f5718 49 | Coins: HHHHTHHHTTHTTTHHTTTTTTHTTHTHHHTTTHTHHHTTTTHTHTTTTTHTHHHHHHHHTTHTT 50 | Rolls: 1 6 1 6 5 1 6 1 1 1 1 6 3 6 4 4 3 6 3 3 3 5 6 4 4 4 3 2 3 2 4 5 1 51 | --> rolling dice used 33 random numbers 52 | Cards: 6c Th Kc Qd 7d 6s Ks 7h Tc 9c 5s 9h 8d 9d 7s 5d Kh Ad 6d Qc Td 9s 53 | Js 5h 6h Qh 2s Ts 2h Jd 3c Ac Qs 8s 5c 2c As 2d 7c 4d 3s 8c Kd 4c 54 | 4s Jc Ah Jh 3h 4h 8h 3d 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k64_fast.out: -------------------------------------------------------------------------------- 1 | pcg32_k64_fast: 2 | - result: 32-bit unsigned int 3 | - period: 2^2112 4 | - size: 264 bytes 5 | 6 | Round 1: 7 | 32bit: 0x623d127c 0xfa4987c9 0x1a27eeee 0x603880d8 0xd94c8039 0x0f4aa323 8 | Again: 0x623d127c 0xfa4987c9 0x1a27eeee 0x603880d8 0xd94c8039 0x0f4aa323 9 | Coins: HTHTTTHHHHTHHHTTHHTHHTTTHTHHTHTHTTHHTTTTHTTHTHHHTTTHTTTTTTTHHHHHT 10 | Rolls: 3 2 2 5 4 5 5 2 6 2 2 1 3 5 4 5 4 4 2 6 2 3 3 5 5 1 3 3 6 1 5 2 5 11 | --> rolling dice used 33 random numbers 12 | Cards: 5d 3s 9c Jd 6c 8d 2s 8h Qd 9d Kd 3h 7d 4c 7s Jc Js Th 5s 2d Ad 9h 13 | Ts Ks Ah 8c 3d 9s Qh 3c 7c 5c 6h 2h As Kh Td 7h 4h Jh Qs Kc 2c 6d 14 | 8s Ac Tc 4s 5h 4d Qc 6s 15 | 16 | Round 2: 17 | 32bit: 0x8df2a75a 0x8d0158a9 0xafeb1142 0x79c26727 0x149f2c2c 0xfdb241eb 18 | Again: 0x8df2a75a 0x8d0158a9 0xafeb1142 0x79c26727 0x149f2c2c 0xfdb241eb 19 | Coins: HHHTTHTHTTTTHTHHHTTHTTHHTTTHHTTTTHHHHHTHTTHTTTTHHTHHTHHTHHTHHHHHT 20 | Rolls: 6 4 1 4 4 6 6 4 2 3 2 4 4 1 6 6 6 2 4 3 2 1 4 4 2 2 3 4 4 2 4 6 2 21 | --> rolling dice used 33 random numbers 22 | Cards: 6h Ts Qd 8c Ks 9d 2d Kc 4h Qc Td 5s 3d 8s 2s 6c Ah Kd Ac 5c Ad 3h 23 | 2c 5d Jc Qh 8d 3s As 2h 7h 7c 9s 5h 4d Kh 9c 6d 7s Th Qs Js 3c 9h 24 | 8h Jd Jh 7d Tc 4c 6s 4s 25 | 26 | Round 3: 27 | 32bit: 0x4d5299d6 0x7993beb4 0xa9878cdf 0xb23d608f 0x442110c0 0x701b5b8c 28 | Again: 0x4d5299d6 0x7993beb4 0xa9878cdf 0xb23d608f 0x442110c0 0x701b5b8c 29 | Coins: TTTHTTTHTHHTTHHTHTTTHHTTTHTTHTTHTTHTHTTHHHTTTHHTHHTHHHTHTHTTHTHTH 30 | Rolls: 3 3 1 3 2 4 2 1 6 3 4 4 5 6 1 4 2 5 1 2 3 4 2 6 2 5 3 4 4 6 6 1 6 31 | --> rolling dice used 33 random numbers 32 | Cards: Th Kc 3h Qc 3d 7s Ks 2h Qd 4d 6c Ts 3s Kh 9h Ac Ad 5d 2d 4s 7h Jc 33 | 5h 9d 9c 8h Js 7d Jd Kd 7c 3c Jh 5c 8d 9s 8c 8s Tc 6h 5s Td Qh Ah 34 | 4h 4c As 6d 2c Qs 2s 6s 35 | 36 | Round 4: 37 | 32bit: 0xb3686885 0xbfa94438 0x47b29921 0x2787b39e 0x685c3666 0x844a798f 38 | Again: 0xb3686885 0xbfa94438 0x47b29921 0x2787b39e 0x685c3666 0x844a798f 39 | Coins: THHHTTHTHHHHHTTHTHTTTTHHTHTHTHTTHTHHHHHTTHHHHTHTHHTTHHTHTTHHHTHTH 40 | Rolls: 3 6 6 6 2 6 5 2 1 4 4 4 3 6 6 2 2 5 6 3 3 2 1 1 4 3 3 4 2 2 4 1 1 41 | --> rolling dice used 33 random numbers 42 | Cards: 9h 2s Tc As Th 7d Jh 3h Td 7h 9s 4c 5s 5h 6h Jd Ts 2d Qd Ad Js Ks 43 | 8c 9c 3s 9d 8d 7s 4s Qc 6c 3c Jc 5d Ac 2h 7c Qs 8h Kd 8s 4h Kc 6s 44 | Kh Ah 2c 4d 6d Qh 3d 5c 45 | 46 | Round 5: 47 | 32bit: 0xcf9ef109 0xcdc3a236 0xa3107d4a 0x8481cc76 0x14cb0dc0 0xbeb351d3 48 | Again: 0xcf9ef109 0xcdc3a236 0xa3107d4a 0x8481cc76 0x14cb0dc0 0xbeb351d3 49 | Coins: TTTTTTTTHTHHTTHTHTHTTTHHTHTHTTHHTHHTHHHHHTTHTTTHTTTHHTTTTTTTHTHHT 50 | Rolls: 2 1 3 5 3 2 6 3 5 5 1 3 2 5 5 2 5 2 4 5 4 5 1 3 1 6 1 6 5 2 1 2 6 51 | --> rolling dice used 33 random numbers 52 | Cards: 8s 6s 3d 2c 9c 4h 5d 9s 7s 8c Ah 8d Td 5c Js 8h Qd 9h 2s Jc 6h As 53 | Qh 4s Qc Kh Ts Qs Th 5s Ad Tc 9d 3s 4d 7h Kc 3c 7c 2d Ac 6c 4c Ks 54 | 3h 6d Kd Jh 2h 5h 7d Jd 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_k64_oneseq.out: -------------------------------------------------------------------------------- 1 | pcg32_k64_oneseq: 2 | - result: 32-bit unsigned int 3 | - period: 2^2110 4 | - size: 264 bytes 5 | 6 | Round 1: 7 | 32bit: 0x8bfad379 0x21d323ad 0xd58574f9 0x282d3aa0 0x33b49afc 0x5821fdb2 8 | Again: 0x8bfad379 0x21d323ad 0xd58574f9 0x282d3aa0 0x33b49afc 0x5821fdb2 9 | Coins: TTHHTTHHTTTHTTTHTTHHTHHHHTTTTTTTHTHTHTHTHTTHHTHHTTHHTTHHHTTHHHTTH 10 | Rolls: 1 6 3 2 1 3 4 4 4 2 3 2 4 3 2 3 3 1 2 2 4 5 4 6 1 4 1 4 4 3 3 2 2 11 | --> rolling dice used 33 random numbers 12 | Cards: 8s 5s 2d Qh Ad Kd 4c 3c 4d Ac Jd Js Kh 2h Qc Th Kc 6h 5d 3h Ah Td 13 | 7h 8c 9s 7s 9h Ks 4s 3d 2s 7c 7d 3s 5c 2c 6s 8d Jc 6d 9d Ts 5h Tc 14 | 6c Jh Qd 9c 4h 8h As Qs 15 | 16 | Round 2: 17 | 32bit: 0x97d54bf1 0xb85353db 0xc986820d 0x44c61d24 0x8263654e 0xcafc64df 18 | Again: 0x97d54bf1 0xb85353db 0xc986820d 0x44c61d24 0x8263654e 0xcafc64df 19 | Coins: TTHHHHHTTHTHHHHTTTHHHTHTTHTHTTHTHHTTHTHHTHHHTHTHHTTHTHTHHTHTTHHTH 20 | Rolls: 6 5 3 2 1 3 5 4 3 2 4 2 6 5 2 1 4 6 4 4 3 6 2 6 3 1 2 5 1 4 1 6 1 21 | --> rolling dice used 33 random numbers 22 | Cards: Kc 9c Td 7d 4h 8s 8d 2h Ad Qh 4c 3s 6s Jh 8h Qs 7c 7h Th 9d 3c Js 23 | 2s 4d Kd 2c Tc As 4s 5d Ah 9s 5h 7s 9h Jd Ac 3h 2d Jc Ks Kh Qc Ts 24 | 3d 5c 6c 6d 5s 8c 6h Qd 25 | 26 | Round 3: 27 | 32bit: 0x2c1b99e5 0xf187ff1f 0xd1079e86 0x74c45a92 0x4d0b42be 0x652cd137 28 | Again: 0x2c1b99e5 0xf187ff1f 0xd1079e86 0x74c45a92 0x4d0b42be 0x652cd137 29 | Coins: HTHHTHTHTHTHTHHTTHHHHHHHTHHHHTHHTTHHTTTTHTTTHHTHTTHTTTTHHHHTHTHHH 30 | Rolls: 5 4 5 2 2 4 1 4 6 6 2 4 2 4 3 5 6 1 4 6 5 1 6 4 2 5 3 3 4 3 4 1 4 31 | --> rolling dice used 33 random numbers 32 | Cards: 8s 8h 7s As Ac Qh 5h 3d Jd Ks 5s 4c Qc Td 4s 4h 3h Kd 2d 9d Tc 9c 33 | 8c 2s 6c Kc 7d 4d 9s Qs 6d 2h 8d 7h Ts Jh 7c 3c 5c Ad Ah 9h 6s Kh 34 | Qd Th Js Jc 5d 3s 2c 6h 35 | 36 | Round 4: 37 | 32bit: 0x0166955b 0x98c26e63 0xa2eb39be 0x8e7a0f18 0xa1ee6dc4 0xa28d8093 38 | Again: 0x0166955b 0x98c26e63 0xa2eb39be 0x8e7a0f18 0xa1ee6dc4 0xa28d8093 39 | Coins: TTHHTTTTHHHHHHTHTHTTTTHTHTHTTTTHHHTTTTHTTHHTHHHTTTHHTTHTTHHHHHHHH 40 | Rolls: 5 4 1 1 3 3 3 2 3 2 1 2 1 2 5 6 6 4 6 5 5 3 6 6 4 2 2 6 1 1 4 1 1 41 | --> rolling dice used 33 random numbers 42 | Cards: 8h Qc 7c 2d 2s 2c 8c 4d 7h Js 9c Td 5h 4c 7d 6c Ad Qh Kh 2h 8d Th 43 | 9d 6h 3s 6s 5c 5s 4s 3d Jc 3h 3c Jd 9h 9s Kc Kd Ks 4h Ah 8s Ts Tc 44 | Qs 6d Ac 5d Jh As 7s Qd 45 | 46 | Round 5: 47 | 32bit: 0xc0f40efc 0x77437fab 0x80c937c8 0xc6ae4e8b 0xa9809bbb 0xe6523fd7 48 | Again: 0xc0f40efc 0x77437fab 0x80c937c8 0xc6ae4e8b 0xa9809bbb 0xe6523fd7 49 | Coins: HHHTTTHHTTTHHHHTTTTTHTTHTHHTHHHHHHTTTHTHTHHTTHTTHTTHHHHTTHHHTHHTH 50 | Rolls: 4 1 5 1 1 3 2 6 1 3 3 3 1 4 2 1 2 5 4 2 1 5 6 5 2 5 3 3 3 3 6 2 3 51 | --> rolling dice used 33 random numbers 52 | Cards: 4d 9c 9s 8s Jc 7d 3c Ac 3d 5h 5c Js 2c Qs Th 4s 7h 2s 8c 4h Qd Tc 53 | Ah 9h 3h Qh Jh 6s Jd 3s 8h Ts Kh Kd 4c 7s 2h 6c Qc 6d 8d Kc Ks Td 54 | Ad As 5s 7c 6h 9d 5d 2d 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg32_once_insecure: 2 | - result: 32-bit unsigned int 3 | - period: 2^32 (* 2^31 streams) 4 | - size: 8 bytes 5 | 6 | Round 1: 7 | 32bit: 0xf84b622d 0xdc1e5bb4 0x74fb8ac1 0xb3bbf8de 0x9cf62074 0x2d2f5e33 8 | Again: 0xf84b622d 0xdc1e5bb4 0x74fb8ac1 0xb3bbf8de 0x9cf62074 0x2d2f5e33 9 | Coins: HTHHHHTTTTTHHHHHTTTTTHHTTTHTTHTHTTHTTTTTHTTTHHTHTTHTTHTTTTHTTHHHT 10 | Rolls: 6 1 5 3 2 4 4 6 5 1 1 5 4 2 6 4 6 5 1 6 5 2 5 4 6 2 6 3 5 1 6 4 3 11 | --> rolling dice used 33 random numbers 12 | Cards: Kd 8h Td 9d As 4h 7s 5s 2s Js Qd 5h Ac 3d 8d 2d 3h 8s 7h Th 4d 9s 13 | Qc 3s Kc 6d 7c 9h 4c 8c Kh Jh Jc 4s 3c Ah Tc 6s 9c 7d 5c Ks 6c Qs 14 | Ad 6h Ts Jd 2h 2c 5d Qh 15 | 16 | Round 2: 17 | 32bit: 0xd6fdef4c 0xb793e894 0x62d8db75 0x51c7462c 0x9bbee1c9 0x9c609fb5 18 | Again: 0xd6fdef4c 0xb793e894 0x62d8db75 0x51c7462c 0x9bbee1c9 0x9c609fb5 19 | Coins: TTTHTHTTTHTTHTTHHTTTHHTHTHTHTTTTHTTHHTHTHHHHHTHHHHTHHTTTHHHTHHHTT 20 | Rolls: 1 6 3 5 2 6 4 1 3 6 2 3 1 1 2 3 2 5 6 2 2 1 6 6 3 3 1 1 1 6 6 2 4 21 | --> rolling dice used 33 random numbers 22 | Cards: 6c Qd 9s 3d 7c 7h Ts 2c 3h Kd 2s Td 6h 8d Jh 2d 2h Ah 5h Th 5c 9c 23 | 8s Kh As Kc 5s 6d Js Jd 4h 7d 5d Tc 8c Jc 6s 4s 9d 3c 4c Ac Qh Qs 24 | 7s 4d 9h Ad Ks 8h 3s Qc 25 | 26 | Round 3: 27 | 32bit: 0x7e849685 0x0a1a7a41 0xcf53a482 0xcbc007c5 0x60e65898 0x9179fbd7 28 | Again: 0x7e849685 0x0a1a7a41 0xcf53a482 0xcbc007c5 0x60e65898 0x9179fbd7 29 | Coins: THHHHHHTTHHTHHTHHTHHTTHTHTTHHHTTHHHHHTHTHTHTTHTHTTHTHTHHTHTTHTTTH 30 | Rolls: 6 1 4 4 3 4 6 3 2 5 3 5 2 2 6 6 3 4 6 4 6 1 3 2 2 3 2 2 3 6 2 1 4 31 | --> rolling dice used 33 random numbers 32 | Cards: Jd 8d 6c Jc 2s 9h 4d Kd 5d Qc Ts 8c 5s 3h 5h Ks 6d 4s 7c 5c Kc Js 33 | 6s Kh Qs 7d 2c Ah 9d 3c 4c 4h 7h 9c 3s 3d As Tc Ac Ad 8s 8h Th Jh 34 | 2d 6h Qd Qh 9s 7s 2h Td 35 | 36 | Round 4: 37 | 32bit: 0xcc53664c 0xe23c4863 0xa79bb6df 0x96f9b755 0x13a38786 0x34a8f727 38 | Again: 0xcc53664c 0xe23c4863 0xa79bb6df 0x96f9b755 0x13a38786 0x34a8f727 39 | Coins: TTTTHTHHTHHTTTHTHTHHHHTHHTTHHHHHHHTHTHHHTHTTTHTTHHHHHTHTTTHHHTHTT 40 | Rolls: 4 1 5 6 2 3 1 5 4 2 4 4 5 2 1 5 2 6 6 5 2 6 2 1 2 5 3 1 4 6 5 3 3 41 | --> rolling dice used 33 random numbers 42 | Cards: Ad 9h 9d 5c 5d 5s 2s Ac Qs 4c 8s 6d Qh Kd 9c Ts 3d 4d Td 6h 4s 2h 43 | Jd 8h 7h Qd Ks Tc 7c 6s 8d As Kh Th Jh 3c 9s Kc Jc 3s 2c 8c 2d Js 44 | 4h Ah 3h 5h 7d Qc 7s 6c 45 | 46 | Round 5: 47 | 32bit: 0x34c5b8b1 0x818c3828 0x23842fe4 0xd64649b8 0x5d1b76c9 0x18819107 48 | Again: 0x34c5b8b1 0x818c3828 0x23842fe4 0xd64649b8 0x5d1b76c9 0x18819107 49 | Coins: TTHHTHTTTHTHTTTTTHHTHTHTTTHHTTHTHTHHHHTTTHTTTTTTHHHTHTTTTHHTHTTTT 50 | Rolls: 5 6 1 1 5 3 1 6 4 5 3 1 2 4 1 3 5 1 1 5 2 3 2 4 1 1 3 2 3 1 2 4 2 51 | --> rolling dice used 33 random numbers 52 | Cards: 3h 5h 7s 4h 3c 8h 2h Qc 8c 4d 6s 5d Jh Ad 6c 4c 7h Js 7d 6d 8s 9d 53 | 2d Qs 3s Ts 2c 2s Ac 8d Th Kd 5s Kc 9c 7c 3d Td Jc As Tc Ks Qh Qd 54 | 6h 9h 4s Jd 5c Ah 9s Kh 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_oneseq.out: -------------------------------------------------------------------------------- 1 | pcg32_oneseq: 2 | - result: 32-bit unsigned int 3 | - period: 2^64 4 | - size: 8 bytes 5 | 6 | Round 1: 7 | 32bit: 0xc2f57bd6 0x6b07c4a9 0x72b7b29b 0x44215383 0xf5af5ead 0x68beb632 8 | Again: 0xc2f57bd6 0x6b07c4a9 0x72b7b29b 0x44215383 0xf5af5ead 0x68beb632 9 | Coins: THTHHHTTHHTTHTTHTHHHTHTTTHTTHTTHTTTHHTTTTTHHTTTHTTHTHHTHHHTTHTTTH 10 | Rolls: 4 1 3 3 6 6 5 1 3 4 4 3 2 2 5 4 1 3 3 3 1 4 6 4 6 6 1 6 1 2 3 6 6 11 | --> rolling dice used 33 random numbers 12 | Cards: 2d 5c 3h 6d Js 9c 4h Ts Qs 5d Ks 5h Ad Ac Qh Th Jd Kc Tc 7s Ah Kd 13 | 7h 3c 4d 8s 2c 3d Kh 8h Jc 6h 4c 8d Qc 7c Td 2s 3s 4s 7d Qd Jh As 14 | 6c 8c 5s 2h 6s 9d 9s 9h 15 | 16 | Round 2: 17 | 32bit: 0x0573afcc 0x2cab16db 0x6af6f55a 0xe916bec2 0x1ca9b4a4 0xbb2778eb 18 | Again: 0x0573afcc 0x2cab16db 0x6af6f55a 0xe916bec2 0x1ca9b4a4 0xbb2778eb 19 | Coins: THHHTHTTTHHHTTTTTTHTTHTHTHHHTHHHTHTHTTHTTTTTHTHHTHHTTHHHHHTTTHTTH 20 | Rolls: 1 5 3 3 5 1 5 6 5 6 6 3 5 5 6 6 2 6 4 1 5 6 3 6 5 5 1 3 2 4 5 1 1 21 | --> rolling dice used 33 random numbers 22 | Cards: 9c Ad 5d 7d Ah 8c Th Kd 5c Js 7c Kc Kh 6c Ks Tc Td 3d 7h 2d 5s 9s 23 | 3h As 9d 8h 4s 6h Ts 2c Jh 3c 8s 4h 5h 6s Jd 8d 3s 6d 7s 4d Ac Qc 24 | 4c 2h Qh 9h Qd 2s Qs Jc 25 | 26 | Round 3: 27 | 32bit: 0x114306f3 0xb9bf0d91 0x1aed8e5e 0x587de8b7 0x7477c8bd 0xd853ec9d 28 | Again: 0x114306f3 0xb9bf0d91 0x1aed8e5e 0x587de8b7 0x7477c8bd 0xd853ec9d 29 | Coins: HTHHTHHHHTHTHTTHTHTHHTHTTHHHTTTTHHTTTTTTHTHTTTHTHTTTHTHHHHTTTTTTT 30 | Rolls: 1 5 4 2 1 4 6 3 2 1 6 3 6 4 3 1 4 4 2 5 5 3 3 2 6 1 6 3 2 6 5 6 3 31 | --> rolling dice used 33 random numbers 32 | Cards: Ah 8d Ad Jd 2d 3h Jh 7c Kc Ks 3d As 4s 3s 8h Qc 7d Td 6c 8c 4d 5c 33 | 9d Qh Js Ac Kd 5s 6d Ts 9h 9s 9c 2c 5h 3c 5d Th 4c 6s 7s Qd 7h 2h 34 | Tc 6h 4h 8s Qs Jc Kh 2s 35 | 36 | Round 4: 37 | 32bit: 0xb982cd46 0x01cc6f94 0x0ad658ae 0xf6c6c97e 0xd1b772dd 0x0098599e 38 | Again: 0xb982cd46 0x01cc6f94 0x0ad658ae 0xf6c6c97e 0xd1b772dd 0x0098599e 39 | Coins: HTTHTTHHHHTHTHHHTTHTHTHTTTHTHTHHTHTHTTTTHHTTHHHTHTTHHTTTHHHTTHHHH 40 | Rolls: 4 4 5 4 2 1 4 2 2 5 2 5 6 6 2 1 6 6 2 6 6 3 6 2 1 4 1 1 1 1 5 1 5 41 | --> rolling dice used 33 random numbers 42 | Cards: 6s Td 3h Js 7h Jh Ac Kh Th 4h 3c 6d Qs Ah 8h Kc Tc 2h 8c 2c Jd 2s 43 | Qh 4d 3d Ks 7s 9d 5d 2d 5s 5h Jc 3s 9s Qd Qc 7d 6h As 8s 4s 4c 8d 44 | 9c 6c 5c Ad 7c 9h Kd Ts 45 | 46 | Round 5: 47 | 32bit: 0xef3c7322 0xa1ff2188 0x3f564b42 0x91c90425 0x17711b95 0xf43aa1f7 48 | Again: 0xef3c7322 0xa1ff2188 0x3f564b42 0x91c90425 0x17711b95 0xf43aa1f7 49 | Coins: HTTHHHTTHTTTHTHHTHTHTHHTHHTTTHTTHTHHTHTTTTTHTHTTHHHHTHTHTHHTHHTHT 50 | Rolls: 4 1 6 3 3 2 5 6 3 2 6 5 3 1 5 5 4 6 4 4 2 5 5 4 1 5 2 4 5 5 5 3 5 51 | --> rolling dice used 33 random numbers 52 | Cards: 6c 8d 4d Jc 9d As 9s 3c 9c Th Ks Qs 4c Js Ah Qc Ac Kd Td Qd Kh Kc 53 | Tc Jd 6s 5h 8c 8s Ad 5s 4s Ts 3h 3s 7h 7d 8h 2c 2d 5c 6h 2h 3d 7c 54 | 9h 7s 4h 2s Jh 6d Qh 5d 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg32_oneseq_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg32_oneseq_once_insecure: 2 | - result: 32-bit unsigned int 3 | - period: 2^32 4 | - size: 4 bytes 5 | 6 | Round 1: 7 | 32bit: 0x256b5357 0xa5efad32 0x170b7830 0x334a5b22 0x3de5c680 0x9b47b7b3 8 | Again: 0x256b5357 0xa5efad32 0x170b7830 0x334a5b22 0x3de5c680 0x9b47b7b3 9 | Coins: HTHTHTHHHTTHTTTTTTHHTTTHHTTTHHTTHHTHTTHHTHHTTTTTHTTTHHHHHHHHTTTTT 10 | Rolls: 5 5 5 1 5 6 5 1 3 4 5 3 4 5 4 5 2 5 6 4 5 4 4 5 5 6 4 3 6 3 5 4 5 11 | --> rolling dice used 33 random numbers 12 | Cards: 3c 5c Kc 6s Qh 7s Jh 4d 3s 5d 9h Th Qs 7h 4c 7c Qd 2d 3h 5h 2h 6c 13 | 6d Js Jd 9d 8s 9s 9c Qc Kh 8d 8c 2s Tc 4s Ac 2c Jc Ks As Ah 6h Ad 14 | Ts 7d 3d 8h 5s Kd 4h Td 15 | 16 | Round 2: 17 | 32bit: 0xd3ea68f3 0x004a141a 0x08de95da 0xe6f4f6ad 0x1023b258 0x0fdabaa1 18 | Again: 0xd3ea68f3 0x004a141a 0x08de95da 0xe6f4f6ad 0x1023b258 0x0fdabaa1 19 | Coins: HTHHTTHHHTTHTTTHTTTHHTHHHHHHHHTHTTHHHHTTTHTTHHHHTTTHHTTHHTTTHHTTH 20 | Rolls: 2 3 6 1 6 4 2 2 3 1 6 4 3 6 1 2 4 6 4 5 2 2 2 5 1 3 6 2 3 2 2 5 3 21 | --> rolling dice used 33 random numbers 22 | Cards: 6c Kc 5d Ac Tc 3c 7h Qh 7c 2c Kd 8c 2h Qs Qc 2s 6s Ts Jc 4h Ah 5c 23 | Qd 8d 4d Th 3d 7s 5s Jd 4c 9h 8h 6d 9c 9s 3s Td Js Kh 9d As 6h 3h 24 | 2d Ks 4s 7d Jh Ad 5h 8s 25 | 26 | Round 3: 27 | 32bit: 0x6a106195 0xe06d41b2 0xbfd78624 0xe0ef944f 0x57571028 0x10aae72d 28 | Again: 0x6a106195 0xe06d41b2 0xbfd78624 0xe0ef944f 0x57571028 0x10aae72d 29 | Coins: HHTTHHTHTTTHHTHTHTHHHTTHHHTTHTTHTTHTTHTTHHTTTHHHTHTHTHHHHTHHTHTHH 30 | Rolls: 4 6 1 3 1 6 6 1 4 5 1 5 5 6 2 4 6 5 2 5 4 6 4 3 5 2 3 6 6 3 1 2 5 31 | --> rolling dice used 33 random numbers 32 | Cards: 4d Jc 6d 2s 8c 7d Th 6h 5s 3c 3d Qd Ad 4h 2c 7s Tc 4s 3s Td 6s 9c 33 | 2d 7c 8d 8h Jh Ts 4c 2h 5c 5h Ac 8s Qs Kh Kc 6c Qc 9h 9s 5d Kd Js 34 | Qh 3h 7h Ah As Jd 9d Ks 35 | 36 | Round 4: 37 | 32bit: 0xdde49a52 0x79306ca7 0x2bb1673c 0xfde1d6ff 0x0b261fe8 0xe866fced 38 | Again: 0xdde49a52 0x79306ca7 0x2bb1673c 0xfde1d6ff 0x0b261fe8 0xe866fced 39 | Coins: HHHHTTTTTTTTHTHTHHTTTHHTHTHHHHHTTTTTTTHTTHTTHTTHHHHHHTHTHTHTHHTTT 40 | Rolls: 4 1 4 1 2 6 5 5 5 5 1 3 6 4 5 4 6 1 1 5 5 3 6 1 4 1 6 5 1 4 6 3 2 41 | --> rolling dice used 33 random numbers 42 | Cards: Td 7d 3h 2c 5s 6d Ac 8s Kc 5c 4s Qd 2s Kd As 6c 2d Kh 9c 3d 5d 3s 43 | Jd 8c 7s 4d 4h Qc 5h Js 7c 9s Ts Qh Ks 6s Th 8d 3c Tc 8h 9h Ad Jh 44 | Jc 9d 7h 2h Ah 6h 4c Qs 45 | 46 | Round 5: 47 | 32bit: 0x4253371d 0xcc6b3679 0xb8d7cd7d 0x9e7e0310 0xb1ee5e37 0x6cbff1d2 48 | Again: 0x4253371d 0xcc6b3679 0xb8d7cd7d 0x9e7e0310 0xb1ee5e37 0x6cbff1d2 49 | Coins: HHHTHHHTTHTTHTHHTHHTTHTTTHHTHHTTHHHTHHTTHTHHTTTTHTTHHHTTHHTHTTHTH 50 | Rolls: 2 2 3 2 1 4 4 1 2 4 6 3 2 5 5 4 1 2 2 2 3 3 2 2 6 4 6 4 5 4 2 4 5 51 | --> rolling dice used 33 random numbers 52 | Cards: Kh 4d 8d 5h 4c 8s 3s Qc Js Td Jc 6c 5d 8h 9s 3h Kc Ac Tc 8c 6s 7h 53 | Jd 7c Ad Qd Jh 9d As 2c 6d 4h Kd 4s Qs 7s Qh 9h 3d 6h Ts Ks 7d 5c 54 | 5s 9c 3c 2s 2h 2d Th Ah 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64.out: -------------------------------------------------------------------------------- 1 | pcg64: 2 | - result: 64-bit unsigned int 3 | - period: 2^128 (* 2^127 streams) 4 | - size: 32 bytes 5 | 6 | Round 1: 7 | 64bit: 0x86b1da1d72062b68 0x1304aa46c9853d39 0xa3670e9e0dd50358 8 | 0xf9090e529a7dae00 0xc85b9fd837996f2c 0x606121f8e3919196 9 | Again: 0x86b1da1d72062b68 0x1304aa46c9853d39 0xa3670e9e0dd50358 10 | 0xf9090e529a7dae00 0xc85b9fd837996f2c 0x606121f8e3919196 11 | Coins: TTTHHHTTTHHHTTTTHHTTHHTHTHTTHHTHTTTTHHTTTHTHHTHTTTTHHTTTHHHTTTHTT 12 | Rolls: 6 4 1 5 1 5 5 3 6 3 4 6 2 3 6 5 5 5 1 5 3 6 2 6 1 4 4 3 5 2 6 3 2 13 | --> rolling dice used 33 random numbers 14 | Cards: 3d 7d 3h Qd 9d 8c Ts Ad 9s 6c Jh Ac 5s 4c 2c 7s Kh Kd 7h Qh 6d Qc 15 | 8d Qs 6s Js 4d Kc 9h 3c 2h Td 5d 5h 9c 4s 5c 7c 3s 4h As Th 6h Jc 16 | 2s Jd Tc Ah 2d Ks 8h 8s 17 | 18 | Round 2: 19 | 64bit: 0x1773ba241e7a792a 0xe41aed7117b0bc10 0x36bac8d9432af525 20 | 0xe0c78e2f3c850a38 0xe3ad939c1c7ce70d 0xa302fdced8c79e93 21 | Again: 0x1773ba241e7a792a 0xe41aed7117b0bc10 0x36bac8d9432af525 22 | 0xe0c78e2f3c850a38 0xe3ad939c1c7ce70d 0xa302fdced8c79e93 23 | Coins: TTTTHTHTHHTHTHTTTTTHHTTHHHHTHTHHHHHHHTHHHTHHTHTTTHHHHTTHHTTTHTHTH 24 | Rolls: 6 1 1 5 4 1 5 6 3 2 4 2 2 4 6 2 1 5 2 6 2 3 1 5 1 1 5 4 4 2 3 6 3 25 | --> rolling dice used 33 random numbers 26 | Cards: As 2h 4d 7d Ad Qc 9s 7h Kh Jc 7c 3d 8c Th 9c Qd 9h Td 6d 8d Qs 5c 27 | 6s 8s Ac Kd 2d 3h Qh Tc Jh Ah 3s 4h 9d 8h Jd 4s 2s Ts 5s Kc 4c 5d 28 | 3c 6h 2c 6c 7s Js 5h Ks 29 | 30 | Round 3: 31 | 64bit: 0xc96006593aed3b62 0xf04d5afa3f197bf1 0xce6f729cc913a50f 32 | 0x98b5fc4fbb1e4aea 0x802dce1b410fc8c3 0xe3bac0a14f6e5033 33 | Again: 0xc96006593aed3b62 0xf04d5afa3f197bf1 0xce6f729cc913a50f 34 | 0x98b5fc4fbb1e4aea 0x802dce1b410fc8c3 0xe3bac0a14f6e5033 35 | Coins: HTTHTHTTTTTHTTTHHTHTHHTHHHHHHHHHTTTHTHTHTHHTTTTTTHHHHTHTTTTHHHHHH 36 | Rolls: 5 6 4 3 3 1 4 5 2 3 2 1 1 3 2 3 4 5 4 6 4 3 6 2 2 6 3 2 2 4 5 2 5 37 | --> rolling dice used 33 random numbers 38 | Cards: 5c 5d 9d 4s Qs Kh 2c 3h Ac 2s 7s 4c 6s 8h 9c 6d 2h 4d 3c 5h 6h Ad 39 | 7c Js Jd 6c 2d 3d 4h Kd 9s Th Kc 7h 8s Tc Qc Qd Jh Ks 8d Ts Ah Jc 40 | 5s As Qh 8c 3s Td 7d 9h 41 | 42 | Round 4: 43 | 64bit: 0x68da679de81de48a 0x7ee3c031fa0aa440 0x6eb1663983530403 44 | 0xfec4d7a9a7aec823 0xbce221c255ee9467 0x460a42a962b8a2f9 45 | Again: 0x68da679de81de48a 0x7ee3c031fa0aa440 0x6eb1663983530403 46 | 0xfec4d7a9a7aec823 0xbce221c255ee9467 0x460a42a962b8a2f9 47 | Coins: HHHTTTTHHHHHTTTTTTTHHHTHHHHTTHTTTHTTTTHTHHHHTHHTTTHHHTHHTTHHHTHTH 48 | Rolls: 3 5 6 3 6 4 5 6 5 6 1 1 6 6 5 5 5 1 6 4 6 4 5 1 1 4 4 4 3 5 6 1 6 49 | --> rolling dice used 33 random numbers 50 | Cards: 7c Kh 2d Qc Jh Js Kc Ks Kd 3d 8d 4s Jc 8c 9d 5c 9c Qh As Qd 3s Ac 51 | 3h 3c Ad 9h 6h Th Jd 5s 6s 7h 7d 7s 2c 2h 2s 6d 8h 4d Ts Tc 4h 5h 52 | 4c Ah 9s Td 8s 5d 6c Qs 53 | 54 | Round 5: 55 | 64bit: 0x9e0d084cff42fe2f 0x63cd8347aae338ea 0x112aae00540d3fa1 56 | 0x53968bc829afd6ec 0x1b9900eb6c5b6d90 0xe89ed17ea33cb420 57 | Again: 0x9e0d084cff42fe2f 0x63cd8347aae338ea 0x112aae00540d3fa1 58 | 0x53968bc829afd6ec 0x1b9900eb6c5b6d90 0xe89ed17ea33cb420 59 | Coins: HTTTTTHTHTHHHTHTTTHTHHTHHTHTTTHHTTHHHTTTTHTTHHTHHTHHHTTHHTHTHHHHH 60 | Rolls: 6 6 5 1 1 4 5 5 3 1 2 6 5 2 4 6 4 2 6 4 4 3 2 5 3 3 6 5 3 4 5 1 2 61 | --> rolling dice used 33 random numbers 62 | Cards: Jd Qh 8s 9h Kh 3c Ts Th Kc Kd 4s Ah 5h 4d Jc 7d 9c Ac 8c Ks 6s 2d 63 | Td Qc 2s 8h Tc 6c 3d 3h 4h 6h 7s Qs As 5d 3s 5c 6d 4c Js 5s 8d 9d 64 | 2c 9s 7h Qd Jh Ad 2h 7c 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_c1024.out: -------------------------------------------------------------------------------- 1 | pcg64_c1024: 2 | - result: 64-bit unsigned int 3 | - period: 2^65664 (* 2^127 streams) 4 | - size: 8224 bytes 5 | 6 | Round 1: 7 | 64bit: 0x200999d12bfbb05b 0x304c583ef1f0d4ec 0x58e7941ada40a827 8 | 0x43491a838632e10a 0x95c900affaf14524 0x7d8b6a3e06b3386c 9 | Coins: HTHHHHHHTHHHHHHHHHTTHTHHTTTHTHTTTHTTHTTTTHHHTHHHHTHTHHHTTHTHTHHHH 10 | Rolls: 3 6 6 3 5 1 4 6 5 3 4 6 1 1 2 6 3 6 5 5 6 6 6 2 5 5 5 5 4 2 6 4 1 11 | Cards: As 7c 3c 3s Qs 5s Kh Ks 2d Th 9c 8s Jh 6d 5d Ad 8d 9s 2c 2s 9d Jd 12 | Jc 7h 4s Ts Kd 6s Qc Js 3d Td 5c 8c Kc Ac 6c 4d Tc 2h Qd Qh 5h 7s 13 | 3h 9h 6h Ah 8h 4c 4h 7d 14 | 15 | Round 2: 16 | 64bit: 0x25fd681dcf01e40e 0x15b20d676e3c3ad8 0xd62454123f18447b 17 | 0xd2ed41a518ff61ba 0xf4625131fa78629c 0xcf5f2a2bc592ed41 18 | Coins: TTTHHHHTHTTTHHHTTHHHTHHHHTTHHTTTHHHTHTTHTTHHHTTTHTTTHHTTHHTHHTTHT 19 | Rolls: 1 5 3 5 3 1 5 5 5 3 5 2 1 2 2 1 4 5 3 2 3 6 5 5 2 4 1 4 4 2 5 2 6 20 | Cards: 8h 9h Tc 5c 8d 7h 4d 4h 5d 2s Ad 6d Qs 8c 9s 6h 4c Th Qc Jc 3d 7c 21 | Td Js 3c Qh 2h Kh Kd 7s 5h Ks 8s As 6c 3s 9c Ah Jh Jd Ac 3h 9d 5s 22 | 2c Qd Ts 2d 4s 6s Kc 7d 23 | 24 | Round 3: 25 | 64bit: 0x7246882f97ca618d 0x6bfacfdb29810ed3 0xece86a774cd51bfd 26 | 0x52ef744f62744c94 0x62567a265fafb889 0xe1b1c00d183ee96a 27 | Coins: THTHTHTTHHHHTHHTTHTTHTHTTTTTTHHTTTTHHTTHHHHTTTHTHHHHTHHHHHTTTTHTH 28 | Rolls: 1 5 1 6 6 4 3 4 2 2 6 1 6 5 1 1 3 3 3 3 6 5 1 1 4 2 5 4 4 3 6 4 4 29 | Cards: Td 4d Th 5h 3d Kc 9s 3s 4c 7c 4s Jd 7s Ac Ts Qh 2h 4h As 3h 5s 9c 30 | 8d Qs Qd Qc 8s Js 2s Ad Jc 6d 2d 9h 2c 7h 8h Jh Tc 9d 5c 6c Ah Kh 31 | Ks 3c Kd 8c 7d 6h 6s 5d 32 | 33 | Round 4: 34 | 64bit: 0x8c19c475c51bd13b 0xd283cb08853371e7 0x123c48d92fa977f2 35 | 0xcac972ff67005a54 0x2db2dd6e5f4cbba6 0xf22c80b048063362 36 | Coins: TTHTTTHTHHHTHTHTTTTHHHHHHTHHTTTTTTHHTTHHHHHHHHTTTHTTHHHTTHTTTTTHT 37 | Rolls: 5 1 4 3 4 5 5 4 1 6 2 5 5 1 3 4 2 3 3 6 2 1 3 3 5 5 3 2 6 4 6 2 1 38 | Cards: Ah 4s 3h 6d Ad 3d Ks 3s Kh 4c 4h Kc Jd 6h 8d Qs Tc 4d Qd 5s Kd 5h 39 | Ts As 9h 7h 9d 2d 3c Td Th 7d 8s 7s 8c Js 2h Jh 2s 9s Qc 5c 6c 9c 40 | Ac 7c 5d 6s 2c 8h Jc Qh 41 | 42 | Round 5: 43 | 64bit: 0xcd297aeff4ebb56a 0xe7bac4baf02a88ae 0xb309261fdd99f0ee 44 | 0x22801c7fe80eb42f 0xcf1a7245e5c59690 0x6aee2db8a6176987 45 | Coins: TTTHHTTTTHTTHHTTTTTHHHHTTTTTHHTTHTHHTTTHHTHTTTTHHTTTHTTTTHTTHTTHT 46 | Rolls: 3 3 5 2 1 1 2 5 4 3 3 4 6 5 3 2 4 3 2 6 6 2 3 5 4 2 2 5 6 2 5 6 4 47 | Cards: 2c 3c Kd 2s Qs 6d Ad Qc Kc Js 3h 4c Jc 5h 9c 7h 8h 9s Ks Th 2d 9h 48 | Qd 7d 8d 8s 4d Tc Ah 5s Jd Ac 7s 6c 7c 2h 6s 8c 4s Qh 5d Td 5c Ts 49 | 9d Kh 3s As 4h 3d Jh 6h 50 | 51 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_c1024_fast.out: -------------------------------------------------------------------------------- 1 | pcg64_c1024_fast: 2 | - result: 64-bit unsigned int 3 | - period: 2^65664 4 | - size: 8208 bytes 5 | 6 | Round 1: 7 | 64bit: 0x55da58820315b3ac 0x023660d88886b4ad 0x7f0d3cf17d612bc5 8 | 0xc8dd682283a63192 0x529779d196589320 0x72a700ae18ab8763 9 | Coins: HHHTHTHTHHTHHTHTHHTHHHHHTTHHHHTTHHTTHHHHTHHTTTTTHHTHTHTTTTHHHHTTH 10 | Rolls: 2 4 4 2 4 4 2 2 3 1 6 2 1 6 5 6 4 3 5 3 2 3 6 6 5 2 3 6 6 6 3 6 6 11 | Cards: 9h 8c 6h 5s As Td Js Ah 5d Qh 6s 2d Kh 3h 7s 7h 8s Tc Jc 5h 2c 8d 12 | Ad 3d 3c 7d 6c Kc 5c 6d Qd 2s Qc Jh 9s 4c 7c Ts Th 2h Ks 9d 4s Jd 13 | 4d 3s 4h Qs 9c Kd 8h Ac 14 | 15 | Round 2: 16 | 64bit: 0xacc17347a5e62cfb 0xbd254b04c901de89 0xd04990b28a2de92c 17 | 0xa18498a3c28e7579 0x2da084ee4056e2fd 0xe087775f49f66d33 18 | Coins: HHTHHTTHHTHTHHTHTHTTHHHHTTHHHTTTHTHTHHHHHHTTTHTHTTHTTHTHTTHHTHTHT 19 | Rolls: 5 4 2 4 2 2 2 6 5 1 6 1 1 2 1 6 1 6 4 1 4 6 6 3 6 2 3 6 4 2 4 4 2 20 | Cards: 3s Ac 3h Td Jh 2d 3c Qc 7d 9d 2c 8h 4c 6d 7s Js 9c 4h 5h 2s 2h 7h 21 | Kc 6h Qs 5s Ts Qh Ad 9h Tc As Ks Qd Th 8d 9s Kh 8c Kd 4s 7c Jc 6c 22 | 3d 5c 8s Jd 5d Ah 4d 6s 23 | 24 | Round 3: 25 | 64bit: 0x36adb072902e8a7f 0xb0ecc5bbd3a64e7d 0x2849bc91170b00f6 26 | 0xf5c2550ebb3fe21f 0x4ee68fc51aa05b8d 0x4e34d4b191ccecb1 27 | Coins: HTHTHHTTHTTHTHTTTHHHHTHTHTHTHTTTHTTHTHHTTHTHTHTHHTHTHHTHTHHHTHTTT 28 | Rolls: 2 1 5 6 3 2 5 3 6 4 3 4 3 1 4 2 5 1 5 1 1 2 1 6 3 5 5 3 5 5 2 5 5 29 | Cards: Jc 7s Th 3h 2c 8h Qs Ah Td Ac Tc Ad 5s 7d Kh 2s Jd Qc Kd Ts 9d Kc 30 | 6s 4s 5d Ks 5h 2h 2d 4h 3d Js 4c 9h 6c Jh 5c 4d Qd 8d 9s As Qh 3c 31 | 8c 7h 6h 8s 6d 3s 9c 7c 32 | 33 | Round 4: 34 | 64bit: 0x11f84c40c21e0095 0x9b2997036eb49e12 0xa38479388dc5edbc 35 | 0xe5be8c81f92df921 0xe37566cbb95fa05b 0x316f422cb4d4c6c7 36 | Coins: HHHHTTTHTTHTHTHHTTHTTHTHTTTTHTTHHHTTHTTHTTHHTHHTTTHTTTTHHHTTHHTHT 37 | Rolls: 1 6 6 5 4 6 6 2 2 2 2 3 5 3 4 4 2 5 1 5 4 1 1 4 3 2 4 4 6 2 1 6 6 38 | Cards: 6d 4c As 6c Ac 9c 4h 8s 3s 7d Qh 2h Ah 2c Kc 9d Tc 5s Js 9h 8h 7c 39 | Jd 3h 4d 6h 2s Qs 2d 5d Qc 8d Th 6s Qd Kd 5c 3d 5h Jh 7h Td 7s Ad 40 | Jc 8c Kh Ts 4s Ks 3c 9s 41 | 42 | Round 5: 43 | 64bit: 0x4a9b182682cc6f6c 0xad05fd2a2371d288 0x35aeda738467fa7a 44 | 0xb31217ade0c408d7 0xbe558337184cc9bb 0x53dc9a7087a99250 45 | Coins: THHTHTHTHTTHHTHHTTHTTHHHHTTHHTHTTHHHTHHHHHTTHHTHTTTTHTHTHHTTTHHHT 46 | Rolls: 5 4 2 1 5 3 5 3 1 3 5 4 5 3 6 2 2 2 4 4 3 4 5 2 5 4 1 6 3 3 1 1 1 47 | Cards: 3h Qc 3s 7c 7s 4h 9d Js Kd 2d 6h 8h 9h 5d 6s 9s 5h Ks Jc Qd 4d 7d 48 | 4s Jh Td Kh Jd 8s 4c 5s 2h 5c 2c Ac As 8c 7h Qs 6c 9c 6d Th Ts 2s 49 | 8d Tc 3c Qh Kc Ah 3d Ad 50 | 51 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_c32.out: -------------------------------------------------------------------------------- 1 | pcg64_c32: 2 | - result: 64-bit unsigned int 3 | - period: 2^2176 (* 2^127 streams) 4 | - size: 288 bytes 5 | 6 | Round 1: 7 | 64bit: 0x6a202138d9ee51c5 0xa0e544ab585ba357 0x45c954470b9ca7eb 8 | 0xbaa3e4f04003b756 0x69fc867f81c36264 0x79080620c60f42f1 9 | Coins: HTTHHTTHTHTTTHHTTHTTHHTHHHHHTHHTTHTHTHHHHHTHHTTHTTHTTTTTTTHTHTHTH 10 | Rolls: 6 3 1 2 5 1 6 5 5 4 1 1 1 3 4 5 3 3 5 5 2 5 3 5 2 3 2 3 6 6 5 1 4 11 | Cards: Jh 8c 2d Kd Jd 4h 8d 3c 5d 6h Kc 9h 3h 4s 5c 6c Th Ad As 2c 4d Qc 12 | Js Qs 7c 5s 9s Tc 9d Ts 3d 7d 2s 3s Qd 9c Ks Ac Jc Ah 6s Td 7h 2h 13 | Kh 7s 8s 5h 6d 4c 8h Qh 14 | 15 | Round 2: 16 | 64bit: 0xa0f1d0aca239a53b 0x898fe5131e4ccb68 0xf75d2bf2ace26841 17 | 0xb8ae157b92baa061 0x5d81af69594697df 0xdce14e9cff8ec370 18 | Coins: HHTHTTTHHTHTHHTHHHTTHTTTTHHHTHTHHTHHHTTHHTHTTTTTTTHTHHHTHHTHHHTHH 19 | Rolls: 1 3 3 3 6 2 3 1 5 4 2 1 6 5 1 6 5 6 5 4 5 3 5 5 1 2 6 4 3 1 6 3 1 20 | Cards: Kd Ah 2d 3c 4c Jc Jd Qc Ks 6d 9c 4h 2c Ts 8h 3s 4d 8s 7s Tc 6s 4s 21 | 5c Ac 3d 5d 5s Qs Kh Td 7d 2s 7h Jh 5h Th 9s 7c As 6h Kc 2h 8c Qd 22 | 8d 9h 3h 6c Js Ad Qh 9d 23 | 24 | Round 3: 25 | 64bit: 0x91b7889987aa1ec6 0x0ed5084055a71e1e 0xd9235ff37902ab6e 26 | 0x3f587978e907a6e4 0xa4b0d25c45e6a5b6 0x1d5af98fe7046ebc 27 | Coins: HHHTHHTTHTHTTTTHTHHHTHHHTTTTTTHHHTTHHTHHTTHTHHTTHTTTTTTHHTTTHTHHH 28 | Rolls: 2 5 1 2 4 4 2 6 2 5 4 6 5 4 3 3 6 1 1 5 1 3 5 4 4 3 6 3 4 5 3 5 6 29 | Cards: 3d 9h Jc 8s Qc 5h Ks 5d 6h Jh 9c Jd 5s 4d 2c Js 9d 5c 9s 7s 7h 3h 30 | As 4c Kd 6c 2s 7d 8d Ah Tc Ad Ac Qd 3s 6d Kh 3c 8c Td 2d Qs 4h 8h 31 | 2h Qh Th 6s 7c 4s Ts Kc 32 | 33 | Round 4: 34 | 64bit: 0xb9bd5d2cdacdda6d 0x8df76d5c83998fdd 0x47ffde0b04c8e4c7 35 | 0xc0f51b1946a32345 0x327d52590dcae958 0x8fd4cf60789eec4a 36 | Coins: HHTHHHTTTHTHTHHTHTTHTTHHHHTHHHTTHTTHTTHHTHHTTHHHHTHTHTTHHHHHHTTTT 37 | Rolls: 5 2 1 2 3 6 6 4 1 3 5 4 2 2 4 5 6 4 2 3 5 5 5 5 4 5 4 3 2 2 2 6 2 38 | Cards: 8s 9c 3d Js 5s 7c 2d 6s 7s 6h Ts As 4h 4d 7h Tc Jh 6d Qs 3h Ks Th 39 | 5c 5d Td Kh Ad 8h 3s Qh 8c 2h 2s 6c 5h Jd Ac 3c Qd 7d Jc 9d 8d Ah 40 | 4c 4s 9s Qc 2c Kc 9h Kd 41 | 42 | Round 5: 43 | 64bit: 0x087140d144b810b7 0x56fb1cc84113d2da 0xc92332d25992ed0a 44 | 0xc47bbb3a90cea863 0x3d73ce0952a62a2b 0xd7e60982f60a00aa 45 | Coins: HTHHTHHHHTTTHHTTTTTHHTHHTHTTHTTHTHHTTHTHTTTHTTHHTHHHHTTTHTTHTHTTH 46 | Rolls: 6 4 1 6 1 5 3 4 2 6 6 5 6 3 3 2 4 6 6 6 6 1 1 1 3 6 5 2 4 4 6 2 2 47 | Cards: 5d 9s Qs Ts 6h 7h Qc 4s 2c 7s Kc 2d 3d Qd 8d 4d 7d Jc 9d Jh 6s Th 48 | 2s 3h 5c Td 9c Js Jd Ad 6c Ac 3s 8h 8c Kd 5h 2h 3c 9h Qh 5s Ah 4h 49 | 6d 8s As Tc Kh 7c 4c Ks 50 | 51 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_c32_fast.out: -------------------------------------------------------------------------------- 1 | pcg64_c32_fast: 2 | - result: 64-bit unsigned int 3 | - period: 2^2174 4 | - size: 272 bytes 5 | 6 | Round 1: 7 | 64bit: 0x8c3dcea9a8ec012a 0xa3e7dd5265ee932a 0x12ad974d3d6acc0c 8 | 0xb43c7893cb23f33c 0xce33b533163330c6 0x8760bf8099dc52f3 9 | Coins: THTTTTTTTHHHHHTHHTHHTTHHTHHHHHHHHTHHHTHTHHHTTTHTTHTTTHHHHHHTTHTTT 10 | Rolls: 5 3 3 3 3 3 2 5 5 5 2 5 1 1 2 6 1 3 2 4 6 5 2 3 1 1 1 3 5 1 4 6 3 11 | Cards: Ts 2h Ac Jd As Kc Jh 2c Kd Ks Qs 5h 4d 7d Ad 3s 3d 4c 7s 3c 5d 3h 12 | 8s Tc 9s 8h Qc 2d 5s Th 9d Qh 5c 6s 9h 7c Qd 8d 6h 4s 9c Kh Td 6c 13 | Ah 8c Js Jc 2s 4h 6d 7h 14 | 15 | Round 2: 16 | 64bit: 0x1365608a27ecbe73 0x1710ffa1040e1777 0x73bc625a07e2a046 17 | 0x4b7559ba56e977e4 0xbb21240566940491 0x6abfbecb80b1ff1d 18 | Coins: TTHHHTHTTTTHHTHHHTTTTHTHHHTHTHTTTHTHTHHHHTHHHHTTTHHHHTTTTHHHTHHHT 19 | Rolls: 6 6 6 3 5 3 2 1 3 6 3 3 2 3 1 1 6 2 4 3 2 2 5 3 5 3 3 1 3 3 5 2 6 20 | Cards: 5c 8c Ts 9h 9c 8s Js 7s 6d 4c 4d 3d Qs 9s Ah 8d 7c 6c Kh 6h 3c Td 21 | 2h Ac Ks 3s 9d Th 2d 5h Kc Ad 6s Kd 8h Qh 4s Qc Jd 7d 5s Jh 2c 3h 22 | 7h Qd 4h As 5d Jc 2s Tc 23 | 24 | Round 3: 25 | 64bit: 0x2da6bd5828fedd55 0x9360e79d3218b8ce 0x7a9ca1bfb4ae99fa 26 | 0xdb7e60857a9bb076 0xed1bdd0db1089228 0x039882d1422cbc3d 27 | Coins: HTTHHTTTHHHTHTHTTTTTTTHHTHHTTTHHTTHHHTHTHTHHTTHTHTTTTTHHHHTTHHHTH 28 | Rolls: 6 1 4 3 4 6 1 2 3 1 1 6 5 6 2 5 2 3 3 5 2 1 1 4 6 2 5 3 1 4 6 2 2 29 | Cards: 2c Jd 5s Ks 3h 5c 2h 8h 5d 9c 6c Qh 3d 2s Tc 6h Ac Qd 7c Jc Jh 4h 30 | 4s 6d 7h 5h 4d As 3s 8c Qc 3c 7d 9h 4c 8d Kd Kh 9d 6s 8s Td Ah Qs 31 | Kc 9s Ts 2d 7s Th Ad Js 32 | 33 | Round 4: 34 | 64bit: 0xcf2b14d23f2c5e0c 0x46ff4fe90f397ca0 0x563c15e615148eed 35 | 0x517a7e4a24bdcc9e 0x627bd4295ec1ca63 0xf215acf4ee0dda66 36 | Coins: HTHTHTHTHTHHHHHTTHTHTHTTTHTTHTHHHTTTHTTHHTHTTTTTTHTHHHHHTTHTTTHHH 37 | Rolls: 2 6 4 2 5 3 1 1 1 2 5 2 6 5 1 1 4 6 5 1 1 2 6 2 6 1 3 1 4 5 4 5 5 38 | Cards: 9d 2s 9h 5d 6s Ad Kd 6h Qh Jd 3h Ts 8s Jh Qs 7c Kc Kh 4c 7d 6d 8d 39 | 5h 5c 7h 3s Jc 4s 2d 3c As 4d Qd 2c 9s 5s 2h Tc 8h Js 9c 8c Ac 7s 40 | Td 4h Ah Qc Ks 6c Th 3d 41 | 42 | Round 5: 43 | 64bit: 0xc843447bfaca04a4 0x438faa7f4fd7fd4b 0x3734fddb3819962d 44 | 0xe2db1ef1e551c13c 0xbe6c37b5b98bab8d 0x53c0265dab44b2b1 45 | Coins: THTTTTTTTTHTTTHTTTHHHHHTTTHHHTHTHTHTTTTHHTHTTHHTTTTHHHTTHHTHTTHTH 46 | Rolls: 2 3 6 3 3 4 6 4 5 5 1 6 1 1 2 4 1 6 6 2 6 4 6 3 2 4 4 3 1 2 3 3 3 47 | Cards: 9c Td 7c 7h 8h 2s Ac Kh 2d 8c 9s Js 9h 5c 5h 6d 6h 4h Qs 4d Kd 8d 48 | 3s 3d 4c Th Tc 6c Ts 5s 3c 7d 3h 2c 7s 2h Jc 4s 6s Ks 5d Ah Qc Kc 49 | 9d As Qd 8s Jd Jh Qh Ad 50 | 51 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_c32_oneseq.out: -------------------------------------------------------------------------------- 1 | pcg64_c32_oneseq: 2 | - result: 64-bit unsigned int 3 | - period: 2^2176 4 | - size: 272 bytes 5 | 6 | Round 1: 7 | 64bit: 0x676b3134f9ebe60f 0xe59f0e55fe310920 0xf7321efeda8b40cb 8 | 0xda90bfd7e3230978 0x641802497d52fda0 0xd96e3fb921e8b33d 9 | Coins: HTHHTTTHTTTHHTHHTHHTTTHTTHHHHTTHTTTTTHTTTTHTTTTTHTHHTTTHHHHHHHHHT 10 | Rolls: 2 3 3 2 2 6 5 1 2 2 5 2 5 4 4 2 1 6 6 2 6 2 4 6 4 4 2 3 6 6 4 4 3 11 | Cards: Ts Qh 4d Ad 9d 8d 6c Qd 4s 7c 8s 9h 8h 2s Ks 5d Ac Tc 4c Js Kc 5h 12 | 2h 6s 3h Qc 2d 6h Td 6d Qs 3c Ah 9c Th 2c 3d 7s Jd Jh 7h 7d Kd 5c 13 | 5s 4h 8c As Kh 3s Jc 9s 14 | 15 | Round 2: 16 | 64bit: 0x512b5aafa488800c 0xfdee3c27da7686a9 0x41fe7ffbc0a8ef66 17 | 0xe76b420836ecccc7 0x1083b5aec0846e99 0x40a0f567b36dc10f 18 | Coins: HHTTTHTHTHTHHTHHTTHHTTHTHTTTHHHTTHHHTTHTHHHTTHHTHTHTTHTHTHTTTHTTH 19 | Rolls: 3 5 3 4 4 2 1 4 1 1 6 1 1 1 3 6 2 1 6 3 5 6 6 3 3 6 2 6 2 2 6 6 4 20 | Cards: 3c 8h 5s 6s Ts 7h Ac 2d 2s Ks Qs Kc 7s Td Qd 4h 7d 9d 2c Kh 6h 3h 21 | 4c Jh Js As 8c 6c 7c Qh Ad 8s Jc 5d 4d Th 9s Qc Ah 2h 3d 4s Tc 3s 22 | 5c 6d 9c 5h 8d 9h Kd Jd 23 | 24 | Round 3: 25 | 64bit: 0x2dbd95ce2bb203e2 0xa38f7b3be5eb97d3 0x4f343774560b7753 26 | 0xf0a9e5743a450957 0xe31ff462c5c9b5ae 0x5a1c3ec0609a8cb1 27 | Coins: HHTTHHTTHHTHHHTTTTHTHTHHTHTHHTHHTHTHTHHHTHTTHHTHTTHHHHTHHTTTHTTHH 28 | Rolls: 3 3 1 1 3 6 5 3 5 2 5 2 2 1 1 4 6 1 3 2 1 2 4 3 3 5 1 4 4 5 6 6 1 29 | Cards: 4d 9s 6h 5d 8c Ks 6s Qc 2s Qh 2d Td 9c Jd As 6c Th Ad 8d Ah 2h Kh 30 | Kc 7s 3h 8h Jc Qd Jh 5s 8s 9d 6d 5c 2c 4s Kd 5h 7h 3c Js 7d 9h 4h 31 | 3d 3s Ts Ac Qs 7c Tc 4c 32 | 33 | Round 4: 34 | 64bit: 0xfb8eab4ddeff6324 0x41403a4419e4cf9a 0xbaf19e0432c6062f 35 | 0xc89ade15d828ef9a 0xf14e9ab7f6fd226e 0xf40d5df6e172b649 36 | Coins: HTHHTTHTHHTTHTHHTHHTHHTTHTTHHHTTTHHHHHHHTTTHTTTHTHTHTTHHHTTTTHHHT 37 | Rolls: 2 6 6 2 1 3 4 1 1 3 1 4 2 4 1 1 3 4 1 4 3 6 5 2 2 5 6 6 3 3 2 6 5 38 | Cards: 7s 3c 7c Qs Kd Js 4d 8d 3d Ah 5d 9d 9s 6s 7d Kc 6h Jc Ac 2h Th As 39 | Ad 6c Kh 7h 3h Jh 2c Qd Tc 6d 5s 5h 9c 9h 4s Ks 2s Qc 8c 4c 4h 5c 40 | 3s Td Qh 8h 2d 8s Jd Ts 41 | 42 | Round 5: 43 | 64bit: 0x1109ba6f20c9c9b9 0x4fcc9e6d4bf4cbd3 0xcd8ae4b2edbe29bd 44 | 0x59a447b4fdd0e5ba 0xaf03a68ef8b853a3 0x8b6e215c53d25ad9 45 | Coins: TTHHHHTTHTTTHHTTHTTTTHTHTTHHHTTHTTTHHHTTHTTHTTHTHHHHHTHTHTTHHHHTH 46 | Rolls: 6 6 3 1 3 2 2 1 4 5 6 6 4 2 1 5 1 5 3 4 6 2 1 1 5 1 1 4 2 1 1 3 2 47 | Cards: 8h Tc 3h Kd Th Qd 2d 9h 4h 8d 9d 5s 7h 7s Jd 9c 6h 4s 4d 2s 8c 9s 48 | 5h Qc Td 5d 3c Ks Qs 6c 5c Js Jc Ac 3s Kc 6s Ad Ts 3d 2h 7c Qh As 49 | 6d 4c Ah 2c 8s 7d Jh Kh 50 | 51 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_fast.out: -------------------------------------------------------------------------------- 1 | pcg64_fast: 2 | - result: 64-bit unsigned int 3 | - period: 2^126 4 | - size: 16 bytes 5 | 6 | Round 1: 7 | 64bit: 0x63b4a3a813ce700a 0x382954200617ab24 0xa7fd85ae3fe950ce 8 | 0xd715286aa2887737 0x60c92fee2e59f32c 0x84c4e96beff30017 9 | Again: 0x63b4a3a813ce700a 0x382954200617ab24 0xa7fd85ae3fe950ce 10 | 0xd715286aa2887737 0x60c92fee2e59f32c 0x84c4e96beff30017 11 | Coins: HTTTTTTTTTTTHHTHHHHHHTTHTHTTHTTTTTHTTHTTHHHHTHHTHHHHHTTTHHHHHHHHH 12 | Rolls: 4 5 5 4 4 4 5 4 3 1 6 1 6 6 2 6 2 2 3 3 2 5 6 4 2 6 4 4 3 2 4 2 6 13 | --> rolling dice used 33 random numbers 14 | Cards: Jh Jc 2h 4h Kd 2c 4d 5c Kc 8c 7h Td 9s 4s 2s Jd 8s 6h Qd 6d 9c Qh 15 | Tc 3h 7c 2d 4c 3s Qc 5s 8d 9d Ah Ac 3c 6s 5h 7s Ks Th 5d Ad Js Kh 16 | 9h Qs 6c 3d 7d 8h As Ts 17 | 18 | Round 2: 19 | 64bit: 0x824eb71d0f02dfb4 0x7aaad63730e335c1 0xf87271e197a74023 20 | 0x86d11317e615a346 0xe067147998450163 0x59fc13368ae72993 21 | Again: 0x824eb71d0f02dfb4 0x7aaad63730e335c1 0xf87271e197a74023 22 | 0x86d11317e615a346 0xe067147998450163 0x59fc13368ae72993 23 | Coins: TTHHTHTHTTTHTTTHHHTTTHTTHTHHHTTHHTHHTHHTHTTHTTHTHHHTTTTHTHTTTTTHH 24 | Rolls: 1 5 2 5 1 5 5 3 3 3 5 6 3 5 2 4 1 2 1 4 6 2 5 2 2 4 3 6 5 1 2 5 5 25 | --> rolling dice used 33 random numbers 26 | Cards: Th Qs 2c 4d Jc Jd 4c 2h 4s Tc Kh 6d 3c 7s 5c 6c 6h Kc Qh 6s 2d 4h 27 | 9s 8c 3s 9c 7c 8d Kd 7d Ac 3h Qc 5s 5h As 8h Ks Ts 8s 9d Qd Js Td 28 | Jh 2s Ad 7h 9h Ah 5d 3d 29 | 30 | Round 3: 31 | 64bit: 0xaf64b2a730ffd1b9 0xef9f2e946e08fbe3 0x181b81b6a0b5bee2 32 | 0x219851c742250cf4 0xb459875e221e7df5 0xe7518dd5d411bae8 33 | Again: 0xaf64b2a730ffd1b9 0xef9f2e946e08fbe3 0x181b81b6a0b5bee2 34 | 0x219851c742250cf4 0xb459875e221e7df5 0xe7518dd5d411bae8 35 | Coins: HTHHTHTTTHHTTHHTTTTHTTHHTHTTHHHTTHTTHHHTTTHTTTTHHHHHTTTTTHHTHTTTT 36 | Rolls: 1 3 6 6 2 1 1 4 2 5 1 3 1 5 1 5 1 6 2 3 1 2 3 4 2 4 5 4 2 2 4 5 2 37 | --> rolling dice used 33 random numbers 38 | Cards: Jc Jh 2s 3s Ac 5s Td Kc 7s Th 7d 5h 3d As Qd 4h 3h Js 4c 5d Tc 4d 39 | 8s Ah 6h 5c 2c 7c 3c Qs 6s 2h Ks Ts 9c 2d Kd 6c 8h Qh 9s Ad 9d 4s 40 | Jd 8c 7h 6d Qc 8d Kh 9h 41 | 42 | Round 4: 43 | 64bit: 0xe7e1d1711485e473 0xc0c6d1f0e72a55d3 0x2d0fa33eb3638524 44 | 0xd0cb8d73a16deacd 0x3e410a9cc7682918 0x8df7d57b4d2f9ac4 45 | Again: 0xe7e1d1711485e473 0xc0c6d1f0e72a55d3 0x2d0fa33eb3638524 46 | 0xd0cb8d73a16deacd 0x3e410a9cc7682918 0x8df7d57b4d2f9ac4 47 | Coins: THHTHTHTHHTHTHHTTHTHHTHHHTTTHTTHHHHTTTTHTTHTTHTTTTHTHHHTHTTHTHTTH 48 | Rolls: 5 4 3 2 6 2 6 6 2 3 1 3 1 6 2 4 3 6 6 6 4 1 4 6 5 1 3 6 3 5 1 6 1 49 | --> rolling dice used 33 random numbers 50 | Cards: 3d 4h 2d 8d Js Qs 3s 4d 9h Ks Tc Qc Qh 9c 7s 6s 6c Th 6h Ts 9s Jh 51 | 2s 7c Td Ac Jc 8c 6d 4s 9d As 7d 5h 3h 2h Ad 4c 8s 8h 5s Kh Ah Kc 52 | 3c Jd 5c 7h Kd Qd 5d 2c 53 | 54 | Round 5: 55 | 64bit: 0x2a2d820a8f859ba2 0x1a74e59c8e288526 0x6b856b08000af65c 56 | 0x793c0d4103ce2a55 0xc5081bea922d1d0c 0x6b61da59d73efbf9 57 | Again: 0x2a2d820a8f859ba2 0x1a74e59c8e288526 0x6b856b08000af65c 58 | 0x793c0d4103ce2a55 0xc5081bea922d1d0c 0x6b61da59d73efbf9 59 | Coins: HTTHTHTTHTTTTTHTHTHHTHTHHHTHHHTTHHTHTTTTTHHHHHTHHHTTTHHTTTTHHHHHH 60 | Rolls: 4 4 1 3 5 3 1 3 4 3 1 4 2 5 6 2 2 5 6 3 4 2 4 5 6 6 4 2 4 3 1 5 1 61 | --> rolling dice used 33 random numbers 62 | Cards: Ks Ah Ac Ad 3d 9h 7c 3c 7d 3s Th 2d Jh 7h 5h Td 8d 6c Kd 2h Jc 9d 63 | 8s 2c 8h 4h Qd 6d 5c Js 5s 9c As 4s Jd Kh 2s Tc 8c 5d Qh 3h Qc 6s 64 | Kc 7s 4d Ts Qs 6h 4c 9s 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_k1024.out: -------------------------------------------------------------------------------- 1 | pcg64_k1024: 2 | - result: 64-bit unsigned int 3 | - period: 2^65664 (* 2^127 streams) 4 | - size: 8224 bytes 5 | 6 | Round 1: 7 | 64bit: 0x8d9706afa56d17d4 0x44a818481d01d2df 0x3a13d5e1754b6a96 8 | 0xc21dcf2b4a6a4655 0x59c706aa47a07c78 0x7f0fc2a85642e319 9 | Again: 0x8d9706afa56d17d4 0x44a818481d01d2df 0x3a13d5e1754b6a96 10 | 0xc21dcf2b4a6a4655 0x59c706aa47a07c78 0x7f0fc2a85642e319 11 | Coins: HHTHHHTHHTHHTHHHHTHHTTTHTTHTHHTTHTHHTTHTTTHHHHHHHTHTTHHHTTHTHTTHH 12 | Rolls: 4 5 4 3 2 4 3 5 1 3 6 4 3 6 6 1 6 4 6 4 6 1 5 3 6 1 5 2 4 6 1 3 6 13 | --> rolling dice used 33 random numbers 14 | Cards: 3h 5d 8s Kh 8d 9c 7s 2h 6c 6s Ac 8h Jc Ks Qh Td 5h 4d 4h 9h Ah Th 15 | 6d Jd 2d 3s 8c 2c 3d Js 7d 7c 4s 3c Ts 9s 7h 6h 5s 9d 4c Kc Qs 2s 16 | Kd 5c Jh Qc Ad As Qd Tc 17 | 18 | Round 2: 19 | 64bit: 0x50638899fce02849 0xb7ce1bddfaba4e10 0x64b3829fcd739931 20 | 0x66fd9a2569fcd08a 0x96976fd1c0d8cbb4 0xcdf58a9c465c4abf 21 | Again: 0x50638899fce02849 0xb7ce1bddfaba4e10 0x64b3829fcd739931 22 | 0x66fd9a2569fcd08a 0x96976fd1c0d8cbb4 0xcdf58a9c465c4abf 23 | Coins: THTTHHTTHHTHHHTHTHHTTHTHHTTHTHHHHHHHHTTHTTHHTTTHHHTTHHHHTTHHTTTTT 24 | Rolls: 5 1 2 1 6 5 4 5 4 5 4 2 3 1 3 1 5 1 5 3 2 1 2 3 6 5 5 3 1 2 5 4 3 25 | --> rolling dice used 33 random numbers 26 | Cards: Td Ad 2c 7c 7h Jc 3s 6s Ts 8s 9h 4s Qd Ah 4h Ks Tc 6d 6c Qc 2d Jd 27 | Kd 2s 6h 7s 3d 5h Ac 4c Kc 9c 2h 9d 5s 8h Qs 7d 8d Jh 3h 5c 4d Qh 28 | 3c As 8c 9s Kh Js Th 5d 29 | 30 | Round 3: 31 | 64bit: 0xeaceeac7d52650bd 0xf38d15184cc47e50 0xbf1ad446c85f7e68 32 | 0x4dbcfd5bc51f94ef 0x78d33a2bb1990870 0x2db896fdc9338bdb 33 | Again: 0xeaceeac7d52650bd 0xf38d15184cc47e50 0xbf1ad446c85f7e68 34 | 0x4dbcfd5bc51f94ef 0x78d33a2bb1990870 0x2db896fdc9338bdb 35 | Coins: HTTTTHHTHTHHHHTHTTTHTHTHHHHTHHHTTHTTTHTHTTTTTTHTHTHHTTHTTHHHHTTTH 36 | Rolls: 5 2 2 1 6 5 5 5 6 3 4 3 1 3 5 2 2 5 5 2 3 6 3 5 6 5 4 2 5 5 2 6 3 37 | --> rolling dice used 33 random numbers 38 | Cards: Tc Th 6d 8s Qd 4s 9h 9d Kc 3c 8c 8h 5h Ah Ks Ts 2d Kh 4c Qh 7s 9c 39 | 4h 2s Jd 7h 9s 3h 6h Td As 5s Ac 2c 6c Ad Jh Js 6s 5c 3d 4d 2h Kd 40 | 7d Jc Qs 3s 5d Qc 7c 8d 41 | 42 | Round 4: 43 | 64bit: 0xb0a33faf71a1f334 0x94f66590597ae5d8 0x3c7fe68cd26ebdf8 44 | 0xa2180af6a8d1473c 0xc2688c12707e3b62 0xda672a42428bf0a4 45 | Again: 0xb0a33faf71a1f334 0x94f66590597ae5d8 0x3c7fe68cd26ebdf8 46 | 0xa2180af6a8d1473c 0xc2688c12707e3b62 0xda672a42428bf0a4 47 | Coins: THHTHTHHTTHTTTTTHTTHTTTHTTTHHHHTHTTTTHTTTTTTHHTTTHHTHHTHTHHHTTHHT 48 | Rolls: 2 6 4 1 2 5 3 2 2 4 1 5 3 3 1 3 6 3 1 1 2 1 5 4 3 1 2 2 2 2 5 2 2 49 | --> rolling dice used 33 random numbers 50 | Cards: 4h 8s 4c Ad 9d Qh 2s Ts Jd Jh 6s 7h 9s Qc 2c As 8h 5d Ac 3d 8c Kc 51 | 8d 5c Js 2d 9c Qs 3s 3c Td Kh 7s 7c 6d Ah 5h Jc Th 7d 4d Ks 9h 4s 52 | 5s 2h 6c Kd 6h 3h Tc Qd 53 | 54 | Round 5: 55 | 64bit: 0x0e46cf5648162dac 0x085cfe3fc86e06af 0x7aa43a225abaf9c1 56 | 0x898e076f83632286 0xaf1f07f02715ef10 0x9807752b8f8907b6 57 | Again: 0x0e46cf5648162dac 0x085cfe3fc86e06af 0x7aa43a225abaf9c1 58 | 0x898e076f83632286 0xaf1f07f02715ef10 0x9807752b8f8907b6 59 | Coins: HHTTHHHTTTHTTTHTTTHTTHHTTHTHTHHHTHTHHTHTHHTHHHHTHTHHHHTHTTTTHTHHT 60 | Rolls: 1 4 1 1 4 1 6 3 1 2 6 4 3 4 2 1 1 5 4 4 2 3 6 1 5 2 4 6 5 3 2 1 3 61 | --> rolling dice used 33 random numbers 62 | Cards: Jc Ad Ts Qs Jh 7d 2h Ah 2d 4s Kc Qc 6s 5h 7s 6h Qd 3d 4d Jd 4c Js 63 | 6c 4h 9d 8c 2s As 8s Ks 8h Kh 3h 3c 8d Th 9h Tc 7h 5d 6d 9s Td 9c 64 | 5c Ac 7c 5s 2c Kd Qh 3s 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_k1024_fast.out: -------------------------------------------------------------------------------- 1 | pcg64_k1024_fast: 2 | - result: 64-bit unsigned int 3 | - period: 2^65664 4 | - size: 8208 bytes 5 | 6 | Round 1: 7 | 64bit: 0x716e1291ecd614bf 0x6d9c60c68bfa5bac 0x6011e6dee28a425f 8 | 0x3a93df63ad5d8c2d 0x8c276f08b088c497 0x4d7204001d16777d 9 | Again: 0x716e1291ecd614bf 0x6d9c60c68bfa5bac 0x6011e6dee28a425f 10 | 0x3a93df63ad5d8c2d 0x8c276f08b088c497 0x4d7204001d16777d 11 | Coins: HHHHHHHHTTHTTTTTTHTTTTHHHHTTTHTHTHHTTTHTHTTHHHTTHHHTTTTHTHHHTHHHT 12 | Rolls: 6 3 1 2 2 3 3 2 5 6 1 5 2 1 1 3 1 4 5 2 4 5 3 4 2 2 5 5 3 1 2 6 4 13 | --> rolling dice used 33 random numbers 14 | Cards: Ts 2h 3c 9d 3s 2c Th 3h 4c Qh Js Ad 7c 9c Td 8s 7h 4s 6c 6h Tc 7d 15 | 8d Jc Qs Ac Jd 5s 6d 4d Kc Kd Jh 8h Qd 2s 5d Kh 3d 4h 8c Qc 9h 6s 16 | 5c As Ah Ks 7s 5h 9s 2d 17 | 18 | Round 2: 19 | 64bit: 0xbd047092dbc12c12 0xb8023964c5590845 0x6a2acc287da9b782 20 | 0xf27a18fdeaca790a 0x5dd53aa3af4dd73e 0x407a59d050593064 21 | Again: 0xbd047092dbc12c12 0xb8023964c5590845 0x6a2acc287da9b782 22 | 0xf27a18fdeaca790a 0x5dd53aa3af4dd73e 0x407a59d050593064 23 | Coins: TTHTHTTTHHHTTHTTTHHTHHTTTHHTHHHHHTHTHTTHTTHHHTTTTTTTTTHTHTHTHTTTT 24 | Rolls: 6 2 6 6 4 4 4 4 4 1 3 6 1 2 5 4 4 6 2 5 3 5 5 6 6 2 3 5 3 6 2 4 5 25 | --> rolling dice used 33 random numbers 26 | Cards: 4c 4d 9c 6d Qs 3d 5c Tc 9d Ts 2h Th Qh Jh 6h 8s 2s Ac 3h 7s 4s 5h 27 | 9h Js Jc 2c 4h Kd Ah 5d 8c As 5s Kc Qd 7c Ks Ad Qc 8h 6c 7d Jd 8d 28 | 2d 3c 7h Kh 6s 3s Td 9s 29 | 30 | Round 3: 31 | 64bit: 0xb9f6e508611fa39b 0x50ff50a7fda1c6ff 0xc9fc4c468fc0e452 32 | 0x13992edc8b596e39 0x6e621625efd5f7df 0xe0ec108a27c75fae 33 | Again: 0xb9f6e508611fa39b 0x50ff50a7fda1c6ff 0xc9fc4c468fc0e452 34 | 0x13992edc8b596e39 0x6e621625efd5f7df 0xe0ec108a27c75fae 35 | Coins: HTHTTTHTHTHTTHTTHHTTHTHHHHTTTHHHTHHHHTHHHTHHTTHTTHTHHTHTTHHHTHTHT 36 | Rolls: 4 5 2 2 5 6 4 5 6 3 6 5 6 6 4 5 1 5 5 1 4 4 6 6 2 2 3 5 1 4 3 3 4 37 | --> rolling dice used 33 random numbers 38 | Cards: 3d 5h 2d 7s Ts Tc 3s Kd 8c 6c 4s Js 9s Jd 4d Qc 2s As 6d Jc Qs Ad 39 | 8h Kc Td 7h 7c 4h 6h 2h 5c 9d 4c 2c Qh Jh Ks 3c 9h 8d Ah Ac Qd Th 40 | 7d 3h 8s 5s 9c 6s Kh 5d 41 | 42 | Round 4: 43 | 64bit: 0xb5cb75ddd90a0f9e 0x4cf347f82cce20c6 0x6243c21a2332efc2 44 | 0x43f3e96d96ce7569 0xea93a4709c0f83f8 0x88c99d75a1dec4a9 45 | Again: 0xb5cb75ddd90a0f9e 0x4cf347f82cce20c6 0x6243c21a2332efc2 46 | 0x43f3e96d96ce7569 0xea93a4709c0f83f8 0x88c99d75a1dec4a9 47 | Coins: HTTHTHHHTTTHTTTTHHTHTHHTTTHHHTHHHHTTTTHHHTHHTHTHHTTTTTHHTHHTTHTHT 48 | Rolls: 5 3 1 3 6 3 5 3 3 5 6 1 5 5 3 1 2 1 4 5 2 3 5 4 3 6 1 6 4 3 5 3 1 49 | --> rolling dice used 33 random numbers 50 | Cards: 7d 6c 4d 8s Td Kd Qh 9h 9c 5d 7s Tc Qs Ks 9s 6d As Jc 8h Qd 4s 4c 51 | Kc 7h 7c Jd 4h 2c 8c 2d 5s 2s 3d Jh Kh 6h 2h Ts Ac Js 9d Ad 8d Qc 52 | Th 3c 6s 3s 5c Ah 3h 5h 53 | 54 | Round 5: 55 | 64bit: 0xa9cba0879f523763 0x9d063cc605508ab9 0xaa9dd9f6f8792bdc 56 | 0xa3005a22d15b695b 0x66f3b5676edeceea 0x8e315e033cded525 57 | Again: 0xa9cba0879f523763 0x9d063cc605508ab9 0xaa9dd9f6f8792bdc 58 | 0xa3005a22d15b695b 0x66f3b5676edeceea 0x8e315e033cded525 59 | Coins: THTTHTHHHHTTHTTHHHHHHHTTHTHTHTTTTHHHTHHHTTHTTHTTHHHTHHHHTHTTTTTHT 60 | Rolls: 4 4 1 4 6 2 3 1 6 5 5 2 2 6 3 1 6 2 3 2 2 1 6 1 4 1 1 5 2 6 4 5 2 61 | --> rolling dice used 33 random numbers 62 | Cards: Th 2c 2s Td 4s Tc Jh Js 6h 2h Ac Qs 9h Kd 9s Qh 6d 6s Ad 2d 9c 3h 63 | 7h 8s Qc 5d 3d 5h Ah Jd 3s As 9d 5c 6c Ks 7c Jc Qd 4c 5s 8c 3c Ts 64 | Kc 8h 7s 4h Kh 7d 4d 8d 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_k32.out: -------------------------------------------------------------------------------- 1 | pcg64_k32: 2 | - result: 64-bit unsigned int 3 | - period: 2^2176 (* 2^127 streams) 4 | - size: 288 bytes 5 | 6 | Round 1: 7 | 64bit: 0x2dcbaf9339a0a8db 0xa5486595bb7ecc26 0x800934faba0d0759 8 | 0x7eff732dee5b72cb 0x44760d3bb06156f9 0x6f3622730aff6c44 9 | Again: 0x2dcbaf9339a0a8db 0xa5486595bb7ecc26 0x800934faba0d0759 10 | 0x7eff732dee5b72cb 0x44760d3bb06156f9 0x6f3622730aff6c44 11 | Coins: THTTHHHHHHTHTTHHTHTTTHTTTTTHTTHHHHHHHHHHHHTTHHHHTTHTHTTHTHTHTHHHH 12 | Rolls: 4 3 1 4 1 6 1 3 6 2 1 4 2 1 5 4 5 6 5 4 6 1 5 5 1 2 2 2 2 6 2 6 4 13 | --> rolling dice used 33 random numbers 14 | Cards: 2s 2d 9s Jd 3c 4h Qs 5s 4c 2h 9c 6s Qd Kh Ac Ah 7h 8h 6c Ks 5c Tc 15 | Qh 8d 8s Kd 4s Th 9h 3h Ts 7s Td 5d 2c 4d Kc Qc 3d As 6h 8c 6d 7c 16 | Jh Ad 3s 5h 9d 7d Js Jc 17 | 18 | Round 2: 19 | 64bit: 0x08362f38c5184d06 0x2ba1b3164afc696d 0xf18e00ded413293e 20 | 0x14512048d47657aa 0x003ef118b96e494b 0xb6ba214a64598dc5 21 | Again: 0x08362f38c5184d06 0x2ba1b3164afc696d 0xf18e00ded413293e 22 | 0x14512048d47657aa 0x003ef118b96e494b 0xb6ba214a64598dc5 23 | Coins: TTHHHHTHTTHTTHTTTTHHHHHHTTTHTHHHHHTTTTTHTTTTHTHHHTHTHTTHTTTTTHHTT 24 | Rolls: 1 6 4 6 6 6 6 4 1 4 5 6 1 4 4 6 1 3 5 2 3 2 3 5 2 4 5 2 6 6 3 1 1 25 | --> rolling dice used 33 random numbers 26 | Cards: Th Jd Tc 7d Qd 3d 2c Qs 8c 6d 2h 7s Jh 9d Td 6c Ac 8s 7c 8h 9s Jc 27 | 4d Kc 2s 7h 2d 5c 9c 9h Ad Kh 4c Qh 3h 3c 5d 3s 5s Qc 5h Ts 8d Js 28 | Ah Ks As 4h Kd 4s 6h 6s 29 | 30 | Round 3: 31 | 64bit: 0xedfa63d9e74cb0d7 0xb9a431ed222e20e3 0xe0bc6a0b891ffa90 32 | 0x8e1c3e7e25a97e13 0x7065328d5502585a 0x30ea18f29c9dd917 33 | Again: 0xedfa63d9e74cb0d7 0xb9a431ed222e20e3 0xe0bc6a0b891ffa90 34 | 0x8e1c3e7e25a97e13 0x7065328d5502585a 0x30ea18f29c9dd917 35 | Coins: HTHHTTHHTTTHHHHTTHTTTHHTHTHHTHHHTTHTTTHHHHTHHTHTHHTHHTTHTHHHTTHHH 36 | Rolls: 5 6 2 6 2 1 2 1 5 4 6 4 6 1 4 5 6 6 4 5 3 6 1 6 4 4 3 3 3 5 6 6 6 37 | --> rolling dice used 33 random numbers 38 | Cards: Th 8d Jh 2s Td 3h 2d Kc 3c 7d 6s Jc 5c Jd 8c Qd 6d As 4s 5d Kh 6h 39 | Js 7h 8s 9h Ad Qs 2c 9s 4d 5h 8h 4c 6c 3d 9d 3s Ac Tc 5s Qh Qc 7c 40 | 2h 9c Kd 7s 4h Ah Ks Ts 41 | 42 | Round 4: 43 | 64bit: 0x778fbeeb1240be87 0x146e38cf2b84691c 0x51f4076de124d878 44 | 0x3aa6741428102d8b 0xfe712690a64ff70b 0xfdbb7799320fb4a3 45 | Again: 0x778fbeeb1240be87 0x146e38cf2b84691c 0x51f4076de124d878 46 | 0x3aa6741428102d8b 0xfe712690a64ff70b 0xfdbb7799320fb4a3 47 | Coins: THTTTHTTHHHTHHTTTTTHTTTHHTTHHHTTTTTHTHTHHTHTHHTTHTTTTHTHHTTHTTHHH 48 | Rolls: 6 1 6 6 1 2 2 1 3 3 1 5 6 3 3 2 6 1 3 2 3 4 6 6 6 2 3 4 6 1 3 5 1 49 | --> rolling dice used 33 random numbers 50 | Cards: 7s Kd 3d Tc 9s Ah 6d 8d 3s Ad Kc 6s 9h Kh 4c Qs Ks Js Th 3h 5s 4h 51 | Ts 5c 7d 4d 7c 9c 5d 8h 2s 2h 6h 6c 4s Jc Jd As Td Qd Qh 8s 2d Qc 52 | 7h 5h Ac 3c 8c 9d Jh 2c 53 | 54 | Round 5: 55 | 64bit: 0xc698f9ba129692a7 0x94646b27c1c8ca84 0x5ed4146e49289180 56 | 0x646e2e367a11b087 0xcf0ec8f5395d2d9f 0xb81f13d75e8265af 57 | Again: 0xc698f9ba129692a7 0x94646b27c1c8ca84 0x5ed4146e49289180 58 | 0x646e2e367a11b087 0xcf0ec8f5395d2d9f 0xb81f13d75e8265af 59 | Coins: THTHTTHHTHTTHHHHTHTTTTTHTHTHTHTTTTHHHTHTTTTHTHHTTHTHTTHHHTHTTTHTT 60 | Rolls: 6 2 1 3 2 3 3 5 1 1 4 5 2 2 4 2 5 6 1 3 2 4 4 1 2 4 5 4 5 2 3 6 1 61 | --> rolling dice used 33 random numbers 62 | Cards: Ac 3d 8s 4c 5h 7c 4d 9c 7d Kc 4h Qc Td 8c Js 9s Tc Jd Qs 3h Jh 6d 63 | 2h Ks 5s Ts 7s 5d 2c 2d 2s 5c 7h As 3s Qh Kh 9d Th 9h 8h Jc Ah Qd 64 | Kd 8d 6c 4s 3c 6s Ad 6h 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_k32_fast.out: -------------------------------------------------------------------------------- 1 | pcg64_k32_fast: 2 | - result: 64-bit unsigned int 3 | - period: 2^2174 4 | - size: 272 bytes 5 | 6 | Round 1: 7 | 64bit: 0xb630722e1a261b23 0xa3e7dd5265ee932a 0x88ec8f3994a7ea76 8 | 0xaed90a0ebbb4cc14 0x58fb1a0fa08733a2 0xab8b8a9f25b4d827 9 | Again: 0xb630722e1a261b23 0xa3e7dd5265ee932a 0x88ec8f3994a7ea76 10 | 0xaed90a0ebbb4cc14 0x58fb1a0fa08733a2 0xab8b8a9f25b4d827 11 | Coins: HTHTTHHTHTTHHTTTHTTTHHTHHHHHHHHTTTTTHHHHTTTHHHTTHHHHHTTHHHHTHHHTH 12 | Rolls: 4 6 2 1 6 1 3 1 5 3 2 5 5 3 5 2 6 5 2 1 1 3 5 2 1 1 6 1 1 1 4 2 1 13 | --> rolling dice used 33 random numbers 14 | Cards: 2h 6d 8s 9h 4h Kh Jd 2d Ks Qh 8d 4c 3d 3c 5s 7h 6h Tc 8h 2c Ah Jc 15 | Kd 6c Ts 5c Qs 9s Kc As 9d 7s 8c 5d Ac Jh 4d Qc Ad 5h 7d 3s 7c 6s 16 | 3h 9c Qd 2s Td 4s Js Th 17 | 18 | Round 2: 19 | 64bit: 0xb82624143a5c6f6c 0x3516272dc09bc391 0x73bc625a07e2a046 20 | 0x0e81a232551edc75 0xf31b469e981a3d37 0x34f114a797eadf62 21 | Again: 0xb82624143a5c6f6c 0x3516272dc09bc391 0x73bc625a07e2a046 22 | 0x0e81a232551edc75 0xf31b469e981a3d37 0x34f114a797eadf62 23 | Coins: HHTHTTHHHHHTTTTHHTTHHHHTTHHHTHHTTHTTHTTHHTTTHHTTHTHTTTTTHHTHTHTTT 24 | Rolls: 3 1 2 4 5 4 6 4 5 4 2 1 5 4 1 2 3 2 2 4 5 2 5 4 4 1 4 2 3 3 1 2 6 25 | --> rolling dice used 33 random numbers 26 | Cards: 5d 6s 9h Qh 6d Kc 3s Js 4h Kd Ts Kh Ac 5c Ks 9d Qc 4s Jd 7c 8h 6h 27 | Tc 9s Jh 2c 4d 4c 8s Ah Th 3c 5h 7d Qd 7h 5s Ad Qs 8c 7s Jc 9c 8d 28 | 2d 2h Td 2s 6c As 3h 3d 29 | 30 | Round 3: 31 | 64bit: 0xf58d7042ef8c12d9 0x1345bc317aa61740 0x11d105038caaaa58 32 | 0x9344021e841589d0 0x83970b191840b7ad 0x6643ad1f50177b5c 33 | Again: 0xf58d7042ef8c12d9 0x1345bc317aa61740 0x11d105038caaaa58 34 | 0x9344021e841589d0 0x83970b191840b7ad 0x6643ad1f50177b5c 35 | Coins: HTHHHTTTHHTTHTHTHTTHTTTHTHHHHTHHHHHHTTHHTHTTHHTHHTTHHTHHTHHTTHHTH 36 | Rolls: 4 5 6 1 6 2 4 2 2 1 4 2 4 2 2 1 3 6 3 3 4 5 1 1 1 4 2 4 3 2 6 2 6 37 | --> rolling dice used 33 random numbers 38 | Cards: Jc 2d 3h 5h 2s Jd 2h Qd 7d Ah Jh Qh Kh Ks 3d Td 7h 6c 4c 8d Qs Qc 39 | Ac 7s 8h 9s Kd 9c 9d 2c 9h 3c 6s As 5d 7c Ad 4s 8c 3s Tc Ts 5c Kc 40 | 4h 6d 8s 5s 6h Th 4d Js 41 | 42 | Round 4: 43 | 64bit: 0x16ef7e36cab3177d 0xa2054397267b284c 0x7fbef10bc156ee10 44 | 0xb03e53dc98232df4 0x2269362647946ada 0xa6e9c81dd9bfd5d9 45 | Again: 0x16ef7e36cab3177d 0xa2054397267b284c 0x7fbef10bc156ee10 46 | 0xb03e53dc98232df4 0x2269362647946ada 0xa6e9c81dd9bfd5d9 47 | Coins: THTHHTTTHTTHTTHTHHTHTTTTHHTHTHTTTHHTTTHHTTTTHHTTHTTHHHTTHTHTTHTTT 48 | Rolls: 3 5 4 2 4 1 4 2 3 3 2 1 2 1 2 3 5 6 5 5 1 5 1 3 6 4 6 4 5 3 6 3 3 49 | --> rolling dice used 33 random numbers 50 | Cards: 2c 6c Jd Ad 7d 5d 8c 3s 4s 9d 2d 8h Ts 6s 9h 4h 7c Ac 5h Kc Js As 51 | Kd 3h 4c 3c Jc 6d 4d Th Qh 3d 9c Kh Jh Ks 2h 6h 8s 7h 7s Tc Qc Qs 52 | 2s 8d 5s 9s Qd Ah 5c Td 53 | 54 | Round 5: 55 | 64bit: 0x2e57cdbac5d5fc79 0x1ae412eddd4103de 0x041a83f569d04daa 56 | 0x7522fc640b28eaf9 0x82c86c34d392edb1 0x3b1df82382217c5b 57 | Again: 0x2e57cdbac5d5fc79 0x1ae412eddd4103de 0x041a83f569d04daa 58 | 0x7522fc640b28eaf9 0x82c86c34d392edb1 0x3b1df82382217c5b 59 | Coins: THHHTHHHTTTHTHHHTTTTHTHHTTHTHTHHHTHHTHHHHHTHTHHHTHTTHHHTHTHTTHTTH 60 | Rolls: 2 6 6 2 6 3 4 5 5 6 4 1 1 6 6 1 5 4 4 6 1 1 6 5 2 3 4 2 1 4 4 5 4 61 | --> rolling dice used 33 random numbers 62 | Cards: 7c Td Jc 9c 3h Ad Qh Ks 4c 8s 5h 7s 6s Jh Kh 8h 3c Js 2d 3s 9h Tc 63 | 8d 7d Th 9s 5s 8c 3d 4s Ac Ts Kd 6d 2h 7h Qs 4h 6h 2c Kc 4d As 2s 64 | Qd Qc 9d 5d Ah 6c 5c Jd 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_k32_oneseq.out: -------------------------------------------------------------------------------- 1 | pcg64_k32_oneseq: 2 | - result: 64-bit unsigned int 3 | - period: 2^2176 4 | - size: 272 bytes 5 | 6 | Round 1: 7 | 64bit: 0x16877a0956ab7ab2 0x6c8007d328f335a7 0x38a4f59634854ee6 8 | 0xcc6f1d46b7d5fb7a 0x18042420cc04c23d 0x60251b7df26b98db 9 | Again: 0x16877a0956ab7ab2 0x6c8007d328f335a7 0x38a4f59634854ee6 10 | 0xcc6f1d46b7d5fb7a 0x18042420cc04c23d 0x60251b7df26b98db 11 | Coins: THHTHHHTHHHHTHHTTHHTTTTHTTTHHHHHHHTHHHHTTHTHHTTHTTHHTTTTHTTHTTHHT 12 | Rolls: 5 4 3 6 2 3 6 1 3 5 6 5 3 6 2 4 2 4 4 5 6 2 1 4 2 6 5 3 3 2 5 6 6 13 | --> rolling dice used 33 random numbers 14 | Cards: 5d Qs 8d 4h Qd 3c 8s Qh 7s 7c 2c Kc 6s 6d Ad Td Jh 9c Ac 2s Jd Ah 15 | 3h Kh Tc Th As 2h 2d 4s 9d Ks 3s Ts Jc 5h 9h 5c 7d 7h Qc 3d 5s 4c 16 | Kd 8c 6c 4d 8h Js 6h 9s 17 | 18 | Round 2: 19 | 64bit: 0xa0e8173ed367c2c3 0x0e3e8e318a71b21f 0x41fe7ffbc0a8ef66 20 | 0xc3b056e92077ff07 0xfa2d1bf9e4a0d18c 0x30bf40eb4388fd76 21 | Again: 0xa0e8173ed367c2c3 0x0e3e8e318a71b21f 0x41fe7ffbc0a8ef66 22 | 0xc3b056e92077ff07 0xfa2d1bf9e4a0d18c 0x30bf40eb4388fd76 23 | Coins: TTHHTTTHHHHTTTHHTHHTTTHTTTHHHHTHTTHHHHHHHTTTTTHTHHTHHTHTHTTTHHTHT 24 | Rolls: 1 3 5 4 3 4 1 4 4 2 1 2 4 5 6 5 3 4 6 4 5 6 5 3 6 4 4 6 2 3 5 6 6 25 | --> rolling dice used 33 random numbers 26 | Cards: Ts 3h 4h 6h Jd Th 5d 2d 9h 5s Ks Ah 8d 7s 9d Qh Kc 7c 7h 6c 2h Qc 27 | As Qs Ac Qd 8c Kd Kh 8s 2c Jc Td 9s 6d 4d 6s Jh 8h 2s 5c 4c 3d 3s 28 | 3c Js 9c 5h 4s Ad Tc 7d 29 | 30 | Round 3: 31 | 64bit: 0x7cbd07437e4bf6fd 0xf07ecbfe7bb74a5d 0x493b9a695358fe73 32 | 0x5b0a27f8ad68823d 0x8b6a1a1f164bc3d0 0x4a274448fa848752 33 | Again: 0x7cbd07437e4bf6fd 0xf07ecbfe7bb74a5d 0x493b9a695358fe73 34 | 0x5b0a27f8ad68823d 0x8b6a1a1f164bc3d0 0x4a274448fa848752 35 | Coins: TTTTTHTTHHTTHTTTHTTTHTTHHHTTTHTTTHHHHTHTTHHHTTTTHHHTTTHTHTTHHTHTT 36 | Rolls: 5 5 6 1 3 1 1 1 4 2 5 4 4 3 4 2 5 5 3 5 1 3 4 2 3 5 3 4 3 6 5 1 5 37 | --> rolling dice used 33 random numbers 38 | Cards: 4d Td Js Ks Tc Jc Ts Ad 9c Kc 7h 5h 3h 8d Th 8c 6d 6c 2h 9s 5c Ah 39 | 8s Qh 5s Kh 2d Qc 2c 3d 7s 3s 7d 6h Jd 4s 9h 6s Kd 5d Ac 2s Qd Jh 40 | 4c 3c 8h Qs 4h 9d 7c As 41 | 42 | Round 4: 43 | 64bit: 0x36759babce7820e1 0xd72e27aebd1bc4a4 0xb8a3a19fb66b260c 44 | 0x7469356680d0855b 0x458c7771c8dd99a0 0x137653a6303d2acf 45 | Again: 0x36759babce7820e1 0xd72e27aebd1bc4a4 0xb8a3a19fb66b260c 46 | 0x7469356680d0855b 0x458c7771c8dd99a0 0x137653a6303d2acf 47 | Coins: HTHTHTTHHHHHHHHTHTHHHTTHTTHHHHTTHHHHTTHHHHHHTTTTTTTTHTHTHTTTHTTTH 48 | Rolls: 1 4 3 6 2 2 5 4 6 1 5 1 3 4 1 4 3 3 3 2 4 6 2 3 1 3 3 6 5 4 1 3 5 49 | --> rolling dice used 33 random numbers 50 | Cards: 6h 7c 9d Jc 7h Qh Td 5d 5c 4h Jh 9s Ah Kd 6d Qs 2d Ac Jd 2s Qd 7s 51 | Ad 5h As Tc 2h 8c Qc 3s Kh 6c 3c 2c 9h Ts 4d 7d Th 6s Ks 4c 8h Js 52 | 8s 9c 8d 3h 4s 5s 3d Kc 53 | 54 | Round 5: 55 | 64bit: 0x67117ffc743ca9f6 0xadaae80721ded47b 0xd9f47206235ee034 56 | 0x0ef04a2a794ddff1 0x691eb88fb14af4c2 0xd3e84e7197b65752 57 | Again: 0x67117ffc743ca9f6 0xadaae80721ded47b 0xd9f47206235ee034 58 | 0x0ef04a2a794ddff1 0x691eb88fb14af4c2 0xd3e84e7197b65752 59 | Coins: THTTHHTTTTTHHHHHTTTTHHTTHHTHHHTHHHTHHHTHTTHHTTHHHHHHHTTTHTTTTHTTT 60 | Rolls: 4 6 4 3 2 2 2 1 1 1 4 2 2 6 2 2 6 5 3 2 4 4 6 3 4 4 6 1 3 5 1 4 1 61 | --> rolling dice used 33 random numbers 62 | Cards: 8c Jh 8d 3d Qh 4d 9d 5d Jc 7s 5c Ad 2d Qd Td 8h Kh 4s 5h Tc 9h Js 63 | 6s 8s 6d Th 2h 3h As 3s 9s Kc 6c 7d 9c Ts Kd 6h Qs Ah Ks Jd 2c 4h 64 | 4c Ac Qc 3c 7c 2s 7h 5s 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg64_once_insecure: 2 | - result: 64-bit unsigned int 3 | - period: 2^64 (* 2^63 streams) 4 | - size: 16 bytes 5 | 6 | Round 1: 7 | 64bit: 0xe1cbc180b69606bb 0x6573bce7abaee684 0xc744f07442006076 8 | 0x9e9f98ccbd60b8fc 0xde693821ee9629ae 0x263cc2cdc66ebc25 9 | Again: 0xe1cbc180b69606bb 0x6573bce7abaee684 0xc744f07442006076 10 | 0x9e9f98ccbd60b8fc 0xde693821ee9629ae 0x263cc2cdc66ebc25 11 | Coins: THHHHTHHHHHTHTTHHHHTHHHTTTHTTHHTHTHTHHHHHHTHHTTHHTHHTHHTHHTTTHTTT 12 | Rolls: 3 1 1 6 1 3 1 1 3 1 1 4 1 5 3 1 2 6 1 1 6 1 4 6 5 2 6 2 2 3 6 3 5 13 | --> rolling dice used 33 random numbers 14 | Cards: Qd Qc Th 5s 6h 5c 2c 3s Ts Jh 9s Kh 4h Td Ad Ks 6c Ah 7h 8s 6s 8d 15 | 2d Jc 2h 4s 9d Kc Qs 4d 3c 2s Kd 4c Tc 9c 7d 9h 8c 5h As Qh 8h 6d 16 | 7c Js 3h 5d Ac Jd 7s 3d 17 | 18 | Round 2: 19 | 64bit: 0x6869deb01736aa1d 0x3976d7772b7283b6 0xf192d7e3c132c7d9 20 | 0x41b1b929e310e3c5 0x6a48bd0efb5c699d 0x856a779cda69bfd0 21 | Again: 0x6869deb01736aa1d 0x3976d7772b7283b6 0xf192d7e3c132c7d9 22 | 0x41b1b929e310e3c5 0x6a48bd0efb5c699d 0x856a779cda69bfd0 23 | Coins: HTTHTHHTTTTHHTTTTTTHHHHHHHHHTTTTTTHHTHTHTHHTHHHTHTHHTTTHHTHHTTHTT 24 | Rolls: 1 4 5 2 2 1 2 1 3 5 3 1 2 4 3 3 2 1 4 3 1 5 3 3 2 5 6 4 6 1 2 1 1 25 | --> rolling dice used 33 random numbers 26 | Cards: 4c Kh 5h Ts 8h 7c Tc 8d 5d Jc Js Jd Qh 9s 3h 9d 8s 2s Ks 2d 6d 6c 27 | 2c 4s 7h Ad 3c 7d Kd Qc Td 4d 7s 9c 8c 2h Kc 3d Jh Ac 4h 9h Qd Ah 28 | 5c Qs Th 5s 6s As 6h 3s 29 | 30 | Round 3: 31 | 64bit: 0x3f3dc8d4299c7a86 0x3e076e65a0310764 0x714322cce3e68f09 32 | 0xe88471f1e7176e5e 0x262c50673106006a 0xbcc19d6d0d1ca1c4 33 | Again: 0x3f3dc8d4299c7a86 0x3e076e65a0310764 0x714322cce3e68f09 34 | 0xe88471f1e7176e5e 0x262c50673106006a 0xbcc19d6d0d1ca1c4 35 | Coins: HHHHHHHHHHTHTHTTTTTHTHHTTTTHHHHHHTTHHHHHHHTHHHHHHTHTHTHHHTTTTTTTT 36 | Rolls: 4 2 1 5 6 1 2 3 6 1 5 3 5 4 6 1 5 5 2 5 6 6 4 6 3 4 4 5 5 1 2 4 2 37 | --> rolling dice used 33 random numbers 38 | Cards: 9h Kd Ks 6d 7h 4d 4s Qs 6c 6h 9d 9c Jc 5s Th 3s 2c 7c Qd Qh Qc 2h 39 | 4c 8s 9s 8d 8h 2d Kh 2s Ah Ac Ad 3d 7d 8c Jd Js 7s Jh 5c Ts 6s 3h 40 | 4h 3c As Td 5h 5d Kc Tc 41 | 42 | Round 4: 43 | 64bit: 0x24fccd9eb54476bf 0x2c32833537b2ca5d 0xfc4de62db8baf980 44 | 0x66208e6be0123658 0x9f4674d5c6e9485a 0x4e093c882196a5f3 45 | Again: 0x24fccd9eb54476bf 0x2c32833537b2ca5d 0xfc4de62db8baf980 46 | 0x66208e6be0123658 0x9f4674d5c6e9485a 0x4e093c882196a5f3 47 | Coins: HTTHTHHTHTHTHHHTHHHHHHHTTHHHHHTHHTTHTHTHTTHTTHHHHTTHHTTHHTTHHHHTT 48 | Rolls: 3 4 1 4 4 5 6 4 1 5 5 1 2 4 4 4 3 6 2 2 1 2 6 5 2 6 2 6 4 4 5 2 1 49 | --> rolling dice used 33 random numbers 50 | Cards: 4c Kh 2c Qd 2s Jc 8s 7c 6s 5d 2h 6d 9s Ks 8d 3s Qc 4d 8h Td Ad 6h 51 | 3d 7s As 5h 3c 7h Th 4h Js Ac 7d 2d 6c Qs 9h 3h 4s Qh 9d Jh Ts 5s 52 | Ah Jd 9c Kd Kc Tc 5c 8c 53 | 54 | Round 5: 55 | 64bit: 0x8205935a6e122e27 0x70e48fea82d8d2f6 0xa6114ae38986de05 56 | 0x05cd66f6baa6aae4 0x8aa8873d87856c4f 0xf9970ffeda4657e2 57 | Again: 0x8205935a6e122e27 0x70e48fea82d8d2f6 0xa6114ae38986de05 58 | 0x05cd66f6baa6aae4 0x8aa8873d87856c4f 0xf9970ffeda4657e2 59 | Coins: HHHTTHTHHTHHHHTHHTHTHTTTHHHHHHTHTHHTTHHTHTTHTTHHHHTHTHHTHHHTTHHHT 60 | Rolls: 3 5 5 6 3 4 6 4 5 5 2 1 2 5 2 1 5 5 5 5 6 1 5 5 3 5 2 3 1 6 5 1 4 61 | --> rolling dice used 33 random numbers 62 | Cards: 3c 6s 7d 4h 5h Qs 5c Js 8s 2c 6c Qd 4d 6d 6h Ks 3h Th Ts Ad 8c 2d 63 | 9s 3s Tc 5d Kh Jh 7h 9h Qc Kd Jd 9c 2s 7s Jc 5s Td 8h 8d As 9d Qh 64 | 3d 2h Ah Ac 4c Kc 7c 4s 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_oneseq.out: -------------------------------------------------------------------------------- 1 | pcg64_oneseq: 2 | - result: 64-bit unsigned int 3 | - period: 2^128 4 | - size: 16 bytes 5 | 6 | Round 1: 7 | 64bit: 0x287472e87ff5705a 0xbbd190b04ed0b545 0xb6cee3580db14880 8 | 0xbf5f7d7e4c3d1864 0x734eedbe7e50bbc5 0xa5b6b5f867691c77 9 | Again: 0x287472e87ff5705a 0xbbd190b04ed0b545 0xb6cee3580db14880 10 | 0xbf5f7d7e4c3d1864 0x734eedbe7e50bbc5 0xa5b6b5f867691c77 11 | Coins: HHTHHHTTHTHHTTTHHHTHHHTTTTTHHTHTTTTHHTHHTTTTTTHHTHTHTTTTTHTHHTTHT 12 | Rolls: 1 2 6 3 6 2 6 5 3 2 3 2 1 5 1 6 1 3 3 5 4 3 1 5 1 4 6 4 1 6 5 5 5 13 | --> rolling dice used 33 random numbers 14 | Cards: 9c 5h 7d 7c 4c 8d 7h Qc Kh 2d 3h 2h Qd Ts 3d Kc 9h Jc 6h 6d 8c 4d 15 | Qh As Jh 8s Th 5s 2c 9d Ac 4h Kd 5d 9s 6c 3s Ks Js Jd 7s 2s 3c Tc 16 | Qs 4s 8h 5c Ah 6s Td Ad 17 | 18 | Round 2: 19 | 64bit: 0x7d97ee72fb94fdf0 0xb35f07d53cc42b66 0x0854c5caec0c251f 20 | 0xf37961a645554320 0x1d1d213622351b24 0x6edbb396c73fb49f 21 | Again: 0x7d97ee72fb94fdf0 0xb35f07d53cc42b66 0x0854c5caec0c251f 22 | 0xf37961a645554320 0x1d1d213622351b24 0x6edbb396c73fb49f 23 | Coins: HHTTHHHTHHHHHTTHHHTHHTHTHTTTHHTHHHHHHTHTTHHHHHTHTTHTHHHTHHTTHHHHH 24 | Rolls: 5 4 2 2 5 3 2 2 2 4 3 1 2 5 6 1 6 5 3 1 1 3 5 6 4 2 5 3 1 2 2 4 1 25 | --> rolling dice used 33 random numbers 26 | Cards: Qh Ah 3c 6d 8s 3h Jh 8c 6s 9h 8d 3s 9c Ts Qd Kc Kh 4d 7c 5h Th 2s 27 | 2c 4c 6h Jd Td 2d Ks 5c 7h Qs 3d 4s 7d 5s 9d Ac 6c 9s 8h As Jc 7s 28 | 2h Tc Kd 4h Ad 5d Qc Js 29 | 30 | Round 3: 31 | 64bit: 0x187ee00430cec695 0x38efe3fb60c70613 0x3949bd01ef38c552 32 | 0xd3f1543a45f3b48f 0xfb81a0482dc602cd 0xb48e4f661e4c7fc5 33 | Again: 0x187ee00430cec695 0x38efe3fb60c70613 0x3949bd01ef38c552 34 | 0xd3f1543a45f3b48f 0xfb81a0482dc602cd 0xb48e4f661e4c7fc5 35 | Coins: THTTTHHTHHHHHHTHTTTTHHTHTHTHHHTHTTTTTHHTHTTTTTHTTTTTHHTHHHTTTTHHT 36 | Rolls: 1 5 6 2 1 3 2 5 5 6 3 4 4 1 5 3 5 1 4 1 2 4 4 1 3 5 6 5 4 5 5 6 3 37 | --> rolling dice used 33 random numbers 38 | Cards: 9c 4s 9d Kh Js 6c 4d 8h Qd 8d 5s 3d 6h 7s 9s Ks 2s 7h Ac Ad Kc 4c 39 | 5h Jd As Ah 8s 2h Jh 6s Th 2c Qc 8c 5d 9h 3h 4h Qh 3s Tc 5c 2d Qs 40 | 3c Ts Kd Jc 7c 6d 7d Td 41 | 42 | Round 4: 43 | 64bit: 0xd04c0a3a8cf6c571 0xbc94812fe9ec2c93 0x691f3e3aa2f42c77 44 | 0xb7188d5162d89a1e 0x17fbf02e08fee28a 0x1aa17486e288664f 45 | Again: 0xd04c0a3a8cf6c571 0xbc94812fe9ec2c93 0x691f3e3aa2f42c77 46 | 0xb7188d5162d89a1e 0x17fbf02e08fee28a 0x1aa17486e288664f 47 | Coins: THTHHHTTTHHHHHTTHHHHHTTHHTTHTHTTHHHHHTHTTHTTTTHTTTHTHHHHTTHHTTHTH 48 | Rolls: 3 6 5 6 2 3 5 6 2 5 1 5 3 5 6 2 3 1 1 3 1 6 6 4 4 5 4 4 4 2 4 6 5 49 | --> rolling dice used 33 random numbers 50 | Cards: 6d 4c 9c 7s Qs Qh 5d 5h Jd 8d 3c 3d 9h Th 7d Tc As 7h 9s 2d 2s Td 51 | 8s 4s 7c Qd Jc 5c 5s 2c 2h 6s 6c 4h Js Ks 8h 6h Jh Kh 4d 3s Ah 9d 52 | 3h Kc 8c Qc Kd Ts Ad Ac 53 | 54 | Round 5: 55 | 64bit: 0x10bda17a1292d5aa 0xf0cd1384e25b3497 0x8e592be49a6a6181 56 | 0x5edc4faf5cda5865 0xb2ecea43437a3f8c 0x98dbb99c3550f0e4 57 | Again: 0x10bda17a1292d5aa 0xf0cd1384e25b3497 0x8e592be49a6a6181 58 | 0x5edc4faf5cda5865 0xb2ecea43437a3f8c 0x98dbb99c3550f0e4 59 | Coins: HTHTHHHHHHTHHTTHHHTTTTTTHTTTHHHTHHHHHHHHHTTTTHHTTTHTHHHHTTHHHHTTH 60 | Rolls: 5 1 4 6 1 4 2 4 2 1 3 2 4 3 6 3 5 5 4 5 1 2 1 1 1 6 5 6 5 4 1 6 4 61 | --> rolling dice used 33 random numbers 62 | Cards: 3d 7h Jd 3h 5d 2s 7d 5s 9d 8s 4c 8c Jc Ah Tc Js Ad 5h 6h Th 7s Kd 63 | Qd 9h As 8d 3c 2d 2c Kh 9s 7c Ac 6c 9c 2h Qs 4h Ts 6s Ks Jh 5c 8h 64 | 3s 6d Kc 4d Td Qh Qc 4s 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg64_oneseq_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg64_oneseq_once_insecure: 2 | - result: 64-bit unsigned int 3 | - period: 2^64 4 | - size: 8 bytes 5 | 6 | Round 1: 7 | 64bit: 0x27a53829edf003a9 0xdf28458e5c04c31c 0x2756dc550bc36037 8 | 0xa10325553eb09ee9 0x40a0fccb8d9df09f 0x5c2047cfefb5e9ca 9 | Again: 0x27a53829edf003a9 0xdf28458e5c04c31c 0x2756dc550bc36037 10 | 0xa10325553eb09ee9 0x40a0fccb8d9df09f 0x5c2047cfefb5e9ca 11 | Coins: TTHHHTHHTTHHHTHTTHHTHHTTHHHTTHTTTTHHHTTHTHHHHTHTTTTTTHHHTTTHTTTTT 12 | Rolls: 6 4 3 6 3 4 6 6 2 3 5 6 1 4 3 6 4 1 5 2 3 4 2 5 4 5 3 6 6 4 4 2 2 13 | --> rolling dice used 33 random numbers 14 | Cards: 3d Ah 7d Kh Td Th 8h 5d Ac 7c Ts As 7s 2s 2c 4h 8s Kc 3c 5h 6s 9c 15 | 4s Js Kd Qc 3h 2d Jh 6d 7h 3s 9d Tc 5s 9s 9h 4d Ks Jd Qd Ad Qs Jc 16 | 8d 4c 6c Qh 8c 5c 6h 2h 17 | 18 | Round 2: 19 | 64bit: 0xbf1a2718f46a9ab3 0x400c010fa404b25f 0x3e6dcc00e4e9238d 20 | 0x2ef92088e248ee1f 0xc6ba2d56b70972a8 0x7e11c48b5ee4b511 21 | Again: 0xbf1a2718f46a9ab3 0x400c010fa404b25f 0x3e6dcc00e4e9238d 22 | 0x2ef92088e248ee1f 0xc6ba2d56b70972a8 0x7e11c48b5ee4b511 23 | Coins: HHTHTHTTHTTHTTTTHTTHHHTHHTHTHHHHTHHTTTTTHTHTTHHTTTHTTHTHTTHTTHTHT 24 | Rolls: 5 1 2 3 6 1 5 2 3 2 2 6 4 6 5 6 1 5 4 3 1 1 5 3 4 5 5 2 3 4 2 3 5 25 | --> rolling dice used 33 random numbers 26 | Cards: 9d Qs 4c 3s 7h 8d 3h Qd Jd 6s Ad Jh 5d Js 5s 8c 4h 5c 7s 8h Kc 9h 27 | Ac 9c 3c 2s Tc 7d Ah 6d Jc Ks 2d 2c 9s Th 8s Kh Ts 4d 6h Td Qh Kd 28 | 3d 6c 2h 5h 7c As Qc 4s 29 | 30 | Round 3: 31 | 64bit: 0xa23134099c2db545 0xfd4094498a894a69 0x1199f424f91baa00 32 | 0x6c1c7a2896530d0b 0x1b9ca95e37253136 0xc05c20630e73d51f 33 | Again: 0xa23134099c2db545 0xfd4094498a894a69 0x1199f424f91baa00 34 | 0x6c1c7a2896530d0b 0x1b9ca95e37253136 0xc05c20630e73d51f 35 | Coins: HHTTHTTTTTTHHHTHHHTHHTTTHTTHHHHHTHTTHHHTHTTTHHHHTTTTHHTTHTTHHHHTT 36 | Rolls: 5 3 5 1 1 5 6 1 6 4 5 4 5 3 6 1 6 4 6 3 2 4 3 3 2 5 4 4 6 3 6 4 1 37 | --> rolling dice used 33 random numbers 38 | Cards: Ac 7h Ts Kc 9d 7s Js 2h Th 9s 2s 6h 3h Jc 3s 2c 5h 5d Qd 8h 3d 5s 39 | 6c Qh 7c 8d 7d Td As Ah Ad 6s Ks 4c Jd 9c 3c 4d Jh 9h Qs Qc 2d Kh 40 | 5c 8c 8s 6d 4h 4s Tc Kd 41 | 42 | Round 4: 43 | 64bit: 0x61748befe0c9e052 0x9261b659354e4790 0xf5760c6a80d81414 44 | 0xe9f8cd09b4a145b6 0x63cea77be983a1c2 0xff19b1c85857ee53 45 | Again: 0x61748befe0c9e052 0x9261b659354e4790 0xf5760c6a80d81414 46 | 0xe9f8cd09b4a145b6 0x63cea77be983a1c2 0xff19b1c85857ee53 47 | Coins: THTHHHTHHHTTHTHTTTHHTHTTHTTHHHTHTHTHHHTTTHHHHHHHHTHTHHHHHTTTTTTTT 48 | Rolls: 6 6 1 3 3 2 6 5 5 2 3 4 5 3 3 6 6 5 6 1 4 3 5 3 1 2 4 2 2 2 6 6 1 49 | --> rolling dice used 33 random numbers 50 | Cards: Jd 6h 5d 8s 3c Qd 2c 9s Ks 4h Kd 3h 6s 5c Jh Tc 4c Kh 2s 7d 8d Qh 51 | As 9c Th 6c 9h 2h Qs 8c 7h 4s Js Ad 3d Jc Ac 7c 5h 2d Qc 6d Ah 7s 52 | Ts 3s 5s 8h Kc Td 9d 4d 53 | 54 | Round 5: 55 | 64bit: 0x36288c2f6a1fcaba 0x9761b19d77017828 0x4192af9e0d374ee5 56 | 0x3d3134763fbd6bbf 0x1fb46e26bd261bd6 0x2c22c75b821893ac 57 | Again: 0x36288c2f6a1fcaba 0x9761b19d77017828 0x4192af9e0d374ee5 58 | 0x3d3134763fbd6bbf 0x1fb46e26bd261bd6 0x2c22c75b821893ac 59 | Coins: HHHHHHTTHTHHTTHHHTTTHHHTHHTHHHHHHTTTHTTTHTTTTTTHTTTHTTHTTHTTHHHHH 60 | Rolls: 6 4 3 4 5 5 2 3 1 6 6 6 6 4 4 4 1 2 2 5 4 1 5 2 3 4 1 4 1 5 1 3 5 61 | --> rolling dice used 33 random numbers 62 | Cards: 9s Th 9d 8c Jc Td 7c 3c 7h 3h 7d 3s 8h Qs 6c Qd Ah Ad 4d 5h Jd Kh 63 | 8d Qc Ts 6s 9c 5s As Ac 4s 6h 3d Ks 4h 5d 2h 5c 2s 2c Tc Jh 9h Js 64 | 4c 6d 7s 2d Kc 8s Kd Qh 65 | 66 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg8_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg8_once_insecure: 2 | - result: 8-bit unsigned int 3 | - period: 2^8 (* 2^7 streams) 4 | - size: 2 bytes 5 | 6 | Round 1: 7 | 8bit: 0xea 0x4d 0x8a 0x45 0x6b 0x23 0xcb 0xaa 0xf7 0x63 0xec 0x30 0x39 0xbc 8 | Again: 0xf7 0x63 0xec 0x30 0x39 0xbc 0x24 0xf4 0x82 0x85 0x8b 0x88 0x28 0x21 9 | Coins: HTTHTHHTTHTHTHTTTHTHHHTHHHHTHHHHHTTHHTHTTTTTTTTTHTHHHHHHHTHTHTHTT 10 | Rolls: 5 4 1 5 3 2 2 4 6 3 5 6 3 4 1 3 4 2 4 1 2 5 3 4 6 1 1 6 2 1 5 1 3 11 | --> rolling dice used 34 random numbers 12 | Cards: 2c 6d 3c 4d Th Js 4s 8d 2d 9c 9h 3h 3d Td Tc 7c 5h 8c 5s 4h Qh 2s 13 | Ks 6h 7d Jh 5d 8s Qs As Ah 7h Ac 5c 8h Ts 9d Kd Kc Qd Ad 6s 2h Jd 14 | Kh 6c Jc 4c Qc 3s 7s 9s 15 | 16 | Round 2: 17 | 8bit: 0x98 0xfd 0x95 0x79 0xfc 0xf6 0x73 0x64 0x7d 0xf3 0x8e 0xa6 0x51 0xf1 18 | Again: 0x7d 0xf3 0x8e 0xa6 0x51 0xf1 0x1f 0x4f 0x62 0x29 0x2e 0x01 0x05 0x72 19 | Coins: THTTHTTTTHTHTTTHHHHTTHHTTTTTHTHTHTTTHHTHHTHHHTHTTTHTHHTHTHTHTHTHH 20 | Rolls: 6 6 3 2 4 3 1 4 3 1 5 5 2 2 5 5 4 4 3 2 1 6 4 5 3 6 5 4 5 2 5 1 3 21 | --> rolling dice used 34 random numbers 22 | Cards: Th 3d 5h 9h Kd 7s Ad 7c 2h Qs 6c Ac 7d Jd 4c Tc Ah Ts 2c As 4h 9c 23 | 6d Kh 9d 5d 3c Td 3s Jc 8h 2d 7h Qc 8c 6h 6s Kc 8s Qh 3h 4d Qd Ks 24 | 4s 5s 8d 2s Jh 5c Js 9s 25 | 26 | Round 3: 27 | 8bit: 0xfa 0xe0 0x07 0xaf 0x5d 0xc5 0x44 0xe8 0x89 0x68 0xa5 0xa2 0x2c 0x81 28 | Again: 0x89 0x68 0xa5 0xa2 0x2c 0x81 0xe5 0xcf 0x54 0xb5 0x52 0x3e 0xb1 0xd1 29 | Coins: TTHHTTTTHHHTHTHHTHHTHTTHHHTHHTHHTTTTTTHHHTTHTTHHHTTTHTTHTHHTTTHHH 30 | Rolls: 1 1 2 5 6 4 5 5 4 2 2 2 3 6 5 6 1 1 4 3 3 4 5 1 3 1 2 3 2 1 1 5 6 31 | --> rolling dice used 34 random numbers 32 | Cards: 6d 3d 4d 8d Ts 9d 4h 5h Js Kc Tc 2c Ah 9h Kd Jc As 5s Kh Ac 2h Ks 33 | 4s Ad 7c Qs Qh 7s 7h 8c 7d 9s Td 3h 6c 2s Th 5d 4c 3s 9c 5c Jd Jh 34 | 8s 8h 2d Qc Qd 3c 6h 6s 35 | 36 | Round 4: 37 | 8bit: 0x39 0xbc 0x24 0xf4 0x82 0x85 0x8b 0x88 0x28 0x21 0x2d 0x26 0x00 0x61 38 | Again: 0x28 0x21 0x2d 0x26 0x00 0x61 0xba 0x77 0xbd 0x46 0x8c 0x71 0xdc 0x87 39 | Coins: THTTTHTHHHTHHHHTHHHHHTTHHTHTTTTTTTTTHTHHHHHHHTHTHTHTTTHTHTTHHHHTT 40 | Rolls: 6 3 4 1 3 4 2 4 1 2 5 3 4 6 1 1 6 2 1 5 1 3 6 4 6 1 2 3 2 4 3 6 6 41 | --> rolling dice used 33 random numbers 42 | Cards: Ts Qd 7c Tc 8h 2d 7d 3s 2h 6h 6d Qs 5s Ad Qh 8s 3d Js Ac Kh Th 8d 43 | Kc 2c 9c 5c Td Jc Jd Kd 8c 3c 6s 4d 3h 9d 4s Ks 6c Qc 9h 5h 7s 2s 44 | 4c As 7h 9s 5d Ah 4h Jh 45 | 46 | Round 5: 47 | 8bit: 0xa6 0x51 0xf1 0x1f 0x4f 0x62 0x29 0x2e 0x01 0x05 0x72 0xe4 0xdb 0xc8 48 | Again: 0x01 0x05 0x72 0xe4 0xdb 0xc8 0x86 0x4b 0xa0 0x1e 0x9e 0xb4 0xa9 0xb0 49 | Coins: HTTTHHHHTTHHTTTTTHTHTHTTTHHTHHTHHHTHTTTHTHHTHTHTHTHTHHHHTHHTTHTTT 50 | Rolls: 5 2 2 5 5 4 4 3 2 1 6 4 5 3 6 5 4 5 2 5 1 3 4 5 4 2 2 5 6 4 6 4 3 51 | --> rolling dice used 34 random numbers 52 | Cards: Qs Jc Kd Th 8c 7d Qc Qd 4c 2c 2s 9h 9s 5s Jd 2h As 8s 5d Td 7c Ts 53 | 9c Js 7h 5c 4s Ac 6c 6s 9d Tc 3h Ad 3d 8h Jh Qh 4h 4d Kh 2d 5h 6d 54 | 8d 6h Ks 7s Ah 3c 3s Kc 55 | 56 | -------------------------------------------------------------------------------- /test-high/expected/check-pcg8_oneseq_once_insecure.out: -------------------------------------------------------------------------------- 1 | pcg8_oneseq_once_insecure: 2 | - result: 8-bit unsigned int 3 | - period: 2^8 4 | - size: 1 bytes 5 | 6 | Round 1: 7 | 8bit: 0x2e 0x44 0x2f 0x91 0x50 0x84 0xcb 0x60 0x4b 0xe5 0x5f 0x97 0x0f 0x58 8 | Again: 0x4b 0xe5 0x5f 0x97 0x0f 0x58 0x24 0xfd 0x9c 0x42 0x6c 0xd7 0x25 0xc2 9 | Coins: HHTHTTTHTHHTTTTHTTHHHHHTHHHTTTHHHTHHHTTTTTTHHHTTHTHTTTHHHHTHTHTHT 10 | Rolls: 5 5 6 6 4 1 2 4 5 6 6 3 1 3 5 5 3 5 5 2 3 5 4 1 2 1 2 5 5 3 1 4 5 11 | --> rolling dice used 36 random numbers 12 | Cards: 6s Jc 9h Kc 4h 4c 4s As Ah 4d Ks Js 6d Qc 5h 9d 3c 5c 9c 6h 7h 3d 13 | 8s 5d 6c 2c Ad 9s Ts 2s 8c Kd Qs Kh 7s 2h 3h 8h Tc Th Td Qd Ac 2d 14 | 8d Qh 5s Jd 7c Jh 3s 7d 15 | 16 | Round 2: 17 | 8bit: 0x85 0x31 0x8f 0xae 0xda 0x7d 0x34 0x1a 0x61 0xff 0x78 0x7a 0x10 0x62 18 | Again: 0x61 0xff 0x78 0x7a 0x10 0x62 0x5d 0x6f 0x87 0x94 0xd0 0x6b 0xb7 0xc8 19 | Coins: THHHHHTTHHTHTTTHTHHHHHHTHHTTHTHTTHHHTTHHHHTTTHHHHTTHHHTTHTTHHTTHT 20 | Rolls: 4 2 6 2 4 5 1 2 1 1 1 6 2 3 4 4 3 6 1 1 3 4 3 6 6 3 3 5 3 6 3 3 2 21 | --> rolling dice used 33 random numbers 22 | Cards: Ac 6d Ah 6c Kh 2s As 8c 5h 8s 9h Kc Th 2h 7d 8d 7c Qs 3h Js 3d 2c 23 | 7h 6s 5d Jd Jc 5c Ad Ts Qc 2d 7s 4h Qd Ks Kd 4d 4s 9c 6h 8h Tc Jh 24 | Td 3c 3s Qh 9d 9s 4c 5s 25 | 26 | Round 3: 27 | 8bit: 0xaf 0xed 0xdc 0x01 0x83 0x17 0x02 0xce 0xa2 0xaa 0x5e 0xa0 0xd4 0xee 28 | Again: 0xa2 0xaa 0x5e 0xa0 0xd4 0xee 0x3a 0x2b 0x3e 0xf4 0x9f 0x3c 0x0d 0x7e 29 | Coins: HTTTTHTTHHTHTTTTTHTHHHTHTTTHHTHTHTTTHHTHTHTTHHTTHHTTHHHTHHTTHHHHT 30 | Rolls: 3 6 5 3 2 4 1 3 5 3 4 4 4 5 5 6 4 3 3 6 4 4 2 4 5 3 4 4 3 6 1 5 5 31 | --> rolling dice used 33 random numbers 32 | Cards: Js 3d Ad 6c 7d 9d Jc Kc 9s 6s As Th 4c 2s Jh Ah 5d 3s 3h 9c Kh Ac 33 | Jd 8d 8s 7s Td 2d 2h 2c 8c 3c 7c 4d Tc 5c 6h Ks 7h 4h Qs Qh 4s Ts 34 | Kd 8h 9h Qc 5h 5s 6d Qd 35 | 36 | Round 4: 37 | 8bit: 0x0f 0x58 0x24 0xfd 0x9c 0x42 0x6c 0xd7 0x25 0xc2 0x2d 0xf3 0x08 0xbf 38 | Again: 0x25 0xc2 0x2d 0xf3 0x08 0xbf 0x48 0xc6 0xe0 0xe1 0x8c 0x29 0xb9 0x56 39 | Coins: TTTHTTHHHHHTHHHTTTHHHTHHHTTTTTTHHHTTHTHTTTHHHHTHTHTHTTTTHHHTHHTHH 40 | Rolls: 6 3 1 3 5 5 3 5 5 2 3 5 4 1 2 1 2 5 5 3 1 4 5 1 2 2 3 6 1 3 1 3 1 41 | --> rolling dice used 34 random numbers 42 | Cards: 8s 7s 9h 3h 4c Ts 6h 6s Jd 8h Qc 4d Th 7d 2s 5s 3d Jh Ad As 8d 9s 43 | 2h Kh 9c 2d 6c Qs Kc Qd Qh 8c 4s Js 3s 7h 5h 5d 6d 9d 7c Jc 4h Td 44 | Ah Ks Ac 5c 2c Tc Kd 3c 45 | 46 | Round 5: 47 | 8bit: 0x1a 0x61 0xff 0x78 0x7a 0x10 0x62 0x5d 0x6f 0x87 0x94 0xd0 0x6b 0xb7 48 | Again: 0x6f 0x87 0x94 0xd0 0x6b 0xb7 0xc8 0x2c 0xb3 0x75 0xc3 0xd3 0x39 0x76 49 | Coins: THHTHTTTHTHHHHHHTHHTTHTHTTHHHTTHHHHTTTHHHHTTHHHTTHTTHHTTHTHHHHHTT 50 | Rolls: 2 1 1 1 6 2 3 4 4 3 6 1 1 3 4 3 6 6 3 3 5 3 6 3 3 2 6 2 2 2 3 4 2 51 | --> rolling dice used 33 random numbers 52 | Cards: 3s 9s Kc 7d 3c 5h 9d 6c 7c 8d Ah Kh Qs 7s 8h Th 8c 6s Tc 7h Jh 2s 53 | 5s Jc Qc 2d As 3d Js 6h 6d 3h Qh Ac Td 5d Jd Kd Ks 9h 2h Ts 2c 4s 54 | 5c Qd 9c 4c 4d Ad 4h 8s 55 | 56 | -------------------------------------------------------------------------------- /test-high/pcg-test-noadvance.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This file is based on the demo program for the C generation schemes. 24 | * It shows some basic generation tasks. 25 | */ 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include // for random_device 37 | 38 | #include "pcg_random.hpp" 39 | 40 | // This code can be compiled with the preprocessor symbol RNG set to the 41 | // PCG generator you'd like to test. 42 | 43 | #ifndef RNG 44 | #define RNG pcg32 45 | #define TWO_ARG_INIT 1 46 | #endif 47 | 48 | #define STRINGIFY_IMPL(x) #x 49 | #define STRINGIFY(x) STRINGIFY_IMPL(x) 50 | 51 | using namespace std; 52 | using pcg_extras::operator<<; 53 | 54 | #if !PCG_EMULATED_128BIT_MATH || !AWKWARD_128BIT_CODE 55 | 56 | int main(int argc, char** argv) 57 | { 58 | // Read command-line options 59 | 60 | int rounds = 5; 61 | bool nondeterministic_seed = false; 62 | 63 | ++argv; 64 | --argc; 65 | if (argc > 0 && strcmp(argv[0], "-r") == 0) { 66 | nondeterministic_seed = true; 67 | ++argv; 68 | --argc; 69 | } 70 | if (argc > 0) { 71 | rounds = atoi(argv[0]); 72 | } 73 | 74 | /* Many of the generators can be initialized with two arguments; the second 75 | * one specifies the stream. 76 | */ 77 | 78 | #if TWO_ARG_INIT 79 | RNG rng(42u, 54u); 80 | #else 81 | RNG rng(42u); 82 | #endif 83 | 84 | if (nondeterministic_seed) { 85 | // Seed with external entropy from std::random_device (a handy 86 | // utility provided by pcg_extras). 87 | rng.seed(pcg_extras::seed_seq_from()); 88 | } 89 | 90 | constexpr auto bits = sizeof(RNG::result_type) * CHAR_BIT; 91 | constexpr int how_many_nums = bits <= 8 ? 14 92 | : bits <= 16 ? 10 93 | : 6; 94 | constexpr int wrap_nums_at = bits > 64 ? 2 95 | : bits > 32 ? 3 96 | : how_many_nums; 97 | 98 | cout << STRINGIFY(RNG) << ":\n" 99 | // << " - aka: " << pcg_extras::printable_typename() 100 | // ^-- we skip this line because the output is long, scary, ugly, and 101 | // and varies depending on the platform 102 | << " - result: " << bits << "-bit unsigned int\n" 103 | << " - period: 2^" << RNG::period_pow2(); 104 | if (RNG::streams_pow2() > 0) 105 | cout << " (* 2^" << RNG::streams_pow2() << " streams)"; 106 | cout << "\n - size: " << sizeof(RNG) << " bytes\n\n"; 107 | 108 | for (int round = 1; round <= rounds; ++round) { 109 | printf("Round %d:\n", round); 110 | 111 | /* Make some N-bit numbers */ 112 | cout << setw(4) << setfill(' ') << bits << "bit:"; 113 | for (int i = 0; i < how_many_nums; ++i) { 114 | if (i > 0 && i % wrap_nums_at == 0) 115 | cout << "\n\t"; 116 | cout << " 0x" << hex << setfill('0') 117 | << setw(sizeof(RNG::result_type)*2) << rng(); 118 | } 119 | cout << dec << endl; 120 | 121 | /* Toss some coins */ 122 | cout << " Coins: "; 123 | for (int i = 0; i < 65; ++i) 124 | cout << (rng(2) ? "H" : "T"); 125 | cout << endl; 126 | 127 | /* Roll some dice */ 128 | printf(" Rolls:"); 129 | for (int i = 0; i < 33; ++i) 130 | cout << " " << (uint32_t(rng(6)) + 1); 131 | cout << endl; 132 | 133 | /* Deal some cards using pcg_extras::shuffle, which follows 134 | * the algorithm for shuffling that most programmers would expect. 135 | * (It's unspecified how std::shuffle works.) 136 | */ 137 | enum { SUITS = 4, NUMBERS = 13, CARDS = 52 }; 138 | char cards[CARDS]; 139 | iota(begin(cards), end(cards), 0); 140 | pcg_extras::shuffle(begin(cards), end(cards), rng); 141 | 142 | /* Output the shuffled deck */ 143 | printf(" Cards:"); 144 | static const signed char number[] = {'A', '2', '3', '4', '5', '6', '7', 145 | '8', '9', 'T', 'J', 'Q', 'K'}; 146 | static const signed char suit[] = {'h', 'c', 'd', 's'}; 147 | int i = 0; 148 | for (auto card : cards) { 149 | ++i; 150 | cout << " " << number[card / SUITS] << suit[card % SUITS]; 151 | if (i % 22 == 0) 152 | cout << "\n\t"; 153 | } 154 | 155 | cout << "\n" << endl; 156 | } 157 | 158 | return 0; 159 | } 160 | 161 | #else // i.e. PCG_EMULATED_128BIT_MATH && AWKWARD_128BIT_CODE 162 | 163 | int main() 164 | { 165 | // It's not that it *can't* be done, it just requires either C++14-style 166 | // constexpr or some things not to be declared const. 167 | cout << "Sorry, " STRINGIFY(RNG) " not supported with emulated 128-bit math" 168 | << endl; 169 | } 170 | 171 | #endif 172 | -------------------------------------------------------------------------------- /test-high/pcg-test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * PCG Random Number Generation for C++ 3 | * 4 | * Copyright 2014-2017 Melissa O'Neill , 5 | * and the PCG Project contributors. 6 | * 7 | * SPDX-License-Identifier: (Apache-2.0 OR MIT) 8 | * 9 | * Licensed under the Apache License, Version 2.0 (provided in 10 | * LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 11 | * or under the MIT license (provided in LICENSE-MIT.txt and at 12 | * http://opensource.org/licenses/MIT), at your option. This file may not 13 | * be copied, modified, or distributed except according to those terms. 14 | * 15 | * Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 16 | * express or implied. See your chosen license for details. 17 | * 18 | * For additional information about the PCG random number generation scheme, 19 | * visit http://www.pcg-random.org/. 20 | */ 21 | 22 | /* 23 | * This file is based on the demo program for the C generation schemes. 24 | * It shows some basic generation tasks. 25 | */ 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include // for random_device 37 | 38 | #include "pcg_random.hpp" 39 | 40 | // This code can be compiled with the preprocessor symbol RNG set to the 41 | // PCG generator you'd like to test. 42 | 43 | #ifndef RNG 44 | #define RNG pcg32 45 | #define TWO_ARG_INIT 1 46 | #endif 47 | 48 | #define STRINGIFY_IMPL(x) #x 49 | #define STRINGIFY(x) STRINGIFY_IMPL(x) 50 | 51 | using namespace std; 52 | using pcg_extras::operator<<; 53 | 54 | #if !PCG_EMULATED_128BIT_MATH || !AWKWARD_128BIT_CODE 55 | 56 | int main(int argc, char** argv) 57 | { 58 | // Read command-line options 59 | 60 | int rounds = 5; 61 | bool nondeterministic_seed = false; 62 | 63 | ++argv; 64 | --argc; 65 | if (argc > 0 && strcmp(argv[0], "-r") == 0) { 66 | nondeterministic_seed = true; 67 | ++argv; 68 | --argc; 69 | } 70 | if (argc > 0) { 71 | rounds = atoi(argv[0]); 72 | } 73 | 74 | /* Many of the generators can be initialized with two arguments; the second 75 | * one specifies the stream. 76 | */ 77 | 78 | #if TWO_ARG_INIT 79 | RNG rng(42u, 54u); 80 | #else 81 | RNG rng(42u); 82 | #endif 83 | 84 | if (nondeterministic_seed) { 85 | // Seed with external entropy from std::random_device (a handy 86 | // utility provided by pcg_extras). 87 | rng.seed(pcg_extras::seed_seq_from()); 88 | } 89 | 90 | constexpr auto bits = sizeof(RNG::result_type) * CHAR_BIT; 91 | constexpr int how_many_nums = bits <= 8 ? 14 92 | : bits <= 16 ? 10 93 | : 6; 94 | constexpr int wrap_nums_at = bits > 64 ? 2 95 | : bits > 32 ? 3 96 | : how_many_nums; 97 | 98 | cout << STRINGIFY(RNG) << ":\n" 99 | // << " - aka: " << pcg_extras::printable_typename() 100 | // ^-- we skip this line because the output is long, scary, ugly, and 101 | // and varies depending on the platform 102 | << " - result: " << bits << "-bit unsigned int\n" 103 | << " - period: 2^" << RNG::period_pow2(); 104 | if (RNG::streams_pow2() > 0) 105 | cout << " (* 2^" << RNG::streams_pow2() << " streams)"; 106 | cout << "\n - size: " << sizeof(RNG) << " bytes\n\n"; 107 | 108 | for (int round = 1; round <= rounds; ++round) { 109 | printf("Round %d:\n", round); 110 | 111 | /* Make some N-bit numbers */ 112 | cout << setw(4) << setfill(' ') << bits << "bit:"; 113 | for (int i = 0; i < how_many_nums; ++i) { 114 | if (i > 0 && i % wrap_nums_at == 0) 115 | cout << "\n\t"; 116 | cout << " 0x" << hex << setfill('0') 117 | << setw(sizeof(RNG::result_type)*2) << rng(); 118 | } 119 | cout << endl; 120 | 121 | cout << " Again:"; 122 | rng.backstep(6); 123 | for (int i = 0; i < how_many_nums; ++i) { 124 | if (i > 0 && i % wrap_nums_at == 0) 125 | cout << "\n\t"; 126 | cout << " 0x" << hex << setfill('0') 127 | << setw(sizeof(RNG::result_type)*2) << rng(); 128 | } 129 | cout << dec << endl; 130 | 131 | /* Toss some coins */ 132 | cout << " Coins: "; 133 | for (int i = 0; i < 65; ++i) 134 | cout << (rng(2) ? "H" : "T"); 135 | cout << endl; 136 | 137 | RNG rng_copy{rng}; 138 | /* Roll some dice */ 139 | printf(" Rolls:"); 140 | for (int i = 0; i < 33; ++i) 141 | cout << " " << (uint32_t(rng(6)) + 1); 142 | cout << "\n --> rolling dice used " 143 | << (rng - rng_copy) << " random numbers" << endl; 144 | 145 | /* Deal some cards using pcg_extras::shuffle, which follows 146 | * the algorithm for shuffling that most programmers would expect. 147 | * (It's unspecified how std::shuffle works.) 148 | */ 149 | enum { SUITS = 4, NUMBERS = 13, CARDS = 52 }; 150 | char cards[CARDS]; 151 | iota(begin(cards), end(cards), 0); 152 | pcg_extras::shuffle(begin(cards), end(cards), rng); 153 | 154 | /* Output the shuffled deck */ 155 | printf(" Cards:"); 156 | static const signed char number[] = {'A', '2', '3', '4', '5', '6', '7', 157 | '8', '9', 'T', 'J', 'Q', 'K'}; 158 | static const signed char suit[] = {'h', 'c', 'd', 's'}; 159 | int i = 0; 160 | for (auto card : cards) { 161 | ++i; 162 | cout << " " << number[card / SUITS] << suit[card % SUITS]; 163 | if (i % 22 == 0) 164 | cout << "\n\t"; 165 | } 166 | 167 | cout << "\n" << endl; 168 | } 169 | 170 | return 0; 171 | } 172 | 173 | #else // i.e. PCG_EMULATED_128BIT_MATH && AWKWARD_128BIT_CODE 174 | 175 | int main() 176 | { 177 | // It's not that it *can't* be done, it just requires either C++14-style 178 | // constexpr or some things not to be declared const. 179 | cout << "Sorry, " STRINGIFY(RNG) " not supported with emulated 128-bit math" 180 | << endl; 181 | } 182 | 183 | #endif 184 | -------------------------------------------------------------------------------- /test-high/run-tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # PCG Random Number Generation for C. 4 | # 5 | # Copyright 2014-2017 Melissa O'Neill , 6 | # and the PCG Project contributors. 7 | # 8 | # SPDX-License-Identifier: (Apache-2.0 OR MIT) 9 | # 10 | # Licensed under the Apache License, Version 2.0 (provided in 11 | # LICENSE-APACHE.txt and at http://www.apache.org/licenses/LICENSE-2.0) 12 | # or under the MIT license (provided in LICENSE-MIT.txt and at 13 | # http://opensource.org/licenses/MIT), at your option. This file may not 14 | # be copied, modified, or distributed except according to those terms. 15 | # 16 | # Distributed on an "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, either 17 | # express or implied. See your chosen license for details. 18 | # 19 | # For additional information about the PCG random number generation scheme, 20 | # visit http://www.pcg-random.org/. 21 | # 22 | 23 | echo Performing a quick sanity check... 24 | 25 | mkdir -p actual 26 | rm -f actual/* 27 | 28 | ./check-pcg32 > actual/check-pcg32.out 29 | ./check-pcg32_oneseq > actual/check-pcg32_oneseq.out 30 | ./check-pcg32 > /dev/null 31 | ./check-pcg32_fast > actual/check-pcg32_fast.out 32 | 33 | ./check-pcg64 > actual/check-pcg64.out 34 | ./check-pcg64_oneseq > actual/check-pcg64_oneseq.out 35 | ./check-pcg64_unique > /dev/null 36 | ./check-pcg64_fast > actual/check-pcg64_fast.out 37 | 38 | ./check-pcg8_once_insecure > actual/check-pcg8_once_insecure.out 39 | ./check-pcg16_once_insecure > actual/check-pcg16_once_insecure.out 40 | ./check-pcg32_once_insecure > actual/check-pcg32_once_insecure.out 41 | ./check-pcg64_once_insecure > actual/check-pcg64_once_insecure.out 42 | ./check-pcg128_once_insecure > actual/check-pcg128_once_insecure.out 43 | 44 | ./check-pcg8_oneseq_once_insecure > actual/check-pcg8_oneseq_once_insecure.out 45 | ./check-pcg16_oneseq_once_insecure > actual/check-pcg16_oneseq_once_insecure.out 46 | ./check-pcg32_oneseq_once_insecure > actual/check-pcg32_oneseq_once_insecure.out 47 | ./check-pcg64_oneseq_once_insecure > actual/check-pcg64_oneseq_once_insecure.out 48 | ./check-pcg128_oneseq_once_insecure > actual/check-pcg128_oneseq_once_insecure.out 49 | 50 | ./check-pcg32_k2 > actual/check-pcg32_k2.out 51 | ./check-pcg32_k2_fast > actual/check-pcg32_k2_fast.out 52 | 53 | ./check-pcg32_k64 > actual/check-pcg32_k64.out 54 | ./check-pcg32_k64_oneseq > actual/check-pcg32_k64_oneseq.out 55 | ./check-pcg32_k64_fast > actual/check-pcg32_k64_fast.out 56 | 57 | ./check-pcg32_c64 > actual/check-pcg32_c64.out 58 | ./check-pcg32_c64_oneseq > actual/check-pcg32_c64_oneseq.out 59 | ./check-pcg32_c64_fast > actual/check-pcg32_c64_fast.out 60 | 61 | ./check-pcg64_k32 > actual/check-pcg64_k32.out 62 | ./check-pcg64_k32_oneseq > actual/check-pcg64_k32_oneseq.out 63 | ./check-pcg64_k32_fast > actual/check-pcg64_k32_fast.out 64 | 65 | ./check-pcg64_c32 > actual/check-pcg64_c32.out 66 | ./check-pcg64_c32_oneseq > actual/check-pcg64_c32_oneseq.out 67 | ./check-pcg64_c32_fast > actual/check-pcg64_c32_fast.out 68 | 69 | ./check-pcg32_k1024 > actual/check-pcg32_k1024.out 70 | ./check-pcg32_k1024_fast > actual/check-pcg32_k1024_fast.out 71 | 72 | ./check-pcg32_c1024 > actual/check-pcg32_c1024.out 73 | ./check-pcg32_c1024_fast > actual/check-pcg32_c1024_fast.out 74 | 75 | ./check-pcg64_k1024 > actual/check-pcg64_k1024.out 76 | ./check-pcg64_k1024_fast > actual/check-pcg64_k1024_fast.out 77 | 78 | ./check-pcg64_c1024 > actual/check-pcg64_c1024.out 79 | ./check-pcg64_c1024_fast > actual/check-pcg64_c1024_fast.out 80 | 81 | ./check-pcg32_k16384 > actual/check-pcg32_k16384.out 82 | ./check-pcg32_k16384_fast > actual/check-pcg32_k16384_fast.out 83 | 84 | find actual -type f -size -80c -delete 85 | 86 | if diff -ru -x .gitignore expected actual 87 | then 88 | echo All tests succeeded. 89 | else 90 | echo '' 91 | if diff -x "*-pcg64_[ck]*.out" \ 92 | -x "*-pcg128_[ck]*.out" -ru expected actual > /dev/null 93 | then 94 | echo All tests except tests awkward tests with 128-bit math succceed. 95 | else 96 | echo ERROR: Some tests failed. 97 | fi 98 | fi 99 | --------------------------------------------------------------------------------