pax_global_header00006660000000000000000000000064125004775520014521gustar00rootroot0000000000000052 comment=726e919c2dd22a3cdaccb0674c5422ab4fa7a216 pcg-cpp-0.98.1/000077500000000000000000000000001250047755200131515ustar00rootroot00000000000000pcg-cpp-0.98.1/.gitignore000066400000000000000000000004541250047755200151440ustar00rootroot00000000000000# Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Fortran module files *.mod # Compiled Static libraries *.lai *.la *.a *.lib # Debug Information *.dSYM # Executables *.exe *.out *.app # Actual Project Executables pcg-cpp-0.98.1/LICENSE.txt000066400000000000000000000261351250047755200150030ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. pcg-cpp-0.98.1/Makefile000066400000000000000000000020511250047755200146070ustar00rootroot00000000000000# # PCG Random Number Generation for C++. # # Copyright 2014 Melissa O'Neill # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # For additional information about the PCG random number generation scheme, # including its license and other licensing options, visit # # http://www.pcg-random.org # all: cd test-high; $(MAKE) cd sample; $(MAKE) PREFIX = /usr/local install: all install -m 0644 include/*.hpp $PREFIX/include test: all cd test-high; $(MAKE) test clean: cd test-high; $(MAKE) clean cd sample; $(MAKE) clean pcg-cpp-0.98.1/README.md000066400000000000000000000040351250047755200144320ustar00rootroot00000000000000# PCG Random Number Generation, C++ Edition [PCG-Random website]: http://www.pcg-random.org This code provides an implementation of the PCG family of random number generators, which are fast, statistically excellent, and offer a number of useful features. Full details can be found at the [PCG-Random website]. This version of the code provides many family members -- if you just want one simple generator, you may prefer the minimal C version of the library. There are two kinds of generator, normal generators and extended generators. Extended generators provide *k* dimensional equidistribution and can perform party tricks, but generally speaking most people only need the normal generators. There are two ways to access the generators, using a convenience typedef 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). ## Documentation and Examples Visit [PCG-Random website] for information on how to use this library, or look at the sample code in the `sample` directory -- hopefully it should be fairly self explanatory. ## Building The code is written in C++11, as an include-only library (i.e., there is nothing you need to build). There are some provided demo programs and tests however. On a Unix-style system (e.g., Linux, Mac OS X) you should be able to just type type make To build the demo programs. ## Testing Run make test ## Directory Structure The directories are arranged as follows: * `include` -- contains `pcg_random.hpp` and supporting include files * `test-high` -- test code for the high-level API where the functions have shorter, less scary-looking names. * `sample` -- sample code, some similar to the code in `test-high` but more human readable, some other examples too pcg-cpp-0.98.1/include/000077500000000000000000000000001250047755200145745ustar00rootroot00000000000000pcg-cpp-0.98.1/include/pcg_extras.hpp000066400000000000000000000464011250047755200174510ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This file provides support code that is useful for random-number generation * but not specific to the PCG generation scheme, including: * - 128-bit int support for platforms where it isn't available natively * - bit twiddling operations * - I/O of 128-bit and 8-bit integers * - Handling the evilness of SeedSeq * - Support for efficiently producing random numbers less than a given * bound */ #ifndef PCG_EXTRAS_HPP_INCLUDED #define PCG_EXTRAS_HPP_INCLUDED 1 #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __GNUC__ #include #endif /* * Abstractions for compiler-specific directives */ #ifdef __GNUC__ #define PCG_NOINLINE __attribute__((noinline)) #else #define PCG_NOINLINE #endif /* * Some members of the PCG library use 128-bit math. When compiling on 64-bit * platforms, both GCC and Clang provide 128-bit integer types that are ideal * for the job. * * On 32-bit platforms (or with other compilers), we fall back to a C++ * class that provides 128-bit unsigned integers instead. It may seem * like we're reinventing the wheel here, because libraries already exist * that support large integers, but most existing libraries provide a very * generic multiprecision code, but here we're operating at a fixed size. * Also, most other libraries are fairly heavyweight. So we use a direct * implementation. Sadly, it's much slower than hand-coded assembly or * direct CPU support. * */ #if __SIZEOF_INT128__ namespace pcg_extras { typedef __uint128_t pcg128_t; } #define PCG_128BIT_CONSTANT(high,low) \ ((pcg128_t(high) << 64) + low) #else #include "pcg_uint128.hpp" namespace pcg_extras { typedef pcg_extras::uint_x4 pcg128_t; } #define PCG_128BIT_CONSTANT(high,low) \ pcg128_t(high,low) #define PCG_EMULATED_128BIT_MATH 1 #endif namespace pcg_extras { /* * We often need to represent a "number of bits". When used normally, these * numbers are never greater than 128, so an unsigned char is plenty. * If you're using a nonstandard generator of a larger size, you can set * PCG_BITCOUNT_T to have it define it as a larger size. (Some compilers * might produce faster code if you set it to an unsigned int.) */ #ifndef PCG_BITCOUNT_T typedef uint8_t bitcount_t; #else typedef PCG_BITCOUNT_T bitcount_t; #endif /* * C++ requires us to be able to serialize RNG state by printing or reading * it from a stream. Because we use 128-bit ints, we also need to be able * ot print them, so here is code to do so. * * This code provides enough functionality to print 128-bit ints in decimal * and zero-padded in hex. It's not a full-featured implementation. */ template std::basic_ostream& operator<<(std::basic_ostream& out, pcg128_t value) { auto desired_base = out.flags() & out.basefield; bool want_hex = desired_base == out.hex; if (want_hex) { uint64_t highpart = uint64_t(value >> 64); uint64_t lowpart = uint64_t(value); auto desired_width = out.width(); if (desired_width > 16) { out.width(desired_width - 16); } if (highpart != 0 || desired_width > 16) out << highpart; CharT oldfill = '\0'; if (highpart != 0) { out.width(16); oldfill = out.fill('0'); } auto oldflags = out.setf(decltype(desired_base){}, out.showbase); out << lowpart; out.setf(oldflags); if (highpart != 0) { out.fill(oldfill); } return out; } constexpr size_t MAX_CHARS_128BIT = 40; char buffer[MAX_CHARS_128BIT]; char* pos = buffer+sizeof(buffer); *(--pos) = '\0'; constexpr auto BASE = pcg128_t(10ULL); do { auto div = value / BASE; auto mod = uint32_t(value - (div * BASE)); *(--pos) = '0' + char(mod); value = div; } while(value != pcg128_t(0ULL)); return out << pos; } template std::basic_istream& operator>>(std::basic_istream& in, pcg128_t& value) { typename std::basic_istream::sentry s(in); if (!s) return in; constexpr auto BASE = pcg128_t(10ULL); pcg128_t current(0ULL); bool did_nothing = true; bool overflow = false; for(;;) { CharT wide_ch = in.get(); if (!in.good()) break; auto ch = in.narrow(wide_ch, '\0'); if (ch < '0' || ch > '9') { in.unget(); break; } did_nothing = false; pcg128_t digit(uint32_t(ch - '0')); pcg128_t timesbase = current*BASE; overflow = overflow || timesbase < current; current = timesbase + digit; overflow = overflow || current < digit; } if (did_nothing || overflow) { in.setstate(std::ios::failbit); if (overflow) current = ~pcg128_t(0ULL); } value = current; return in; } /* * Likewise, if people use tiny rngs, we'll be serializing uint8_t. * If we just used the provided IO operators, they'd read/write chars, * not ints, so we need to define our own. We *can* redefine this operator * here because we're in our own namespace. */ template std::basic_ostream& operator<<(std::basic_ostream&out, uint8_t value) { return out << uint32_t(value); } template std::basic_istream& operator>>(std::basic_istream& in, uint8_t& target) { uint32_t value = 0xdecea5edU; in >> value; if (!in && value == 0xdecea5edU) return in; if (value > uint8_t(~0)) { in.setstate(std::ios::failbit); value = ~0U; } target = uint8_t(value); return in; } /* Unfortunately, the above functions don't get found in preference to the * built in ones, so we create some more specific overloads that will. * Ugh. */ inline std::ostream& operator<<(std::ostream& out, uint8_t value) { return pcg_extras::operator<< (out, value); } inline std::istream& operator>>(std::istream& in, uint8_t& value) { return pcg_extras::operator>> (in, value); } /* * Useful bitwise operations. */ /* * XorShifts are invertable, but they are someting of a pain to invert. * This function backs them out. It's used by the whacky "inside out" * generator defined later. */ template inline itype unxorshift(itype x, bitcount_t bits, bitcount_t shift) { if (2*shift >= bits) { return x ^ (x >> shift); } itype lowmask1 = (itype(1U) << (bits - shift*2)) - 1; itype highmask1 = ~lowmask1; itype top1 = x; itype bottom1 = x & lowmask1; top1 ^= top1 >> shift; top1 &= highmask1; x = top1 | bottom1; itype lowmask2 = (itype(1U) << (bits - shift)) - 1; itype bottom2 = x & lowmask2; bottom2 = unxorshift(bottom2, bits - shift, shift); bottom2 &= lowmask1; return top1 | bottom2; } /* * Rotate left and right. * * In ideal world, compilers would spot idiomatic rotate code and convert it * to a rotate instruction. Of course, opinions vary on what the correct * idiom is and how to spot it. For clang, sometimes it generates better * (but still crappy) code if you define PCG_USE_ZEROCHECK_ROTATE_IDIOM. */ template inline itype rotl(itype value, bitcount_t rot) { constexpr bitcount_t bits = sizeof(itype) * 8; constexpr bitcount_t mask = bits - 1; #if PCG_USE_ZEROCHECK_ROTATE_IDIOM return rot ? (value << rot) | (value >> (bits - rot)) : value; #else return (value << rot) | (value >> ((- rot) & mask)); #endif } template inline itype rotr(itype value, bitcount_t rot) { constexpr bitcount_t bits = sizeof(itype) * 8; constexpr bitcount_t mask = bits - 1; #if PCG_USE_ZEROCHECK_ROTATE_IDIOM return rot ? (value >> rot) | (value << (bits - rot)) : value; #else return (value >> rot) | (value << ((- rot) & mask)); #endif } /* Unfortunately, both Clang and GCC sometimes perform poorly when it comes * to properly recognizing idiomatic rotate code, so for we also provide * assembler directives (enabled with PCG_USE_INLINE_ASM). Boo, hiss. * (I hope that these compilers get better so that this code can die.) * * These overloads will be preferred over the general template code above. */ #if PCG_USE_INLINE_ASM && __GNUC__ && (__x86_64__ || __i386__) inline uint8_t rotr(uint8_t value, bitcount_t rot) { asm ("rorb %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); return value; } inline uint16_t rotr(uint16_t value, bitcount_t rot) { asm ("rorw %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); return value; } inline uint32_t rotr(uint32_t value, bitcount_t rot) { asm ("rorl %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); return value; } #if __x86_64__ inline uint64_t rotr(uint64_t value, bitcount_t rot) { asm ("rorq %%cl, %0" : "=r" (value) : "0" (value), "c" (rot)); return value; } #endif // __x86_64__ #endif // PCG_USE_INLINE_ASM /* * The C++ SeedSeq concept (modelled by seed_seq) can fill an array of * 32-bit integers with seed data, but sometimes we want to produce * larger or smaller integers. * * The following code handles this annoyance. * * uneven_copy will copy an array of 32-bit ints to an array of larger or * smaller ints (actually, the code is general it only needing forward * iterators). The copy is identical to the one that would be performed if * we just did memcpy on a standard little-endian machine, but works * regardless of the endian of the machine (or the weirdness of the ints * involved). * * generate_to initializes an array of integers using a SeedSeq * object. It is given the size as a static constant at compile time and * tries to avoid memory allocation. If we're filling in 32-bit constants * we just do it directly. If we need a separate buffer and it's small, * we allocate it on the stack. Otherwise, we fall back to heap allocation. * Ugh. * * generate_one produces a single value of some integral type using a * SeedSeq object. */ /* uneven_copy helper, case where destination ints are less than 32 bit. */ template SrcIter uneven_copy_impl( SrcIter src_first, DestIter dest_first, DestIter dest_last, std::true_type) { typedef typename std::iterator_traits::value_type src_t; typedef typename std::iterator_traits::value_type dest_t; constexpr bitcount_t SRC_SIZE = sizeof(src_t); constexpr bitcount_t DEST_SIZE = sizeof(dest_t); constexpr bitcount_t DEST_BITS = DEST_SIZE * 8; constexpr bitcount_t SCALE = SRC_SIZE / DEST_SIZE; size_t count = 0; src_t value = 0; while (dest_first != dest_last) { if ((count++ % SCALE) == 0) value = *src_first++; // Get more bits else value >>= DEST_BITS; // Move down bits *dest_first++ = dest_t(value); // Truncates, ignores high bits. } return src_first; } /* uneven_copy helper, case where destination ints are more than 32 bit. */ template SrcIter uneven_copy_impl( SrcIter src_first, DestIter dest_first, DestIter dest_last, std::false_type) { typedef typename std::iterator_traits::value_type src_t; typedef typename std::iterator_traits::value_type dest_t; constexpr auto SRC_SIZE = sizeof(src_t); constexpr auto SRC_BITS = SRC_SIZE * 8; constexpr auto DEST_SIZE = sizeof(dest_t); constexpr auto SCALE = (DEST_SIZE+SRC_SIZE-1) / SRC_SIZE; while (dest_first != dest_last) { dest_t value(0UL); unsigned int shift = 0; for (size_t i = 0; i < SCALE; ++i) { value |= dest_t(*src_first++) << shift; shift += SRC_BITS; } *dest_first++ = value; } return src_first; } /* uneven_copy, call the right code for larger vs. smaller */ template inline SrcIter uneven_copy(SrcIter src_first, DestIter dest_first, DestIter dest_last) { typedef typename std::iterator_traits::value_type src_t; typedef typename std::iterator_traits::value_type dest_t; constexpr bool DEST_IS_SMALLER = sizeof(dest_t) < sizeof(src_t); return uneven_copy_impl(src_first, dest_first, dest_last, std::integral_constant{}); } /* generate_to, fill in a fixed-size array of integral type using a SeedSeq * (actually works for any random-access iterator) */ template inline void generate_to_impl(SeedSeq&& generator, DestIter dest, std::true_type) { generator.generate(dest, dest+size); } template void generate_to_impl(SeedSeq&& generator, DestIter dest, std::false_type) { typedef typename std::iterator_traits::value_type dest_t; constexpr auto DEST_SIZE = sizeof(dest_t); constexpr auto GEN_SIZE = sizeof(uint32_t); constexpr bool GEN_IS_SMALLER = GEN_SIZE < DEST_SIZE; constexpr size_t FROM_ELEMS = GEN_IS_SMALLER ? size * ((DEST_SIZE+GEN_SIZE-1) / GEN_SIZE) : (size + (GEN_SIZE / DEST_SIZE) - 1) / ((GEN_SIZE / DEST_SIZE) + GEN_IS_SMALLER); // this odd code ^^^^^^^^^^^^^^^^^ is work-around for // a bug: http://llvm.org/bugs/show_bug.cgi?id=21287 if (FROM_ELEMS <= 1024) { uint32_t buffer[FROM_ELEMS]; generator.generate(buffer, buffer+FROM_ELEMS); uneven_copy(buffer, dest, dest+size); } else { uint32_t* buffer = static_cast(malloc(GEN_SIZE * FROM_ELEMS)); generator.generate(buffer, buffer+FROM_ELEMS); uneven_copy(buffer, dest, dest+size); free(static_cast(buffer)); } } template inline void generate_to(SeedSeq&& generator, DestIter dest) { typedef typename std::iterator_traits::value_type dest_t; constexpr bool IS_32BIT = sizeof(dest_t) == sizeof(uint32_t); generate_to_impl(std::forward(generator), dest, std::integral_constant{}); } /* generate_one, produce a value of integral type using a SeedSeq * (optionally, we can have it produce more than one and pick which one * we want) */ template inline UInt generate_one(SeedSeq&& generator) { UInt result[N]; generate_to(std::forward(generator), result); return result[i]; } template auto bounded_rand(RngType& rng, typename RngType::result_type upper_bound) -> typename RngType::result_type { typedef typename RngType::result_type rtype; rtype threshold = (RngType::max() - RngType::min() + rtype(1) - upper_bound) % upper_bound; for (;;) { rtype r = rng() - RngType::min(); if (r >= threshold) return r % upper_bound; } } template void shuffle(Iter from, Iter to, RandType&& rng) { typedef typename std::iterator_traits::difference_type delta_t; typedef typename std::remove_reference::type::result_type result_t; auto count = to - from; while (count > 1) { delta_t chosen = delta_t(bounded_rand(rng, result_t(count))); --count; --to; using std::swap; swap(*(from + chosen), *to); } } /* * Although std::seed_seq is useful, it isn't everything. Often we want to * initialize a random-number generator some other way, such as from a random * device. * * Technically, it does not meet the requirements of a SeedSequence because * it lacks some of the rarely-used member functions (some of which would * be impossible to provide). However the C++ standard is quite specific * that actual engines only called the generate method, so it ought not to be * a problem in practice. */ template class seed_seq_from { private: RngType rng_; typedef uint_least32_t result_type; public: template seed_seq_from(Args&&... args) : rng_(std::forward(args)...) { // Nothing (else) to do... } template void generate(Iter start, Iter finish) { for (auto i = start; i != finish; ++i) *i = result_type(rng_()); } constexpr size_t size() const { return (sizeof(typename RngType::result_type) > sizeof(result_type) && RngType::max() > ~size_t(0UL)) ? ~size_t(0UL) : size_t(RngType::max()); } }; /* * Sometimes you might want a distinct seed based on when the program * was compiled. That way, a particular instance of the program will * behave the same way, but when recompiled it'll produce a different * value. */ template struct static_arbitrary_seed { private: static constexpr IntType fnv(IntType hash, const char* pos) { return *pos == '\0' ? hash : fnv((hash * IntType(16777619U)) ^ *pos, (pos+1)); } public: static constexpr IntType value = fnv(IntType(2166136261U ^ sizeof(IntType)), __DATE__ __TIME__ __FILE__); }; // Sometimes, when debugging or testing, it's handy to be able print the name // of a (in human-readable form). This code allows the idiom: // // cout << printable_typename() // // to print out my_foo_type_t (or its concrete type if it is a synonym) template struct printable_typename {}; template std::ostream& operator<<(std::ostream& out, printable_typename) { const char *implementation_typename = typeid(T).name(); #ifdef __GNUC__ int status; char* pretty_name = abi::__cxa_demangle(implementation_typename, NULL, NULL, &status); if (status == 0) out << pretty_name; free(static_cast(pretty_name)); if (status == 0) return out; #endif out << implementation_typename; return out; } } // namespace pcg_extras #endif // PCG_EXTRAS_HPP_INCLUDED pcg-cpp-0.98.1/include/pcg_random.hpp000066400000000000000000001747131250047755200174330ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This code provides the reference implementation of the PCG family of * random number generators. The code is complex because it implements * * - several members of the PCG family, specifically members corresponding * to the output functions: * - XSH RR (good for 64-bit state, 32-bit output) * - XSH RS (good for 64-bit state, 32-bit output) * - XSL RR (good for 128-bit state, 64-bit output) * - RXS M XS (statistically most powerful generator) * - XSL RR RR (good for 128-bit state, 128-bit output) * - and RXS, RXS M, XSH, XSL (mostly for testing) * - at potentially *arbitrary* bit sizes * - with four different techniques for random streams (MCG, one-stream * LCG, settable-stream LCG, unique-stream LCG) * - and the extended generation schemes allowing arbitrary periods * - with all features of C++11 random number generation (and more), * some of which are somewhat painful, including * - initializing with a SeedSequence which writes 32-bit values * to memory, even though the state of the generator may not * use 32-bit values (it might use smaller or larger integers) * - I/O for RNGs and a prescribed format, which needs to handle * the issue that 8-bit and 128-bit integers don't have working * I/O routines (e.g., normally 8-bit = char, not integer) * - equality and inequality for RNGs * - and a number of convenience typedefs to mask all the complexity * * The code employes a fairly heavy level of abstraction, and has to deal * with various C++ minutia. If you're looking to learn about how the PCG * scheme works, you're probably best of starting with one of the other * codebases (see www.pcg-random.org). But if you're curious about the * constants for the various output functions used in those other, simpler, * codebases, this code shows how they are calculated. * * On the positive side, at least there are convenience typedefs so that you * can say * * pcg32 myRNG; * * rather than: * * pcg_detail::engine< * uint32_t, // Output Type * uint64_t, // State Type * pcg_detail::xsh_rr_mixin, true, // Output Func * pcg_detail::specific_stream, // Stream Kind * pcg_detail::default_multiplier // LCG Mult * > myRNG; * */ #ifndef PCG_RAND_HPP_INCLUDED #define PCG_RAND_HPP_INCLUDED 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* * The pcg_extras namespace contains some support code that is likley to * be useful for a variety of RNGs, including: * - 128-bit int support for platforms where it isn't available natively * - bit twiddling operations * - I/O of 128-bit and 8-bit integers * - Handling the evilness of SeedSeq * - Support for efficiently producing random numbers less than a given * bound */ #include "pcg_extras.hpp" namespace pcg_detail { using namespace pcg_extras; /* * The LCG generators need some constants to function. This code lets you * look up the constant by *type*. For example * * default_multiplier::multiplier() * * gives you the default multipler for 32-bit integers. We use the name * of the constant and not a generic word like value to allow these classes * to be used as mixins. */ template struct default_multiplier { // Not defined for an arbitrary type }; template struct default_increment { // Not defined for an arbitrary type }; #define PCG_DEFINE_CONSTANT(type, what, kind, constant) \ template <> \ struct what ## _ ## kind { \ static constexpr type kind() { \ return constant; \ } \ }; PCG_DEFINE_CONSTANT(uint8_t, default, multiplier, 141U) PCG_DEFINE_CONSTANT(uint8_t, default, increment, 77U) PCG_DEFINE_CONSTANT(uint16_t, default, multiplier, 12829U) PCG_DEFINE_CONSTANT(uint16_t, default, increment, 47989U) PCG_DEFINE_CONSTANT(uint32_t, default, multiplier, 747796405U) PCG_DEFINE_CONSTANT(uint32_t, default, increment, 2891336453U) PCG_DEFINE_CONSTANT(uint64_t, default, multiplier, 6364136223846793005ULL) PCG_DEFINE_CONSTANT(uint64_t, default, increment, 1442695040888963407ULL) PCG_DEFINE_CONSTANT(pcg128_t, default, multiplier, PCG_128BIT_CONSTANT(2549297995355413924ULL,4865540595714422341ULL)) PCG_DEFINE_CONSTANT(pcg128_t, default, increment, PCG_128BIT_CONSTANT(6364136223846793005ULL,1442695040888963407ULL)) /* * Each PCG generator is available in four variants, based on how it applies * the additive constant for its underlying LCG; the variations are: * * single stream - all instances use the same fixed constant, thus * the RNG always somewhere in same sequence * mcg - adds zero, resulting in a single stream and reduced * period * specific stream - the constant can be changed at any time, selecting * a different random sequence * unique stream - the constant is based on the memory addresss of the * object, thus every RNG has its own unique sequence * * This variation is provided though mixin classes which define a function * value called increment() that returns the nesessary additive constant. */ /* * unique stream */ template class unique_stream { protected: static constexpr bool is_mcg = false; // Is never called, but is provided for symmetry with specific_stream void set_stream(...) { abort(); } public: typedef itype state_type; constexpr itype increment() const { return itype(reinterpret_cast(this) | 1); } constexpr itype stream() const { return increment() >> 1; } static constexpr bool can_specify_stream = false; static constexpr size_t streams_pow2() { return (sizeof(itype) < sizeof(size_t) ? sizeof(itype) : sizeof(size_t))*8 - 1u; } protected: constexpr unique_stream() = default; }; /* * no stream (mcg) */ template class no_stream { protected: static constexpr bool is_mcg = true; // Is never called, but is provided for symmetry with specific_stream void set_stream(...) { abort(); } public: typedef itype state_type; static constexpr itype increment() { return 0; } static constexpr bool can_specify_stream = false; static constexpr size_t streams_pow2() { return 0u; } protected: constexpr no_stream() = default; }; /* * single stream/sequence (oneseq) */ template class oneseq_stream : public default_increment { protected: static constexpr bool is_mcg = false; // Is never called, but is provided for symmetry with specific_stream void set_stream(...) { abort(); } public: typedef itype state_type; static constexpr itype stream() { return default_increment::increment() >> 1; } static constexpr bool can_specify_stream = false; static constexpr size_t streams_pow2() { return 0u; } protected: constexpr oneseq_stream() = default; }; /* * specific stream */ template class specific_stream { protected: static constexpr bool is_mcg = false; itype inc_ = default_increment::increment(); public: typedef itype state_type; typedef itype stream_state; constexpr itype increment() const { return inc_; } itype stream() { return inc_ >> 1; } void set_stream(itype specific_seq) { inc_ = (specific_seq << 1) | 1; } static constexpr bool can_specify_stream = true; static constexpr size_t streams_pow2() { return (sizeof(itype)*8) - 1u; } protected: specific_stream() = default; specific_stream(itype specific_seq) : inc_(itype(specific_seq << 1) | itype(1U)) { // Nothing (else) to do. } }; /* * This is where it all comes together. This function joins together three * mixin classes which define * - the LCG additive constant (the stream) * - the LCG multiplier * - the output function * in addition, we specify the type of the LCG state, and the result type, * and whether to use the pre-advance version of the state for the output * (increasing instruction-level parallelism) or the post-advance version * (reducing register pressure). * * Given the high level of parameterization, the code has to use some * template-metaprogramming tricks to handle some of the suble variations * involved. */ template , typename multiplier_mixin = default_multiplier > class engine : protected output_mixin, public stream_mixin, protected multiplier_mixin { protected: itype state_; struct can_specify_stream_tag {}; struct no_specifiable_stream_tag {}; using stream_mixin::increment; using multiplier_mixin::multiplier; public: typedef xtype result_type; typedef itype state_type; static constexpr size_t period_pow2() { return sizeof(state_type)*8 - 2*stream_mixin::is_mcg; } // It would be nice to use std::numeric_limits for these, but // we can't be sure that it'd be defined for the 128-bit types. static constexpr result_type min() { return result_type(0UL); } static constexpr result_type max() { return result_type(~result_type(0UL)); } protected: itype bump(itype state) { return state * multiplier() + increment(); } itype base_generate() { return state_ = bump(state_); } itype base_generate0() { itype old_state = state_; state_ = bump(state_); return old_state; } public: result_type operator()() { if (output_previous) return this->output(base_generate0()); else return this->output(base_generate()); } result_type operator()(result_type upper_bound) { return bounded_rand(*this, upper_bound); } protected: static itype advance(itype state, itype delta, itype cur_mult, itype cur_plus); static itype distance(itype cur_state, itype newstate, itype cur_mult, itype cur_plus, itype mask = ~itype(0U)); itype distance(itype newstate, itype mask = itype(~itype(0U))) const { return distance(state_, newstate, multiplier(), increment(), mask); } public: void advance(itype delta) { state_ = advance(state_, delta, this->multiplier(), this->increment()); } void backstep(itype delta) { advance(-delta); } void discard(itype delta) { advance(delta); } bool wrapped() { if (stream_mixin::is_mcg) { // For MCGs, the low order two bits never change. In this // implementation, we keep them fixed at 3 to make this test // easier. return state_ == 3; } else { return state_ == 0; } } engine(itype state = itype(0xcafef00dd15ea5e5ULL)) : state_(this->is_mcg ? state|state_type(3U) : bump(state + this->increment())) { // Nothing else to do. } // This function may or may not exist. It thus has to be a template // to use SFINAE; users don't have to worry about its template-ness. template engine(itype state, typename sm::stream_state stream_seed) : stream_mixin(stream_seed), state_(this->is_mcg ? state|state_type(3U) : bump(state + this->increment())) { // Nothing else to do. } template engine(SeedSeq&& seedSeq, typename std::enable_if< !stream_mixin::can_specify_stream && !std::is_convertible::value && !std::is_convertible::value, no_specifiable_stream_tag>::type = {}) : engine(generate_one(std::forward(seedSeq))) { // Nothing else to do. } template engine(SeedSeq&& seedSeq, typename std::enable_if< stream_mixin::can_specify_stream && !std::is_convertible::value && !std::is_convertible::value, can_specify_stream_tag>::type = {}) : engine(generate_one(seedSeq), generate_one(seedSeq)) { // Nothing else to do. } template void seed(Args&&... args) { new (this) engine(std::forward(args)...); } template friend bool operator==(const engine&, const engine&); template friend itype1 operator-(const engine&, const engine&); template friend std::basic_ostream& operator<<(std::basic_ostream& out, const engine&); template friend std::basic_istream& operator>>(std::basic_istream& in, engine& rng); }; template std::basic_ostream& operator<<(std::basic_ostream& out, const engine& rng) { auto orig_flags = out.flags(std::ios_base::dec | std::ios_base::left); auto space = out.widen(' '); auto orig_fill = out.fill(); out << rng.multiplier() << space << rng.increment() << space << rng.state_; out.flags(orig_flags); out.fill(orig_fill); return out; } template std::basic_istream& operator>>(std::basic_istream& in, engine& rng) { auto orig_flags = in.flags(std::ios_base::dec | std::ios_base::skipws); itype multiplier, increment, state; in >> multiplier >> increment >> state; if (!in.fail()) { bool good = true; if (multiplier != rng.multiplier()) { good = false; } else if (rng.can_specify_stream) { rng.set_stream(increment >> 1); } else if (increment != rng.increment()) { good = false; } if (good) { rng.state_ = state; } else { in.clear(std::ios::failbit); } } in.flags(orig_flags); return in; } template itype engine::advance( itype state, itype delta, itype cur_mult, itype cur_plus) { // The method used here is based on Brown, "Random Number Generation // with Arbitrary Stride,", Transactions of the American Nuclear // Society (Nov. 1994). The algorithm is very similar to fast // exponentiation. // // Even though delta is an unsigned integer, we can pass a // signed integer to go backwards, it just goes "the long way round". constexpr itype ZERO = 0u; // itype may be a non-trivial types, so constexpr itype ONE = 1u; // we define some ugly constants. itype acc_mult = 1; itype acc_plus = 0; while (delta > ZERO) { if (delta & ONE) { acc_mult *= cur_mult; acc_plus = acc_plus*cur_mult + cur_plus; } cur_plus = (cur_mult+ONE)*cur_plus; cur_mult *= cur_mult; delta >>= 1; } return acc_mult * state + acc_plus; } template itype engine::distance( itype cur_state, itype newstate, itype cur_mult, itype cur_plus, itype mask) { constexpr itype ONE = 1u; // itype could be weird, so use constant itype the_bit = stream_mixin::is_mcg ? itype(4u) : itype(1u); itype distance = 0u; while ((cur_state & mask) != (newstate & mask)) { if ((cur_state & the_bit) != (newstate & the_bit)) { cur_state = cur_state * cur_mult + cur_plus; distance |= the_bit; } assert((cur_state & the_bit) == (newstate & the_bit)); the_bit <<= 1; cur_plus = (cur_mult+ONE)*cur_plus; cur_mult *= cur_mult; } return stream_mixin::is_mcg ? distance >> 2 : distance; } template itype operator-(const engine& lhs, const engine& rhs) { if (lhs.multiplier() != rhs.multiplier() || lhs.increment() != rhs.increment()) throw std::logic_error("incomparable generators"); return rhs.distance(lhs.state_); } template bool operator==(const engine& lhs, const engine& rhs) { return (lhs.multiplier() == rhs.multiplier()) && (lhs.increment() == rhs.increment()) && (lhs.state_ == rhs.state_); } template inline bool operator!=(const engine& lhs, const engine& rhs) { return !operator==(lhs,rhs); } template class output_mixin, bool output_previous = (sizeof(itype) <= 8)> using oneseq_base = engine, output_previous, oneseq_stream >; template class output_mixin, bool output_previous = (sizeof(itype) <= 8)> using unique_base = engine, output_previous, unique_stream >; template class output_mixin, bool output_previous = (sizeof(itype) <= 8)> using setseq_base = engine, output_previous, specific_stream >; template class output_mixin, bool output_previous = (sizeof(itype) <= 8)> using mcg_base = engine, output_previous, no_stream >; /* * OUTPUT FUNCTIONS. * * These are the core of the PCG generation scheme. They specify how to * turn the base LCG's internal state into the output value of the final * generator. * * They're implemented as mixin classes. * * All of the classes have code that is written to allow it to be applied * at *arbitrary* bit sizes, although in practice they'll only be used at * standard sizes supported by C++. */ /* * XSH RS -- high xorshift, followed by a random shift * * Fast. A good performer. */ template struct xsh_rs_mixin { static xtype output(itype internal) { constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype) * 8); constexpr bitcount_t sparebits = bits - xtypebits; constexpr bitcount_t opbits = sparebits-5 >= 64 ? 5 : sparebits-4 >= 32 ? 4 : sparebits-3 >= 16 ? 3 : sparebits-2 >= 4 ? 2 : sparebits-1 >= 1 ? 1 : 0; constexpr bitcount_t mask = (1 << opbits) - 1; constexpr bitcount_t maxrandshift = mask; constexpr bitcount_t topspare = opbits; constexpr bitcount_t bottomspare = sparebits - topspare; constexpr bitcount_t xshift = topspare + (xtypebits+maxrandshift)/2; bitcount_t rshift = opbits ? bitcount_t(internal >> (bits - opbits)) & mask : 0; internal ^= internal >> xshift; xtype result = xtype(internal >> (bottomspare - maxrandshift + rshift)); return result; } }; /* * XSH RR -- high xorshift, followed by a random rotate * * Fast. A good performer. Slightly better statistically than XSH RS. */ template struct xsh_rr_mixin { static xtype output(itype internal) { constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype)*8); constexpr bitcount_t sparebits = bits - xtypebits; constexpr bitcount_t wantedopbits = xtypebits >= 128 ? 7 : xtypebits >= 64 ? 6 : xtypebits >= 32 ? 5 : xtypebits >= 16 ? 4 : 3; constexpr bitcount_t opbits = sparebits >= wantedopbits ? wantedopbits : sparebits; constexpr bitcount_t amplifier = wantedopbits - opbits; constexpr bitcount_t mask = (1 << opbits) - 1; constexpr bitcount_t topspare = opbits; constexpr bitcount_t bottomspare = sparebits - topspare; constexpr bitcount_t xshift = (topspare + xtypebits)/2; bitcount_t rot = opbits ? bitcount_t(internal >> (bits - opbits)) & mask : 0; bitcount_t amprot = (rot << amplifier) & mask; internal ^= internal >> xshift; xtype result = xtype(internal >> bottomspare); result = rotr(result, amprot); return result; } }; /* * RXS -- random xorshift */ template struct rxs_mixin { static xtype output_rxs(itype internal) { constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype)*8); constexpr bitcount_t shift = bits - xtypebits; constexpr bitcount_t extrashift = (xtypebits - shift)/2; bitcount_t rshift = shift > 64+8 ? (internal >> (bits - 6)) & 63 : shift > 32+4 ? (internal >> (bits - 5)) & 31 : shift > 16+2 ? (internal >> (bits - 4)) & 15 : shift > 8+1 ? (internal >> (bits - 3)) & 7 : shift > 4+1 ? (internal >> (bits - 2)) & 3 : shift > 2+1 ? (internal >> (bits - 1)) & 1 : 0; internal ^= internal >> (shift + extrashift - rshift); xtype result = internal >> rshift; return result; } }; /* * RXS M XS -- random xorshift, mcg multiply, fixed xorshift * * The most statistically powerful generator, but all those steps * make it slower than some of the others. We give it the rottenest jobs. * * Because it's usually used in contexts where the state type and the * result type are the same, it is a permutation and is thus invertable. * We thus provide a function to invert it. This function is used to * for the "inside out" generator used by the extended generator. */ /* Defined type-based concepts for the multiplication step. They're actually * all derived by truncating the 128-bit, which was computed to be a good * "universal" constant. */ template struct mcg_multiplier { // Not defined for an arbitrary type }; template struct mcg_unmultiplier { // Not defined for an arbitrary type }; PCG_DEFINE_CONSTANT(uint8_t, mcg, multiplier, 217U) PCG_DEFINE_CONSTANT(uint8_t, mcg, unmultiplier, 105U) PCG_DEFINE_CONSTANT(uint16_t, mcg, multiplier, 62169U) PCG_DEFINE_CONSTANT(uint16_t, mcg, unmultiplier, 28009U) PCG_DEFINE_CONSTANT(uint32_t, mcg, multiplier, 277803737U) PCG_DEFINE_CONSTANT(uint32_t, mcg, unmultiplier, 2897767785U) PCG_DEFINE_CONSTANT(uint64_t, mcg, multiplier, 12605985483714917081ULL) PCG_DEFINE_CONSTANT(uint64_t, mcg, unmultiplier, 15009553638781119849ULL) PCG_DEFINE_CONSTANT(pcg128_t, mcg, multiplier, PCG_128BIT_CONSTANT(17766728186571221404ULL, 12605985483714917081ULL)) PCG_DEFINE_CONSTANT(pcg128_t, mcg, unmultiplier, PCG_128BIT_CONSTANT(14422606686972528997ULL, 15009553638781119849ULL)) template struct rxs_m_xs_mixin { static xtype output(itype internal) { constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype) * 8); constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t opbits = xtypebits >= 128 ? 6 : xtypebits >= 64 ? 5 : xtypebits >= 32 ? 4 : xtypebits >= 16 ? 3 : 2; constexpr bitcount_t shift = bits - xtypebits; constexpr bitcount_t mask = (1 << opbits) - 1; bitcount_t rshift = opbits ? bitcount_t(internal >> (bits - opbits)) & mask : 0; internal ^= internal >> (opbits + rshift); internal *= mcg_multiplier::multiplier(); xtype result = internal >> shift; result ^= result >> ((2U*xtypebits+2U)/3U); return result; } static itype unoutput(itype internal) { constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t opbits = bits >= 128 ? 6 : bits >= 64 ? 5 : bits >= 32 ? 4 : bits >= 16 ? 3 : 2; constexpr bitcount_t mask = (1 << opbits) - 1; internal = unxorshift(internal, bits, (2U*bits+2U)/3U); internal *= mcg_unmultiplier::unmultiplier(); bitcount_t rshift = opbits ? (internal >> (bits - opbits)) & mask : 0; internal = unxorshift(internal, bits, opbits + rshift); return internal; } }; /* * RXS M -- random xorshift, mcg multiply */ template struct rxs_m_mixin { static xtype output(itype internal) { constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype) * 8); constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t opbits = xtypebits >= 128 ? 6 : xtypebits >= 64 ? 5 : xtypebits >= 32 ? 4 : xtypebits >= 16 ? 3 : 2; constexpr bitcount_t shift = bits - xtypebits; constexpr bitcount_t mask = (1 << opbits) - 1; bitcount_t rshift = opbits ? (internal >> (bits - opbits)) & mask : 0; internal ^= internal >> (opbits + rshift); internal *= mcg_multiplier::multiplier(); xtype result = internal >> shift; return result; } }; /* * XSL RR -- fixed xorshift (to low bits), random rotate * * Useful for 128-bit types that are split across two CPU registers. */ template struct xsl_rr_mixin { static xtype output(itype internal) { constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype) * 8); constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t sparebits = bits - xtypebits; constexpr bitcount_t wantedopbits = xtypebits >= 128 ? 7 : xtypebits >= 64 ? 6 : xtypebits >= 32 ? 5 : xtypebits >= 16 ? 4 : 3; constexpr bitcount_t opbits = sparebits >= wantedopbits ? wantedopbits : sparebits; constexpr bitcount_t amplifier = wantedopbits - opbits; constexpr bitcount_t mask = (1 << opbits) - 1; constexpr bitcount_t topspare = sparebits; constexpr bitcount_t bottomspare = sparebits - topspare; constexpr bitcount_t xshift = (topspare + xtypebits) / 2; bitcount_t rot = opbits ? bitcount_t(internal >> (bits - opbits)) & mask : 0; bitcount_t amprot = (rot << amplifier) & mask; internal ^= internal >> xshift; xtype result = xtype(internal >> bottomspare); result = rotr(result, amprot); return result; } }; /* * XSL RR RR -- fixed xorshift (to low bits), random rotate (both parts) * * Useful for 128-bit types that are split across two CPU registers. * If you really want an invertable 128-bit RNG, I guess this is the one. */ template struct halfsize_trait {}; template <> struct halfsize_trait { typedef uint64_t type; }; template <> struct halfsize_trait { typedef uint32_t type; }; template <> struct halfsize_trait { typedef uint16_t type; }; template <> struct halfsize_trait { typedef uint8_t type; }; template struct xsl_rr_rr_mixin { typedef typename halfsize_trait::type htype; static itype output(itype internal) { constexpr bitcount_t htypebits = bitcount_t(sizeof(htype) * 8); constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t sparebits = bits - htypebits; constexpr bitcount_t wantedopbits = htypebits >= 128 ? 7 : htypebits >= 64 ? 6 : htypebits >= 32 ? 5 : htypebits >= 16 ? 4 : 3; constexpr bitcount_t opbits = sparebits >= wantedopbits ? wantedopbits : sparebits; constexpr bitcount_t amplifier = wantedopbits - opbits; constexpr bitcount_t mask = (1 << opbits) - 1; constexpr bitcount_t topspare = sparebits; constexpr bitcount_t xshift = (topspare + htypebits) / 2; bitcount_t rot = opbits ? bitcount_t(internal >> (bits - opbits)) & mask : 0; bitcount_t amprot = (rot << amplifier) & mask; internal ^= internal >> xshift; htype lowbits = htype(internal); lowbits = rotr(lowbits, amprot); htype highbits = htype(internal >> topspare); bitcount_t rot2 = lowbits & mask; bitcount_t amprot2 = (rot2 << amplifier) & mask; highbits = rotr(highbits, amprot2); return (itype(highbits) << topspare) ^ itype(lowbits); } }; /* * XSH -- fixed xorshift (to high bits) * * You shouldn't use this at 64-bits or less. */ template struct xsh_mixin { static xtype output(itype internal) { constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype) * 8); constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t sparebits = bits - xtypebits; constexpr bitcount_t topspare = 0; constexpr bitcount_t bottomspare = sparebits - topspare; constexpr bitcount_t xshift = (topspare + xtypebits) / 2; internal ^= internal >> xshift; xtype result = internal >> bottomspare; return result; } }; /* * XSL -- fixed xorshift (to low bits) * * You shouldn't use this at 64-bits or less. */ template struct xsl_mixin { inline xtype output(itype internal) { constexpr bitcount_t xtypebits = bitcount_t(sizeof(xtype) * 8); constexpr bitcount_t bits = bitcount_t(sizeof(itype) * 8); constexpr bitcount_t sparebits = bits - xtypebits; constexpr bitcount_t topspare = sparebits; constexpr bitcount_t bottomspare = sparebits - topspare; constexpr bitcount_t xshift = (topspare + xtypebits) / 2; internal ^= internal >> xshift; xtype result = internal >> bottomspare; return result; } }; /* ---- End of Output Functions ---- */ template struct inside_out : private baseclass { inside_out() = delete; typedef typename baseclass::result_type result_type; typedef typename baseclass::state_type state_type; static_assert(sizeof(result_type) == sizeof(state_type), "Require a RNG whose output function is a permutation"); static bool external_step(result_type& randval, size_t i) { state_type state = baseclass::unoutput(randval); state = state * baseclass::multiplier() + baseclass::increment() + state_type(i*2); result_type result = baseclass::output(state); randval = result; state_type zero = baseclass::is_mcg ? state & state_type(3U) : state_type(0U); return result == zero; } static bool external_advance(result_type& randval, size_t i, result_type delta, bool forwards = true) { state_type state = baseclass::unoutput(randval); state_type mult = baseclass::multiplier(); state_type inc = baseclass::increment() + state_type(i*2); state_type zero = baseclass::is_mcg ? state & state_type(3U) : state_type(0U); state_type dist_to_zero = baseclass::distance(state, zero, mult, inc); bool crosses_zero = forwards ? dist_to_zero <= delta : (-dist_to_zero) <= delta; if (!forwards) delta = -delta; state = baseclass::advance(state, delta, mult, inc); randval = baseclass::output(state); return crosses_zero; } }; template class extended : public baseclass { public: typedef typename baseclass::state_type state_type; typedef typename baseclass::result_type result_type; typedef inside_out insideout; private: static constexpr bitcount_t rtypebits = sizeof(result_type)*8; static constexpr bitcount_t stypebits = sizeof(state_type)*8; static constexpr bitcount_t tick_limit_pow2 = 64U; static constexpr size_t table_size = 1UL << table_pow2; static constexpr size_t table_shift = stypebits - table_pow2; static constexpr state_type table_mask = (state_type(1U) << table_pow2) - state_type(1U); static constexpr bool may_tick = (advance_pow2 < stypebits) && (advance_pow2 < tick_limit_pow2); static constexpr size_t tick_shift = stypebits - advance_pow2; static constexpr state_type tick_mask = may_tick ? state_type( (uint64_t(1) << (advance_pow2*may_tick)) - 1) // ^-- stupidity to appease GCC warnings : ~state_type(0U); static constexpr bool may_tock = stypebits < tick_limit_pow2; result_type data_[table_size]; PCG_NOINLINE void advance_table(); PCG_NOINLINE void advance_table(state_type delta, bool isForwards = true); result_type& get_extended_value() { state_type state = this->state_; if (kdd && baseclass::is_mcg) { // The low order bits of an MCG are constant, so drop them. state >>= 2; } size_t index = kdd ? state & table_mask : state >> table_shift; if (may_tick) { bool tick = kdd ? (state & tick_mask) == state_type(0u) : (state >> tick_shift) == state_type(0u); if (tick) advance_table(); } if (may_tock) { bool tock = state == state_type(0u); if (tock) advance_table(); } return data_[index]; } public: static constexpr size_t period_pow2() { return baseclass::period_pow2() + table_size*extvalclass::period_pow2(); } __attribute__((always_inline)) result_type operator()() { result_type rhs = get_extended_value(); result_type lhs = this->baseclass::operator()(); return lhs ^ rhs; } result_type operator()(result_type upper_bound) { return bounded_rand(*this, upper_bound); } void set(result_type wanted) { result_type& rhs = get_extended_value(); result_type lhs = this->baseclass::operator()(); rhs = lhs ^ wanted; } void advance(state_type distance, bool forwards = true); void backstep(state_type distance) { advance(distance, false); } extended(const result_type* data) : baseclass() { datainit(data); } extended(const result_type* data, state_type seed) : baseclass(seed) { datainit(data); } // This function may or may not exist. It thus has to be a template // to use SFINAE; users don't have to worry about its template-ness. template extended(const result_type* data, state_type seed, typename bc::stream_state stream_seed) : baseclass(seed, stream_seed) { datainit(data); } extended() : baseclass() { selfinit(); } extended(state_type seed) : baseclass(seed) { selfinit(); } // This function may or may not exist. It thus has to be a template // to use SFINAE; users don't have to worry about its template-ness. template extended(state_type seed, typename bc::stream_state stream_seed) : baseclass(seed, stream_seed) { selfinit(); } private: void selfinit(); void datainit(const result_type* data); public: template::value && !std::is_convertible::value>::type> extended(SeedSeq&& seedSeq) : baseclass(seedSeq) { generate_to(seedSeq, data_); } template void seed(Args&&... args) { new (this) extended(std::forward(args)...); } template friend bool operator==(const extended&, const extended&); template friend std::basic_ostream& operator<<(std::basic_ostream& out, const extended&); template friend std::basic_istream& operator>>(std::basic_istream& in, extended&); }; template void extended::datainit( const result_type* data) { for (size_t i = 0; i < table_size; ++i) data_[i] = data[i]; } template void extended::selfinit() { // We need to fill the extended table with something, and we have // very little provided data, so we use the base generator to // produce values. Although not ideal (use a seed sequence, folks!), // unexpected correlations are mitigated by // - using XOR differences rather than the number directly // - the way the table is accessed, its values *won't* be accessed // in the same order the were written. // - any strange correlations would only be apparent if we // were to backstep the generator so that the base generator // was generating the same values again result_type xdiff = baseclass::operator()() - baseclass::operator()(); for (size_t i = 0; i < table_size; ++i) { data_[i] = baseclass::operator()() ^ xdiff; } } template bool operator==(const extended& lhs, const extended& rhs) { auto& base_lhs = static_cast(lhs); auto& base_rhs = static_cast(rhs); return base_lhs == base_rhs && !std::equal( std::begin(lhs.data_), std::end(lhs.data_), std::begin(rhs.data_) ); } template inline bool operator!=(const extended& lhs, const extended& rhs) { return lhs != rhs; } template std::basic_ostream& operator<<(std::basic_ostream& out, const extended& rng) { auto orig_flags = out.flags(std::ios_base::dec | std::ios_base::left); auto space = out.widen(' '); auto orig_fill = out.fill(); out << rng.multiplier() << space << rng.increment() << space << rng.state_; for (const auto& datum : rng.data_) out << space << datum; out.flags(orig_flags); out.fill(orig_fill); return out; } template std::basic_istream& operator>>(std::basic_istream& in, extended& rng) { extended new_rng; auto& base_rng = static_cast(new_rng); in >> base_rng; if (in.fail()) return in; auto orig_flags = in.flags(std::ios_base::dec | std::ios_base::skipws); for (auto& datum : new_rng.data_) { in >> datum; if (in.fail()) goto bail; } rng = new_rng; bail: in.flags(orig_flags); return in; } template void extended::advance_table() { bool carry = false; for (size_t i = 0; i < table_size; ++i) { if (carry) { carry = insideout::external_step(data_[i],i+1); } bool carry2 = insideout::external_step(data_[i],i+1); carry = carry || carry2; } } template void extended::advance_table( state_type delta, bool isForwards) { typedef typename baseclass::state_type base_state_t; typedef typename extvalclass::state_type ext_state_t; constexpr bitcount_t basebits = sizeof(base_state_t)*8; constexpr bitcount_t extbits = sizeof(ext_state_t)*8; static_assert(basebits <= extbits || advance_pow2 > 0, "Current implementation might overflow its carry"); base_state_t carry = 0; for (size_t i = 0; i < table_size; ++i) { base_state_t total_delta = carry + delta; ext_state_t trunc_delta = ext_state_t(total_delta); if (basebits > extbits) { carry = total_delta >> extbits; } else { carry = 0; } carry += insideout::external_advance(data_[i],i+1, trunc_delta, isForwards); } } template void extended::advance( state_type distance, bool forwards) { static_assert(kdd, "Efficient advance is too hard for non-kdd extension. " "For a weak advance, cast to base class"); state_type zero = baseclass::is_mcg ? this->state_ & state_type(3U) : state_type(0U); if (may_tick) { state_type ticks = distance >> (advance_pow2*may_tick); // ^-- stupidity to appease GCC // warnings state_type adv_mask = baseclass::is_mcg ? tick_mask << 2 : tick_mask; state_type next_advance_distance = this->distance(zero, adv_mask); if (!forwards) next_advance_distance = (-next_advance_distance) & tick_mask; if (next_advance_distance < (distance & tick_mask)) { ++ticks; } if (ticks) advance_table(ticks, forwards); } if (forwards) { if (may_tock && this->distance(zero) <= distance) advance_table(); baseclass::advance(distance); } else { if (may_tock && -(this->distance(zero)) <= distance) advance_table(state_type(1U), false); baseclass::advance(-distance); } } } // namespace pcg_detail namespace pcg_engines { using namespace pcg_detail; /* Predefined types for XSH RS */ typedef oneseq_base oneseq_xsh_rs_16_8; typedef oneseq_base oneseq_xsh_rs_32_16; typedef oneseq_base oneseq_xsh_rs_64_32; typedef oneseq_base oneseq_xsh_rs_128_64; typedef unique_base unique_xsh_rs_16_8; typedef unique_base unique_xsh_rs_32_16; typedef unique_base unique_xsh_rs_64_32; typedef unique_base unique_xsh_rs_128_64; typedef setseq_base setseq_xsh_rs_16_8; typedef setseq_base setseq_xsh_rs_32_16; typedef setseq_base setseq_xsh_rs_64_32; typedef setseq_base setseq_xsh_rs_128_64; typedef mcg_base mcg_xsh_rs_16_8; typedef mcg_base mcg_xsh_rs_32_16; typedef mcg_base mcg_xsh_rs_64_32; typedef mcg_base mcg_xsh_rs_128_64; /* Predefined types for XSH RR */ typedef oneseq_base oneseq_xsh_rr_16_8; typedef oneseq_base oneseq_xsh_rr_32_16; typedef oneseq_base oneseq_xsh_rr_64_32; typedef oneseq_base oneseq_xsh_rr_128_64; typedef unique_base unique_xsh_rr_16_8; typedef unique_base unique_xsh_rr_32_16; typedef unique_base unique_xsh_rr_64_32; typedef unique_base unique_xsh_rr_128_64; typedef setseq_base setseq_xsh_rr_16_8; typedef setseq_base setseq_xsh_rr_32_16; typedef setseq_base setseq_xsh_rr_64_32; typedef setseq_base setseq_xsh_rr_128_64; typedef mcg_base mcg_xsh_rr_16_8; typedef mcg_base mcg_xsh_rr_32_16; typedef mcg_base mcg_xsh_rr_64_32; typedef mcg_base mcg_xsh_rr_128_64; /* Predefined types for RXS M XS */ typedef oneseq_base oneseq_rxs_m_xs_8_8; typedef oneseq_base oneseq_rxs_m_xs_16_16; typedef oneseq_base oneseq_rxs_m_xs_32_32; typedef oneseq_base oneseq_rxs_m_xs_64_64; typedef oneseq_base oneseq_rxs_m_xs_128_128; typedef unique_base unique_rxs_m_xs_8_8; typedef unique_base unique_rxs_m_xs_16_16; typedef unique_base unique_rxs_m_xs_32_32; typedef unique_base unique_rxs_m_xs_64_64; typedef unique_base unique_rxs_m_xs_128_128; typedef setseq_base setseq_rxs_m_xs_8_8; typedef setseq_base setseq_rxs_m_xs_16_16; typedef setseq_base setseq_rxs_m_xs_32_32; typedef setseq_base setseq_rxs_m_xs_64_64; typedef setseq_base setseq_rxs_m_xs_128_128; // MCG versions don't make sense here, so aren't defined. /* Predefined types for XSL RR (only defined for "large" types) */ typedef oneseq_base oneseq_xsl_rr_64_32; typedef oneseq_base oneseq_xsl_rr_128_64; typedef unique_base unique_xsl_rr_64_32; typedef unique_base unique_xsl_rr_128_64; typedef setseq_base setseq_xsl_rr_64_32; typedef setseq_base setseq_xsl_rr_128_64; typedef mcg_base mcg_xsl_rr_64_32; typedef mcg_base mcg_xsl_rr_128_64; /* Predefined types for XSL RR RR (only defined for "large" types) */ typedef oneseq_base oneseq_xsl_rr_rr_64_64; typedef oneseq_base oneseq_xsl_rr_rr_128_128; typedef unique_base unique_xsl_rr_rr_64_64; typedef unique_base unique_xsl_rr_rr_128_128; typedef setseq_base setseq_xsl_rr_rr_64_64; typedef setseq_base setseq_xsl_rr_rr_128_128; // MCG versions don't make sense here, so aren't defined. /* Extended generators */ template using ext_std8 = extended; template using ext_std16 = extended; template using ext_std32 = extended; template using ext_std64 = extended; template using ext_oneseq_rxs_m_xs_32_32 = ext_std32; template using ext_mcg_xsh_rs_64_32 = ext_std32; template using ext_oneseq_xsh_rs_64_32 = ext_std32; template using ext_setseq_xsh_rr_64_32 = ext_std32; template using ext_mcg_xsl_rr_128_64 = ext_std64; template using ext_oneseq_xsl_rr_128_64 = ext_std64; template using ext_setseq_xsl_rr_128_64 = ext_std64; } // namespace pcg_engines typedef pcg_engines::setseq_xsh_rr_64_32 pcg32; typedef pcg_engines::oneseq_xsh_rr_64_32 pcg32_oneseq; typedef pcg_engines::unique_xsh_rr_64_32 pcg32_unique; typedef pcg_engines::mcg_xsh_rs_64_32 pcg32_fast; typedef pcg_engines::setseq_xsl_rr_128_64 pcg64; typedef pcg_engines::oneseq_xsl_rr_128_64 pcg64_oneseq; typedef pcg_engines::unique_xsl_rr_128_64 pcg64_unique; typedef pcg_engines::mcg_xsl_rr_128_64 pcg64_fast; typedef pcg_engines::setseq_rxs_m_xs_8_8 pcg8_once_insecure; typedef pcg_engines::setseq_rxs_m_xs_16_16 pcg16_once_insecure; typedef pcg_engines::setseq_rxs_m_xs_32_32 pcg32_once_insecure; typedef pcg_engines::setseq_rxs_m_xs_64_64 pcg64_once_insecure; typedef pcg_engines::setseq_xsl_rr_rr_128_128 pcg128_once_insecure; typedef pcg_engines::oneseq_rxs_m_xs_8_8 pcg8_oneseq_once_insecure; typedef pcg_engines::oneseq_rxs_m_xs_16_16 pcg16_oneseq_once_insecure; typedef pcg_engines::oneseq_rxs_m_xs_32_32 pcg32_oneseq_once_insecure; typedef pcg_engines::oneseq_rxs_m_xs_64_64 pcg64_oneseq_once_insecure; typedef pcg_engines::oneseq_xsl_rr_rr_128_128 pcg128_oneseq_once_insecure; // These two extended RNGs provide two-dimensionally equidistributed // 32-bit generators. pcg32_k2_fast occupies the same space as pcg64, // and can be called twice to generate 64 bits, but does not required // 128-bit math; on 32-bit systems, it's faster than pcg64 as well. typedef pcg_engines::ext_setseq_xsh_rr_64_32<6,16,true> pcg32_k2; typedef pcg_engines::ext_oneseq_xsh_rs_64_32<6,32,true> pcg32_k2_fast; // These eight extended RNGs have about as much state as arc4random // // - the k variants are k-dimensionally equidistributed // - the c variants offer better crypographic security // // (just how good the cryptographic security is is an open question) typedef pcg_engines::ext_setseq_xsh_rr_64_32<6,16,true> pcg32_k64; typedef pcg_engines::ext_mcg_xsh_rs_64_32<6,32,true> pcg32_k64_oneseq; typedef pcg_engines::ext_oneseq_xsh_rs_64_32<6,32,true> pcg32_k64_fast; typedef pcg_engines::ext_setseq_xsh_rr_64_32<6,16,false> pcg32_c64; typedef pcg_engines::ext_oneseq_xsh_rs_64_32<6,32,false> pcg32_c64_oneseq; typedef pcg_engines::ext_mcg_xsh_rs_64_32<6,32,false> pcg32_c64_fast; typedef pcg_engines::ext_setseq_xsl_rr_128_64<5,16,true> pcg64_k32; typedef pcg_engines::ext_oneseq_xsl_rr_128_64<5,128,true> pcg64_k32_oneseq; typedef pcg_engines::ext_mcg_xsl_rr_128_64<5,128,true> pcg64_k32_fast; typedef pcg_engines::ext_setseq_xsl_rr_128_64<5,16,false> pcg64_c32; typedef pcg_engines::ext_oneseq_xsl_rr_128_64<5,128,false> pcg64_c32_oneseq; typedef pcg_engines::ext_mcg_xsl_rr_128_64<5,128,false> pcg64_c32_fast; // These eight extended RNGs have more state than the Mersenne twister // // - the k variants are k-dimensionally equidistributed // - the c variants offer better crypographic security // // (just how good the cryptographic security is is an open question) typedef pcg_engines::ext_setseq_xsh_rr_64_32<10,16,true> pcg32_k1024; typedef pcg_engines::ext_oneseq_xsh_rs_64_32<10,32,true> pcg32_k1024_fast; typedef pcg_engines::ext_setseq_xsh_rr_64_32<10,16,false> pcg32_c1024; typedef pcg_engines::ext_oneseq_xsh_rs_64_32<10,32,false> pcg32_c1024_fast; typedef pcg_engines::ext_setseq_xsl_rr_128_64<10,16,true> pcg64_k1024; typedef pcg_engines::ext_oneseq_xsl_rr_128_64<10,128,true> pcg64_k1024_fast; typedef pcg_engines::ext_setseq_xsl_rr_128_64<10,16,false> pcg64_c1024; typedef pcg_engines::ext_oneseq_xsl_rr_128_64<10,128,false> pcg64_c1024_fast; // These generators have an insanely huge period (2^524352), and is suitable // for silly party tricks, such as dumping out 64 KB ZIP files at an arbitrary // point in the future. [Actually, over the full period of the generator, it // will produce every 64 KB ZIP file 2^64 times!] typedef pcg_engines::ext_setseq_xsh_rr_64_32<14,16,true> pcg32_k16384; typedef pcg_engines::ext_oneseq_xsh_rs_64_32<14,32,true> pcg32_k16384_fast; #endif // PCG_RAND_HPP_INCLUDED pcg-cpp-0.98.1/include/pcg_uint128.hpp000066400000000000000000000512041250047755200173520ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This code provides a a C++ class that can provide 128-bit (or higher) * integers. To produce 2K-bit integers, it uses two K-bit integers, * placed in a union that allowes the code to also see them as four K/2 bit * integers (and access them either directly name, or by index). * * It may seem like we're reinventing the wheel here, because several * libraries already exist that support large integers, but most existing * libraries provide a very generic multiprecision code, but here we're * operating at a fixed size. Also, most other libraries are fairly * heavyweight. So we use a direct implementation. Sadly, it's much slower * than hand-coded assembly or direct CPU support. */ #ifndef PCG_UINT128_HPP_INCLUDED #define PCG_UINT128_HPP_INCLUDED 1 #include #include #include #include #include #include #include /* * We want to lay the type out the same way that a native type would be laid * out, which means we must know the machine's endian, at compile time. * This ugliness attempts to do so. */ #ifndef PCG_LITTLE_ENDIAN #if defined(__BYTE_ORDER__) #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define PCG_LITTLE_ENDIAN 1 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #define PCG_LITTLE_ENDIAN 0 #else #error __BYTE_ORDER__ does not match a standard endian, pick a side #endif #elif __LITTLE_ENDIAN__ || _LITTLE_ENDIAN #define PCG_LITTLE_ENDIAN 1 #elif __BIG_ENDIAN__ || _BIG_ENDIAN #define PCG_LITTLE_ENDIAN 0 #elif __x86_64 || __x86_64__ || __i386 || __i386__ #define PCG_LITTLE_ENDIAN 1 #elif __powerpc__ || __POWERPC__ || __ppc__ || __PPC__ \ || __m68k__ || __mc68000__ #define PCG_LITTLE_ENDIAN 0 #else #error Unable to determine target endianness #endif #endif namespace pcg_extras { // Recent versions of GCC have intrinsics we can use to quickly calculate // the number of leading and trailing zeros in a number. If possible, we // use them, otherwise we fall back to old-fashioned bit twiddling to figure // them out. #ifndef PCG_BITCOUNT_T typedef uint8_t bitcount_t; #else typedef PCG_BITCOUNT_T bitcount_t; #endif /* * Provide some useful helper functions * * flog2 floor(log2(x)) * * trailingzeros number of trailing zero bits */ #ifdef __GNUC__ // Any GNU-compatible compiler supporting C++11 has // some useful intrinsics we can use. inline bitcount_t flog2(uint32_t v) { return 31 - __builtin_clz(v); } inline bitcount_t trailingzeros(uint32_t v) { return __builtin_ctz(v); } inline bitcount_t flog2(uint64_t v) { #if UINT64_MAX == ULONG_MAX return 63 - __builtin_clzl(v); #elif UINT64_MAX == ULLONG_MAX return 63 - __builtin_clzll(v); #else #error Cannot find a function for uint64_t #endif } inline bitcount_t trailingzeros(uint64_t v) { #if UINT64_MAX == ULONG_MAX return __builtin_ctzl(v); #elif UINT64_MAX == ULLONG_MAX return __builtin_ctzll(v); #else #error Cannot find a function for uint64_t #endif } #else // Otherwise, we fall back to bit twiddling // implementations inline bitcount_t flog2(uint32_t v) { // Based on code by Eric Cole and Mark Dickinson, which appears at // https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn static const uint8_t multiplyDeBruijnBitPos[32] = { 0, 9, 1, 10, 13, 21, 2, 29, 11, 14, 16, 18, 22, 25, 3, 30, 8, 12, 20, 28, 15, 17, 24, 7, 19, 27, 23, 6, 26, 5, 4, 31 }; v |= v >> 1; // first round down to one less than a power of 2 v |= v >> 2; v |= v >> 4; v |= v >> 8; v |= v >> 16; return multiplyDeBruijnBitPos[(uint32_t)(v * 0x07C4ACDDU) >> 27]; } inline bitcount_t trailingzeros(uint32_t v) { static const uint8_t multiplyDeBruijnBitPos[32] = { 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9 }; return multiplyDeBruijnBitPos[((uint32_t)((v & -v) * 0x077CB531U)) >> 27]; } inline bitcount_t flog2(uint64_t v) { uint32_t high = v >> 32; uint32_t low = uint32_t(v); return high ? 32+flog2(high) : flog2(low); } inline bitcount_t trailingzeros(uint64_t v) { uint32_t high = v >> 32; uint32_t low = uint32_t(v); return low ? trailingzeros(low) : trailingzeros(high)+32; } #endif template inline bitcount_t clog2(UInt v) { return flog2(v) + ((v & (-v)) != v); } template inline UInt addwithcarry(UInt x, UInt y, bool carryin, bool* carryout) { UInt half_result = y + carryin; UInt result = x + half_result; *carryout = (half_result < y) || (result < x); return result; } template inline UInt subwithcarry(UInt x, UInt y, bool carryin, bool* carryout) { UInt half_result = y + carryin; UInt result = x - half_result; *carryout = (half_result < y) || (result > x); return result; } template class uint_x4 { // private: public: union { #if PCG_LITTLE_ENDIAN struct { UInt v0, v1, v2, v3; } w; struct { UIntX2 v01, v23; } d; #else struct { UInt v3, v2, v1, v0; } w; struct { UIntX2 v23, v01; } d; #endif // For the array access versions, the code that uses the array // must handle endian itself. Yuck. UInt wa[4]; UIntX2 da[2]; }; public: uint_x4() = default; constexpr uint_x4(UInt v3, UInt v2, UInt v1, UInt v0) #if PCG_LITTLE_ENDIAN : w{v0, v1, v2, v3} #else : w{v3, v2, v1, v0} #endif { // Nothing (else) to do } constexpr uint_x4(UIntX2 v23, UIntX2 v01) #if PCG_LITTLE_ENDIAN : d{v01,v23} #else : d{v23,v01} #endif { // Nothing (else) to do } template::value && sizeof(Integral) <= sizeof(UIntX2)) >::type* = nullptr> constexpr uint_x4(Integral v01) #if PCG_LITTLE_ENDIAN : d{UIntX2(v01),0UL} #else : d{0UL,UIntX2(v01)} #endif { // Nothing (else) to do } explicit constexpr operator uint64_t() const { return d.v01; } explicit constexpr operator uint32_t() const { return w.v0; } explicit constexpr operator int() const { return w.v0; } explicit constexpr operator uint16_t() const { return w.v0; } explicit constexpr operator uint8_t() const { return w.v0; } typedef typename std::conditional::value, unsigned long long, unsigned long>::type uint_missing_t; explicit constexpr operator uint_missing_t() const { return d.v01; } explicit constexpr operator bool() const { return d.v01 || d.v23; } template friend uint_x4 operator*(const uint_x4&, const uint_x4&); template friend std::pair< uint_x4,uint_x4 > divmod(const uint_x4&, const uint_x4&); template friend uint_x4 operator+(const uint_x4&, const uint_x4&); template friend uint_x4 operator-(const uint_x4&, const uint_x4&); template friend uint_x4 operator<<(const uint_x4&, const uint_x4&); template friend uint_x4 operator>>(const uint_x4&, const uint_x4&); template friend uint_x4 operator&(const uint_x4&, const uint_x4&); template friend uint_x4 operator|(const uint_x4&, const uint_x4&); template friend uint_x4 operator^(const uint_x4&, const uint_x4&); template friend bool operator==(const uint_x4&, const uint_x4&); template friend bool operator!=(const uint_x4&, const uint_x4&); template friend bool operator<(const uint_x4&, const uint_x4&); template friend bool operator<=(const uint_x4&, const uint_x4&); template friend bool operator>(const uint_x4&, const uint_x4&); template friend bool operator>=(const uint_x4&, const uint_x4&); template friend uint_x4 operator~(const uint_x4&); template friend uint_x4 operator-(const uint_x4&); template friend bitcount_t flog2(const uint_x4&); template friend bitcount_t trailingzeros(const uint_x4&); uint_x4& operator*=(const uint_x4& rhs) { uint_x4 result = *this * rhs; return *this = result; } uint_x4& operator/=(const uint_x4& rhs) { uint_x4 result = *this / rhs; return *this = result; } uint_x4& operator%=(const uint_x4& rhs) { uint_x4 result = *this % rhs; return *this = result; } uint_x4& operator+=(const uint_x4& rhs) { uint_x4 result = *this + rhs; return *this = result; } uint_x4& operator-=(const uint_x4& rhs) { uint_x4 result = *this - rhs; return *this = result; } uint_x4& operator&=(const uint_x4& rhs) { uint_x4 result = *this & rhs; return *this = result; } uint_x4& operator|=(const uint_x4& rhs) { uint_x4 result = *this | rhs; return *this = result; } uint_x4& operator^=(const uint_x4& rhs) { uint_x4 result = *this ^ rhs; return *this = result; } uint_x4& operator>>=(bitcount_t shift) { uint_x4 result = *this >> shift; return *this = result; } uint_x4& operator<<=(bitcount_t shift) { uint_x4 result = *this << shift; return *this = result; } }; template bitcount_t flog2(const uint_x4& v) { #if PCG_LITTLE_ENDIAN for (uint8_t i = 4; i !=0; /* dec in loop */) { --i; #else for (uint8_t i = 0; i < 4; ++i) { #endif if (v.wa[i] == 0) continue; return flog2(v.wa[i]) + (sizeof(U)*CHAR_BIT)*i; } abort(); } template bitcount_t trailingzeros(const uint_x4& v) { #if PCG_LITTLE_ENDIAN for (uint8_t i = 0; i < 4; ++i) { #else for (uint8_t i = 4; i !=0; /* dec in loop */) { --i; #endif if (v.wa[i] != 0) return trailingzeros(v.wa[i]) + (sizeof(U)*CHAR_BIT)*i; } return (sizeof(U)*CHAR_BIT)*4; } template std::pair< uint_x4, uint_x4 > divmod(const uint_x4& orig_dividend, const uint_x4& divisor) { // If the dividend is less than the divisor, the answer is always zero. // This takes care of boundary cases like 0/x (which would otherwise be // problematic because we can't take the log of zero. (The boundary case // of division by zero is undefined.) if (orig_dividend < divisor) return { uint_x4(0UL), orig_dividend }; auto dividend = orig_dividend; auto log2_divisor = flog2(divisor); auto log2_dividend = flog2(dividend); // assert(log2_dividend >= log2_divisor); bitcount_t logdiff = log2_dividend - log2_divisor; constexpr uint_x4 ONE(1UL); if (logdiff == 0) return { ONE, dividend - divisor }; // Now we change the log difference to // floor(log2(divisor)) - ceil(log2(dividend)) // to ensure that we *underestimate* the result. logdiff -= 1; uint_x4 quotient(0UL); auto qfactor = ONE << logdiff; auto factor = divisor << logdiff; do { dividend -= factor; quotient += qfactor; while (dividend < factor) { factor >>= 1; qfactor >>= 1; } } while (dividend >= divisor); return { quotient, dividend }; } template uint_x4 operator/(const uint_x4& dividend, const uint_x4& divisor) { return divmod(dividend, divisor).first; } template uint_x4 operator%(const uint_x4& dividend, const uint_x4& divisor) { return divmod(dividend, divisor).second; } template uint_x4 operator*(const uint_x4& a, const uint_x4& b) { uint_x4 r = {0U, 0U, 0U, 0U}; bool carryin = false; bool carryout; UIntX2 a0b0 = UIntX2(a.w.v0) * UIntX2(b.w.v0); r.w.v0 = UInt(a0b0); r.w.v1 = UInt(a0b0 >> 32); UIntX2 a1b0 = UIntX2(a.w.v1) * UIntX2(b.w.v0); r.w.v2 = UInt(a1b0 >> 32); r.w.v1 = addwithcarry(r.w.v1, UInt(a1b0), carryin, &carryout); carryin = carryout; r.w.v2 = addwithcarry(r.w.v2, UInt(0U), carryin, &carryout); carryin = carryout; r.w.v3 = addwithcarry(r.w.v3, UInt(0U), carryin, &carryout); UIntX2 a0b1 = UIntX2(a.w.v0) * UIntX2(b.w.v1); carryin = false; r.w.v2 = addwithcarry(r.w.v2, UInt(a0b1 >> 32), carryin, &carryout); carryin = carryout; r.w.v3 = addwithcarry(r.w.v3, UInt(0U), carryin, &carryout); carryin = false; r.w.v1 = addwithcarry(r.w.v1, UInt(a0b1), carryin, &carryout); carryin = carryout; r.w.v2 = addwithcarry(r.w.v2, UInt(0U), carryin, &carryout); carryin = carryout; r.w.v3 = addwithcarry(r.w.v3, UInt(0U), carryin, &carryout); UIntX2 a1b1 = UIntX2(a.w.v1) * UIntX2(b.w.v1); carryin = false; r.w.v2 = addwithcarry(r.w.v2, UInt(a1b1), carryin, &carryout); carryin = carryout; r.w.v3 = addwithcarry(r.w.v3, UInt(a1b1 >> 32), carryin, &carryout); r.d.v23 += a.d.v01 * b.d.v23 + a.d.v23 * b.d.v01; return r; } template uint_x4 operator+(const uint_x4& a, const uint_x4& b) { uint_x4 r = {0U, 0U, 0U, 0U}; bool carryin = false; bool carryout; r.w.v0 = addwithcarry(a.w.v0, b.w.v0, carryin, &carryout); carryin = carryout; r.w.v1 = addwithcarry(a.w.v1, b.w.v1, carryin, &carryout); carryin = carryout; r.w.v2 = addwithcarry(a.w.v2, b.w.v2, carryin, &carryout); carryin = carryout; r.w.v3 = addwithcarry(a.w.v3, b.w.v3, carryin, &carryout); return r; } template uint_x4 operator-(const uint_x4& a, const uint_x4& b) { uint_x4 r = {0U, 0U, 0U, 0U}; bool carryin = false; bool carryout; r.w.v0 = subwithcarry(a.w.v0, b.w.v0, carryin, &carryout); carryin = carryout; r.w.v1 = subwithcarry(a.w.v1, b.w.v1, carryin, &carryout); carryin = carryout; r.w.v2 = subwithcarry(a.w.v2, b.w.v2, carryin, &carryout); carryin = carryout; r.w.v3 = subwithcarry(a.w.v3, b.w.v3, carryin, &carryout); return r; } template uint_x4 operator&(const uint_x4& a, const uint_x4& b) { return uint_x4(a.d.v23 & b.d.v23, a.d.v01 & b.d.v01); } template uint_x4 operator|(const uint_x4& a, const uint_x4& b) { return uint_x4(a.d.v23 | b.d.v23, a.d.v01 | b.d.v01); } template uint_x4 operator^(const uint_x4& a, const uint_x4& b) { return uint_x4(a.d.v23 ^ b.d.v23, a.d.v01 ^ b.d.v01); } template uint_x4 operator~(const uint_x4& v) { return uint_x4(~v.d.v23, ~v.d.v01); } template uint_x4 operator-(const uint_x4& v) { return uint_x4(0UL,0UL) - v; } template bool operator==(const uint_x4& a, const uint_x4& b) { return (a.d.v01 == b.d.v01) && (a.d.v23 == b.d.v23); } template bool operator!=(const uint_x4& a, const uint_x4& b) { return !operator==(a,b); } template bool operator<(const uint_x4& a, const uint_x4& b) { return (a.d.v23 < b.d.v23) || ((a.d.v23 == b.d.v23) && (a.d.v01 < b.d.v01)); } template bool operator>(const uint_x4& a, const uint_x4& b) { return operator<(b,a); } template bool operator<=(const uint_x4& a, const uint_x4& b) { return !(operator<(b,a)); } template bool operator>=(const uint_x4& a, const uint_x4& b) { return !(operator<(a,b)); } template uint_x4 operator<<(const uint_x4& v, const bitcount_t shift) { uint_x4 r = {0U, 0U, 0U, 0U}; const bitcount_t bits = sizeof(UInt) * CHAR_BIT; const bitcount_t bitmask = bits - 1; const bitcount_t shiftdiv = shift / bits; const bitcount_t shiftmod = shift & bitmask; if (shiftmod) { UInt carryover = 0; #if PCG_LITTLE_ENDIAN for (uint8_t out = shiftdiv, in = 0; out < 4; ++out, ++in) { #else for (uint8_t out = 4-shiftdiv, in = 4; out != 0; /* dec in loop */) { --out, --in; #endif r.wa[out] = (v.wa[in] << shiftmod) | carryover; carryover = (v.wa[in] >> (bits - shiftmod)); } } else { #if PCG_LITTLE_ENDIAN for (uint8_t out = shiftdiv, in = 0; out < 4; ++out, ++in) { #else for (uint8_t out = 4-shiftdiv, in = 4; out != 0; /* dec in loop */) { --out, --in; #endif r.wa[out] = v.wa[in]; } } return r; } template uint_x4 operator>>(const uint_x4& v, const bitcount_t shift) { uint_x4 r = {0U, 0U, 0U, 0U}; const bitcount_t bits = sizeof(UInt) * CHAR_BIT; const bitcount_t bitmask = bits - 1; const bitcount_t shiftdiv = shift / bits; const bitcount_t shiftmod = shift & bitmask; if (shiftmod) { UInt carryover = 0; #if PCG_LITTLE_ENDIAN for (uint8_t out = 4-shiftdiv, in = 4; out != 0; /* dec in loop */) { --out, --in; #else for (uint8_t out = shiftdiv, in = 0; out < 4; ++out, ++in) { #endif r.wa[out] = (v.wa[in] >> shiftmod) | carryover; carryover = (v.wa[in] << (bits - shiftmod)); } } else { #if PCG_LITTLE_ENDIAN for (uint8_t out = 4-shiftdiv, in = 4; out != 0; /* dec in loop */) { --out, --in; #else for (uint8_t out = shiftdiv, in = 0; out < 4; ++out, ++in) { #endif r.wa[out] = v.wa[in]; } } return r; } } // namespace pcg_extras #endif // PCG_UINT128_HPP_INCLUDED pcg-cpp-0.98.1/sample/000077500000000000000000000000001250047755200144325ustar00rootroot00000000000000pcg-cpp-0.98.1/sample/.gitignore000066400000000000000000000005601250047755200164230ustar00rootroot00000000000000# Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Fortran module files *.mod # Compiled Static libraries *.lai *.la *.a *.lib # Debug Information *.dSYM # Executables *.exe *.out *.app # Actual Project Executables pcg-demo codebook cppref-sample make-partytrick spew use-partytrick pcg-cpp-0.98.1/sample/Makefile000066400000000000000000000034661250047755200161030ustar00rootroot00000000000000# # PCG Random Number Generation for C++. # # Copyright 2014 Melissa O'Neill # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # For additional information about the PCG random number generation scheme, # including its license and other licensing options, visit # # http://www.pcg-random.org # TARGETS = pcg-demo codebook cppref-sample make-partytrick BINARYOUT_TARGETS = spew use-partytrick CPPFLAGS += -I../include CXXFLAGS += -std=c++11 -O2 CC = $(CXX) # Cheat so that linking uses the C++ compiler all: $(TARGETS) posix-binaryoutput: spew use-partytrick clean: rm -f *.o $(TARGETS) $(BINARYOUT_TARGETS) codebook.o: codebook.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp cppref-sample.o: cppref-sample.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp make-partytrick.o: make-partytrick.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp pcg-demo.o: pcg-demo.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp spew.o: spew.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp use-partytrick.o: use-partytrick.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp pcg-cpp-0.98.1/sample/codebook.cpp000066400000000000000000000023541250047755200167270ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * Outputs a little spy codebook */ #include "pcg_random.hpp" #include #include #include int main() { pcg32 rng(pcg_extras::seed_seq_from{}); std::clog << "RNG used: " << rng << "\n\n"; for (int i = 0; i < 16; ++i) { for (int j = 0; j < 16; ++j) { printf("%03u ", rng(1000)); } printf("\n"); } } pcg-cpp-0.98.1/sample/cppref-sample.cpp000066400000000000000000000047421250047755200177030ustar00rootroot00000000000000/* * Random Number Generation Example * * Copyright 2012-2014 cppreference.com Contributors * Copyright 2014 Melissa O'Neill * * Code in this file is based on code from cppreference.com, specifically * the sample code at http://en.cppreference.com/w/cpp/numeric/random * which is distributed under the Creative Commons Attribution-Share Alike * license. You may distribute this file (and only this file) under * that license, see http://creativecommons.org/licenses/by-sa/3.0/. * * Also licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with a valid License. * You may obtain a copy of the Apache License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* */ /* * Produce a histogram of a normal distribution. */ #include #include #include #include #include #include #include "pcg_random.hpp" int main() { // Seed with a real random value, if available pcg_extras::seed_seq_from seed_source; // Make a random number engine pcg32 rng(seed_source); // Choose a random mean between 1 and 6 std::uniform_int_distribution uniform_dist(1, 6); int mean = uniform_dist(rng); std::cout << "Randomly-chosen mean: " << mean << '\n'; // Generate a normal distribution around that mean std::normal_distribution<> normal_dist(mean, 2); // Make a copy of the RNG state to use later pcg32 rng_checkpoint = rng; std::map hist; for (int n = 0; n < 10000; ++n) { ++hist[std::round(normal_dist(rng))]; } std::cout << "Normal distribution around " << mean << ":\n"; for (auto p : hist) { std::cout << std::fixed << std::setprecision(1) << std::setw(2) << p.first << ' ' << std::string(p.second/30, '*') << '\n'; } std::cout << "Required " << (rng - rng_checkpoint) << " random numbers.\n"; } pcg-cpp-0.98.1/sample/make-partytrick.cpp000066400000000000000000000062361250047755200202540ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This program uses pcg32_k64, a 64-dimensionally equidistributed generator * to create a party-trick generator that, after 1MB of output, produces some * output that may not look "very random" to you. ;-) */ #include #include #include #include #include #include "pcg_random.hpp" /* 256 bytes of "non-random" data we want to place in the output sequence * of our 64-dimensionally equidistributed 32-bit (4 byte) integers * (64 * 4 = 256). */ 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!"; /* Rather than put our 256 bytes in one block, we will scatter it around. * This table shows the offset of one byte to the next, in 256-byte (i.e., * 64-tuple) increments. '0' -> 0, '1' -> 1, '/' -> -1, '.' -> -2 */ char breaks[] = "00/020.040001000/000200010000010000020001.0020003000000000000000000000000000007000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000000000000000000000"; int main() { // We'll output a totally different party-trick generator each time. // In each of 2^63 streams, there will be 2^64 generators that produce // this same party trick output. pcg32_k64 rng(pcg_extras::seed_seq_from{}); for (int i = 0; i < 256; ++i) { char c = desired[i]; int offset = (breaks[i] - '0') * 64; if (offset > 0) rng.advance(offset); else if (offset < 0) rng.backstep(-offset); uint32_t prior = rng(); uint32_t mask = ~(0xFFu << 8*(i % 4)); uint32_t adj = (prior & mask) | (uint32_t(c) << 8*(i % 4)); // Back up to overwrite the random number we just got rng.backstep(1); rng.set(adj); // Only advance to next number if we've done all four bytes. if ((i % 4) != 3) rng.backstep(1); } // Backstep to the start. rng.backstep(64*32); // Backstep a further 1MB rng.backstep(1024 * 1024 / 4); // Output the RNG state std::cout << rng << "\n"; return 0; } pcg-cpp-0.98.1/sample/pcg-demo.cpp000066400000000000000000000145511250047755200166370ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This file is based on the demo program for the C generation schemes. * It shows some basic generation tasks. */ #include #include #include #include #include #include #include #include #include #include // for random_device #include "pcg_random.hpp" // This code can be compiled with the preprocessor symbol RNG set to the // PCG generator you'd like to test. #ifndef RNG #define RNG pcg32 #define TWO_ARG_INIT 1 #endif #define STRINGIFY_IMPL(x) #x #define STRINGIFY(x) STRINGIFY_IMPL(x) using namespace std; using pcg_extras::operator<<; // Cause uint8_t to be printed as an int. int main(int argc, char** argv) { // Read command-line options int rounds = 5; bool nondeterministic_seed = false; ++argv; --argc; if (argc > 0 && strcmp(argv[0], "-r") == 0) { nondeterministic_seed = true; ++argv; --argc; } if (argc > 0) { rounds = atoi(argv[0]); } /* Many of the generators can be initialized with two arguments; the second * one specifies the stream. */ #if TWO_ARG_INIT RNG rng(42u, 54u); #else RNG rng(42u); #endif if (nondeterministic_seed) { // Seed with external entropy from std::random_device (a handy // utility provided by pcg_extras). rng.seed(pcg_extras::seed_seq_from()); } constexpr auto bits = sizeof(RNG::result_type) * CHAR_BIT; constexpr int how_many_nums = bits <= 8 ? 14 : bits <= 16 ? 10 : 6; constexpr int wrap_nums_at = bits > 64 ? 2 : bits > 32 ? 3 : how_many_nums; cout << STRINGIFY(RNG) << ":\n" // << " - aka: " << pcg_extras::printable_typename() // ^-- we skip this line because the output is long, scary, ugly, and // and varies depending on the platform << " - result: " << bits << "-bit unsigned int\n" << " - period: 2^" << RNG::period_pow2(); if (RNG::streams_pow2() > 0) cout << " (* 2^" << RNG::streams_pow2() << " streams)"; cout << "\n - size: " << sizeof(RNG) << " bytes\n\n"; for (int round = 1; round <= rounds; ++round) { printf("Round %d:\n", round); /* Make some N-bit numbers */ cout << setw(4) << setfill(' ') << bits << "bit:"; for (int i = 0; i < how_many_nums; ++i) { if (i > 0 && i % wrap_nums_at == 0) cout << "\n\t"; cout << " 0x" << hex << setfill('0') << setw(sizeof(RNG::result_type)*2) << rng(); } cout << endl; cout << " Again:"; rng.backstep(6); for (int i = 0; i < how_many_nums; ++i) { if (i > 0 && i % wrap_nums_at == 0) cout << "\n\t"; cout << " 0x" << hex << setfill('0') << setw(sizeof(RNG::result_type)*2) << rng(); } cout << dec << endl; /* Toss some coins */ cout << " Coins: "; for (int i = 0; i < 65; ++i) cout << (rng(2) ? "H" : "T"); cout << endl; RNG rng_copy{rng}; /* Roll some dice */ printf(" Rolls:"); for (int i = 0; i < 33; ++i) cout << " " << (uint32_t(rng(6)) + 1); cout << "\n --> rolling dice used " << (rng - rng_copy) << " random numbers" << endl; /* Deal some cards using std::shuffle * It's unspecified *how* std::shuffle shuffles the cards, or how many * random numbers it will use to do so, so we call std::shuffle and * measure how good it is. We won't use it for the final shuffle * to avoid platform-dependent output. */ rng_copy = rng; enum { SUITS = 4, NUMBERS = 13, CARDS = 52 }; char cards[CARDS]; iota(begin(cards), end(cards), 0); std::shuffle(begin(cards), end(cards), rng); auto std_shuffle_steps = rng - rng_copy; /* Restore RNG and deal again using pcg_extras::shuffle, which follows * the algorithm for shuffling that most programmers would expect. */ rng = rng_copy; iota(begin(cards), end(cards), 0); pcg_extras::shuffle(begin(cards), end(cards), rng); auto my_shuffle_steps = rng - rng_copy; /* Output the shuffled deck */ printf(" Cards:"); static const signed char number[] = {'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'}; static const signed char suit[] = {'h', 'c', 'd', 's'}; int i = 0; for (auto card : cards) { ++i; cout << " " << number[card / SUITS] << suit[card % SUITS]; if (i % 22 == 0) cout << "\n\t"; } /* Output statistics about shuffling */ cout << "\n --> std::shuffle used " << std_shuffle_steps << " random numbers"; typedef RNG::state_type rngdelta_t; if (std_shuffle_steps > rngdelta_t(52)) { cout << "\n\t -- that's " << (std_shuffle_steps - rngdelta_t(51)) << " more than we'd expect; inefficient implementation"; } cout << "\n --> pcg_extras::shuffle used " << my_shuffle_steps << " random numbers"; cout << "\n" << endl; } return 0; } pcg-cpp-0.98.1/sample/spew.cpp000066400000000000000000000034171250047755200161210ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This program outputs 215 GB of random bits (binary data). This is * about the same as the total output of random.org in its 15 year history. * The code uses 1.25e-8 of the period, and chooses an arbitrary stream from * 2^64 streams. * * Typical usage: * ./spew | hexdump -C | less */ #include #include #include #include #include #include // We use POSIX read/write for binary I/O #include "pcg_random.hpp" int main() { pcg32_fast rng(pcg_extras::seed_seq_from{}); std::clog << rng << "\n\n"; constexpr size_t BUFFER_SIZE = 1024ull * 128ull; uint32_t buffer[BUFFER_SIZE]; constexpr size_t ROUNDS = 215 * 1073741824ull / sizeof(buffer); for (size_t i = 0; i < ROUNDS; ++i) { for (auto& v : buffer) v = rng(); write(1, (void*) buffer, sizeof(buffer)); } return 0; } pcg-cpp-0.98.1/sample/use-partytrick.cpp000066400000000000000000000051051250047755200201250ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This program behaves like the spew program, the only difference is that * after 1 MB of output, the output gets "interesting" for a brief while. * See make-partytrick.cpp for more details. * * Typical usage: * ./use-partytrick | hexdump -C | less */ #include #include #include #include #include #include #include #include #include "pcg_random.hpp" static const char* saved_state = "6364136223846793005 3503324247726078831 6557656048857751321 103238831 " "665891259 1902651333 4073047566 368781010 3371458373 3520911659 1176018374 " "1290944887 2479283234 2214499777 3287447736 4241043352 2808175048 83300271 " "162496091 3372211384 3773661488 3842517107 154403914 1983905875 185363760 " "3574548828 4259275054 2055322655 3183516320 3827707798 2358810643 3947601356 " "1518701804 2987610801 4256672123 243420444 2418646926 1593945712 3293969771 " "1047458160 4148325853 4134598831 813996594 2374617805 712898811 2110551176 " "233031372 1753202862 281911517 1950853967 3790278509 4176603202 4256155456 " "1413186342 1718872307 2898301505 1732438719 622306094 366401535 2963949396 " "2676833081 98878999 999895120 425860638 4096143638 4063627507 2566817785"; int main() { pcg32_k64 rng; std::istringstream inbuf(saved_state); inbuf >> rng; std::clog << inbuf.str() << "\n\n"; if (inbuf.fail()) abort(); constexpr size_t BUFFER_SIZE = 1024ull * 128ull; uint32_t buffer[BUFFER_SIZE]; constexpr size_t ROUNDS = 215 * 1073741824ull / sizeof(buffer); for (size_t i = 0; i < ROUNDS; ++i) { for (auto& v : buffer) v = rng(); write(1, (void*) buffer, sizeof(buffer)); } return 0; } pcg-cpp-0.98.1/test-high/000077500000000000000000000000001250047755200150455ustar00rootroot00000000000000pcg-cpp-0.98.1/test-high/.gitignore000066400000000000000000000022731250047755200170410ustar00rootroot00000000000000# Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Fortran module files *.mod # Compiled Static libraries *.lai *.la *.a *.lib # Debug Information *.dSYM # Executables *.exe *.out *.app # Actual Project Executables check-pcg8_once_insecure check-pcg8_oneseq_once_insecure check-pcg16_once_insecure check-pcg16_oneseq_once_insecure check-pcg32 check-pcg32_c1024 check-pcg32_c1024_fast check-pcg32_c64 check-pcg32_c64_fast check-pcg32_c64_oneseq check-pcg32_fast check-pcg32_k1024 check-pcg32_k1024_fast check-pcg32_k16384 check-pcg32_k16384_fast check-pcg32_k2 check-pcg32_k2_fast check-pcg32_k64 check-pcg32_k64_fast check-pcg32_k64_oneseq check-pcg32_once_insecure check-pcg32_oneseq check-pcg32_oneseq_once_insecure check-pcg32_unique check-pcg64 check-pcg64_c1024 check-pcg64_c1024_fast check-pcg64_c32 check-pcg64_c32_fast check-pcg64_c32_oneseq check-pcg64_fast check-pcg64_k1024 check-pcg64_k1024_fast check-pcg64_k32 check-pcg64_k32_fast check-pcg64_k32_oneseq check-pcg64_once_insecure check-pcg64_oneseq check-pcg64_oneseq_once_insecure check-pcg64_unique check-pcg128_once_insecure check-pcg128_oneseq_once_insecure pcg-cpp-0.98.1/test-high/Makefile000066400000000000000000000216661250047755200165200ustar00rootroot00000000000000# # PCG Random Number Generation for C++. # # Copyright 2014 Melissa O'Neill # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # For additional information about the PCG random number generation scheme, # including its license and other licensing options, visit # # http://www.pcg-random.org # TARGETS = \ check-pcg8_once_insecure check-pcg8_oneseq_once_insecure \ check-pcg16_once_insecure check-pcg16_oneseq_once_insecure check-pcg32 \ check-pcg32_c1024 check-pcg32_c1024_fast check-pcg32_c64 \ check-pcg32_c64_fast check-pcg32_c64_oneseq check-pcg32_fast \ check-pcg32_k1024 check-pcg32_k1024_fast check-pcg32_k16384 \ check-pcg32_k16384_fast check-pcg32_k2 check-pcg32_k2_fast \ check-pcg32_k64 check-pcg32_k64_fast check-pcg32_k64_oneseq \ check-pcg32_once_insecure check-pcg32_oneseq \ check-pcg32_oneseq_once_insecure check-pcg32_unique check-pcg64 \ check-pcg64_c1024 check-pcg64_c1024_fast check-pcg64_c32 \ check-pcg64_c32_fast check-pcg64_c32_oneseq check-pcg64_fast \ check-pcg64_k1024 check-pcg64_k1024_fast check-pcg64_k32 \ check-pcg64_k32_fast check-pcg64_k32_oneseq check-pcg64_once_insecure \ check-pcg64_oneseq check-pcg64_oneseq_once_insecure check-pcg64_unique \ check-pcg128_once_insecure check-pcg128_oneseq_once_insecure # special flags for some compilers CPPFLAGS_clang++ += \ -Weverything \ -Wno-unknown-warning-option \ -Wno-c++98-compat \ -Wno-c++98-compat-pedantic \ -Wno-date-time \ -Wno-undef \ -Wno-header-hygiene \ -Wno-unused-macros CPPFLAGS += -I../include -Wall -Wextra $(CPPFLAGS_$(CXX)) CXXFLAGS += -std=c++11 CC = $(CXX) # Cheat so that linking uses the C++ compiler all: $(TARGETS) test: $(TARGETS) sh run-tests.sh clean: rm -f *.o $(TARGETS) rm -rf actual pcg-test-noadvance.o: pcg-test-noadvance.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp pcg-test.o: pcg-test.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg8_once_insecure.o: check-pcg8_once_insecure.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg8_oneseq_once_insecure.o: check-pcg8_oneseq_once_insecure.cpp \ pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg16_once_insecure.o: check-pcg16_once_insecure.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg16_oneseq_once_insecure.o: check-pcg16_oneseq_once_insecure.cpp \ pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32.o: check-pcg32.cpp pcg-test.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg32_c1024.o: check-pcg32_c1024.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_c1024_fast.o: check-pcg32_c1024_fast.cpp \ pcg-test-noadvance.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg32_c64.o: check-pcg32_c64.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_c64_fast.o: check-pcg32_c64_fast.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_c64_oneseq.o: check-pcg32_c64_oneseq.cpp \ pcg-test-noadvance.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg32_fast.o: check-pcg32_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k1024.o: check-pcg32_k1024.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k1024_fast.o: check-pcg32_k1024_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k16384.o: check-pcg32_k16384.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k16384_fast.o: check-pcg32_k16384_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k2.o: check-pcg32_k2.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k2_fast.o: check-pcg32_k2_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k64.o: check-pcg32_k64.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k64_fast.o: check-pcg32_k64_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_k64_oneseq.o: check-pcg32_k64_oneseq.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_once_insecure.o: check-pcg32_once_insecure.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_oneseq.o: check-pcg32_oneseq.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_oneseq_once_insecure.o: check-pcg32_oneseq_once_insecure.cpp \ pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg32_unique.o: check-pcg32_unique.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64.o: check-pcg64.cpp pcg-test.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg64_c1024.o: check-pcg64_c1024.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_c1024_fast.o: check-pcg64_c1024_fast.cpp \ pcg-test-noadvance.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg64_c32.o: check-pcg64_c32.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_c32_fast.o: check-pcg64_c32_fast.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_c32_oneseq.o: check-pcg64_c32_oneseq.cpp \ pcg-test-noadvance.cpp ../include/pcg_random.hpp \ ../include/pcg_extras.hpp ../include/pcg_uint128.hpp check-pcg64_fast.o: check-pcg64_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_k1024.o: check-pcg64_k1024.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_k1024_fast.o: check-pcg64_k1024_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_k32.o: check-pcg64_k32.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_k32_fast.o: check-pcg64_k32_fast.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_k32_oneseq.o: check-pcg64_k32_oneseq.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_once_insecure.o: check-pcg64_once_insecure.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_oneseq.o: check-pcg64_oneseq.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_oneseq_once_insecure.o: check-pcg64_oneseq_once_insecure.cpp \ pcg-test.cpp ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg64_unique.o: check-pcg64_unique.cpp pcg-test-noadvance.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg128_once_insecure.o: check-pcg128_once_insecure.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp check-pcg128_oneseq_once_insecure.o: \ check-pcg128_oneseq_once_insecure.cpp pcg-test.cpp \ ../include/pcg_random.hpp ../include/pcg_extras.hpp \ ../include/pcg_uint128.hpp pcg-cpp-0.98.1/test-high/check-pcg128_once_insecure.cpp000066400000000000000000000001221250047755200225240ustar00rootroot00000000000000#define RNG pcg128_once_insecure #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg128_oneseq_once_insecure.cpp000066400000000000000000000001311250047755200240760ustar00rootroot00000000000000#define RNG pcg128_oneseq_once_insecure #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg16_once_insecure.cpp000066400000000000000000000001211250047755200224370ustar00rootroot00000000000000#define RNG pcg16_once_insecure #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg16_oneseq_once_insecure.cpp000066400000000000000000000001301250047755200240110ustar00rootroot00000000000000#define RNG pcg16_oneseq_once_insecure #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32.cpp000066400000000000000000000001031250047755200175340ustar00rootroot00000000000000#define RNG pcg32 #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_c1024.cpp000066400000000000000000000001231250047755200203470ustar00rootroot00000000000000#define RNG pcg32_c1024 #define TWO_ARG_INIT 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_c1024_fast.cpp000066400000000000000000000001301250047755200213620ustar00rootroot00000000000000#define RNG pcg32_c1024_fast #define TWO_ARG_INIT 0 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_c64.cpp000066400000000000000000000001211250047755200202100ustar00rootroot00000000000000#define RNG pcg32_c64 #define TWO_ARG_INIT 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_c64_fast.cpp000066400000000000000000000001261250047755200212320ustar00rootroot00000000000000#define RNG pcg32_c64_fast #define TWO_ARG_INIT 0 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_c64_oneseq.cpp000066400000000000000000000001301250047755200215620ustar00rootroot00000000000000#define RNG pcg32_c64_oneseq #define TWO_ARG_INIT 0 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_fast.cpp000066400000000000000000000001101250047755200205470ustar00rootroot00000000000000#define RNG pcg32_fast #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k1024.cpp000066400000000000000000000001111250047755200203540ustar00rootroot00000000000000#define RNG pcg32_k1024 #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k1024_fast.cpp000066400000000000000000000001161250047755200213760ustar00rootroot00000000000000#define RNG pcg32_k1024_fast #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k16384.cpp000066400000000000000000000001121250047755200204540ustar00rootroot00000000000000#define RNG pcg32_k16384 #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k16384_fast.cpp000066400000000000000000000001171250047755200214760ustar00rootroot00000000000000#define RNG pcg32_k16384_fast #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k2.cpp000066400000000000000000000001061250047755200201330ustar00rootroot00000000000000#define RNG pcg32_k2 #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k2_fast.cpp000066400000000000000000000001131250047755200211460ustar00rootroot00000000000000#define RNG pcg32_k2_fast #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k64.cpp000066400000000000000000000001071250047755200202240ustar00rootroot00000000000000#define RNG pcg32_k64 #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k64_fast.cpp000066400000000000000000000001141250047755200212370ustar00rootroot00000000000000#define RNG pcg32_k64_fast #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_k64_oneseq.cpp000066400000000000000000000001161250047755200215760ustar00rootroot00000000000000#define RNG pcg32_k64_oneseq #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_once_insecure.cpp000066400000000000000000000001211250047755200224350ustar00rootroot00000000000000#define RNG pcg32_once_insecure #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_oneseq.cpp000066400000000000000000000001121250047755200211060ustar00rootroot00000000000000#define RNG pcg32_oneseq #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_oneseq_once_insecure.cpp000066400000000000000000000001301250047755200240070ustar00rootroot00000000000000#define RNG pcg32_oneseq_once_insecure #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg32_unique.cpp000066400000000000000000000001241250047755200211250ustar00rootroot00000000000000#define RNG pcg32_unique #define TWO_ARG_INIT 0 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg64.cpp000066400000000000000000000001031250047755200175410ustar00rootroot00000000000000#define RNG pcg64 #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_c1024.cpp000066400000000000000000000001611250047755200203560ustar00rootroot00000000000000#define RNG pcg64_c1024 #define TWO_ARG_INIT 1 #define AWKWARD_128BIT_CODE 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_c1024_fast.cpp000066400000000000000000000001661250047755200214000ustar00rootroot00000000000000#define RNG pcg64_c1024_fast #define TWO_ARG_INIT 0 #define AWKWARD_128BIT_CODE 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_c32.cpp000066400000000000000000000001571250047755200202210ustar00rootroot00000000000000#define RNG pcg64_c32 #define TWO_ARG_INIT 1 #define AWKWARD_128BIT_CODE 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_c32_fast.cpp000066400000000000000000000001641250047755200212340ustar00rootroot00000000000000#define RNG pcg64_c32_fast #define TWO_ARG_INIT 0 #define AWKWARD_128BIT_CODE 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_c32_oneseq.cpp000066400000000000000000000001661250047755200215730ustar00rootroot00000000000000#define RNG pcg64_c32_oneseq #define TWO_ARG_INIT 0 #define AWKWARD_128BIT_CODE 1 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_fast.cpp000066400000000000000000000001101250047755200205540ustar00rootroot00000000000000#define RNG pcg64_fast #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_k1024.cpp000066400000000000000000000001471250047755200203720ustar00rootroot00000000000000#define RNG pcg64_k1024 #define TWO_ARG_INIT 1 #define AWKWARD_128BIT_CODE 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_k1024_fast.cpp000066400000000000000000000001541250047755200214050ustar00rootroot00000000000000#define RNG pcg64_k1024_fast #define TWO_ARG_INIT 0 #define AWKWARD_128BIT_CODE 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_k32.cpp000066400000000000000000000001451250047755200202260ustar00rootroot00000000000000#define RNG pcg64_k32 #define TWO_ARG_INIT 1 #define AWKWARD_128BIT_CODE 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_k32_fast.cpp000066400000000000000000000001521250047755200212410ustar00rootroot00000000000000#define RNG pcg64_k32_fast #define TWO_ARG_INIT 0 #define AWKWARD_128BIT_CODE 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_k32_oneseq.cpp000066400000000000000000000001541250047755200216000ustar00rootroot00000000000000#define RNG pcg64_k32_oneseq #define TWO_ARG_INIT 0 #define AWKWARD_128BIT_CODE 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_once_insecure.cpp000066400000000000000000000001211250047755200224420ustar00rootroot00000000000000#define RNG pcg64_once_insecure #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_oneseq.cpp000066400000000000000000000001121250047755200211130ustar00rootroot00000000000000#define RNG pcg64_oneseq #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_oneseq_once_insecure.cpp000066400000000000000000000001301250047755200240140ustar00rootroot00000000000000#define RNG pcg64_oneseq_once_insecure #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg64_unique.cpp000066400000000000000000000001241250047755200211320ustar00rootroot00000000000000#define RNG pcg64_unique #define TWO_ARG_INIT 0 #include "pcg-test-noadvance.cpp" pcg-cpp-0.98.1/test-high/check-pcg8_once_insecure.cpp000066400000000000000000000001201250047755200223570ustar00rootroot00000000000000#define RNG pcg8_once_insecure #define TWO_ARG_INIT 1 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/check-pcg8_oneseq_once_insecure.cpp000066400000000000000000000001271250047755200237400ustar00rootroot00000000000000#define RNG pcg8_oneseq_once_insecure #define TWO_ARG_INIT 0 #include "pcg-test.cpp" pcg-cpp-0.98.1/test-high/expected/000077500000000000000000000000001250047755200166465ustar00rootroot00000000000000pcg-cpp-0.98.1/test-high/expected/.gitignore000066400000000000000000000000571250047755200206400ustar00rootroot00000000000000# These .out files shouldn't be ignored !*.out pcg-cpp-0.98.1/test-high/expected/check-pcg128_once_insecure.out000066400000000000000000000102251250047755200243570ustar00rootroot00000000000000pcg128_once_insecure: - result: 128-bit unsigned int - period: 2^128 (* 2^127 streams) - size: 32 bytes Round 1: 128bit: 0x5f4ea96e8510af0686b1da1d72062b68 0x341b1cb1e675ec461304aa46c9853d39 0xcfdc46c17f1c9974a3670e9e0dd50358 0x02d273b87fe9110cf9090e529a7dae00 0x9b4e47fda576f0ddc85b9fd837996f2c 0x17cee59c8cb9c0a1606121f8e3919196 Again: 0x5f4ea96e8510af0686b1da1d72062b68 0x341b1cb1e675ec461304aa46c9853d39 0xcfdc46c17f1c9974a3670e9e0dd50358 0x02d273b87fe9110cf9090e529a7dae00 0x9b4e47fda576f0ddc85b9fd837996f2c 0x17cee59c8cb9c0a1606121f8e3919196 Coins: TTTHHHTTTHHHTTTTHHTTHHTHTHTTHHTHTTTTHHTTTHTHHTHTTTTHHTTTHHHTTTHTT 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 --> rolling dice used 33 random numbers Cards: As 2s 8h Tc 3c 5h Ac 5c 9d 8d Td Ts 4c 7d 9c Jh 3d Th 8s 5s 2h 6d 7h 3h Qd 7c Qh Ks Js Kh 6s 3s Qc Ah 6h 9s Ad Kc 6c Kd 5d Jd 2d Jc 2c 4d Qs 9h 7s 8c 4h 4s Round 2: 128bit: 0x95a15dc187be75191773ba241e7a792a 0x7f9a9c8dc8ee5d30e41aed7117b0bc10 0x859f2aaeb7456bae36bac8d9432af525 0xd83833165d913fb0e0c78e2f3c850a38 0xa437ee7e51a835ebe3ad939c1c7ce70d 0x9a515b18be44d777a302fdced8c79e93 Again: 0x95a15dc187be75191773ba241e7a792a 0x7f9a9c8dc8ee5d30e41aed7117b0bc10 0x859f2aaeb7456bae36bac8d9432af525 0xd83833165d913fb0e0c78e2f3c850a38 0xa437ee7e51a835ebe3ad939c1c7ce70d 0x9a515b18be44d777a302fdced8c79e93 Coins: TTTTHTHTHHTHTHTTTTTHHTTHHHHTHTHHHHHHHTHHHTHHTHTTTHHHHTTHHTTTHTHTH 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 --> rolling dice used 33 random numbers Cards: 3s Qd Qc 6s 7c 8d 5s 5c Kc 7h Kd Ad 4d 6c Kh Qh 2c Jc Th Jh 4c Ks Td 8s Jd 2h Ac 9c 7s 8c 3c Ah 9h 3h 7d 8h Js Qs As 4s 6d 5d 9s 9d 5h 3d 6h Tc 4h Ts 2d 2s Round 3: 128bit: 0x6bfdb8dec74ac18ac96006593aed3b62 0xeef8b9c71cb3b932f04d5afa3f197bf1 0x904d15f0ead523cfce6f729cc913a50f 0x34d0abbd7c06a00798b5fc4fbb1e4aea 0xa7d1cc41ac8cf8d1802dce1b410fc8c3 0x1622c80e085b475ae3bac0a14f6e5033 Again: 0x6bfdb8dec74ac18ac96006593aed3b62 0xeef8b9c71cb3b932f04d5afa3f197bf1 0x904d15f0ead523cfce6f729cc913a50f 0x34d0abbd7c06a00798b5fc4fbb1e4aea 0xa7d1cc41ac8cf8d1802dce1b410fc8c3 0x1622c80e085b475ae3bac0a14f6e5033 Coins: HTTHTHTTTTTHTTTHHTHTHHTHHHHHHHHHTTTHTHTHTHHTTTTTTHHHHTHTTTTHHHHHH 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 --> rolling dice used 33 random numbers Cards: Jh Th 3s 4d 7c Kd Kc 4h 8h 3c 9d 3h Ac 5h 9s 8d 6d 7h 5s Qs 5d Ah Td 8s Ad 6s 7s 7d Ts 2h 5c As Tc 3d Js 4s 2s Jc 2d Ks 6h 2c 4c 6c Qc Qd 9c Kh 8c Jd Qh 9h Round 4: 128bit: 0x776dd6f62f789d2368da679de81de48a 0x325b1acf6c0987ad7ee3c031fa0aa440 0x4c2fa58857bd28a36eb1663983530403 0x2da890444508568bfec4d7a9a7aec823 0x2d0d7462ff348734bce221c255ee9467 0xf27f193f4fdbda86460a42a962b8a2f9 Again: 0x776dd6f62f789d2368da679de81de48a 0x325b1acf6c0987ad7ee3c031fa0aa440 0x4c2fa58857bd28a36eb1663983530403 0x2da890444508568bfec4d7a9a7aec823 0x2d0d7462ff348734bce221c255ee9467 0xf27f193f4fdbda86460a42a962b8a2f9 Coins: HHHTTTTHHHHHTTTTTTTHHHTHHHHTTHTTTHTTTTHTHHHHTHHTTTHHHTHHTTHHHTHTH 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 --> rolling dice used 33 random numbers Cards: 8h Ks 2s 5h Kh 2c Kc 9d 8c 9c 3s Jd Ts 5d 7c 8s Ah Jc 5s 4h Ad 4s 7d Qc 4c Jh 3d 6s Qh 7s 4d Tc 2h Ac 6c Js 3c Qd As 8d 9s 5c 9h 3h 6h Th Kd 6d 2d Td 7h Qs Round 5: 128bit: 0x2a51386ff58abc4f9e0d084cff42fe2f 0x4f5b3035738c6f7a63cd8347aae338ea 0xacdba2191e7281ad112aae00540d3fa1 0xa46125301827966c53968bc829afd6ec 0xc11d0f0a93287f5c1b9900eb6c5b6d90 0xd723aefa2d73f7b7e89ed17ea33cb420 Again: 0x2a51386ff58abc4f9e0d084cff42fe2f 0x4f5b3035738c6f7a63cd8347aae338ea 0xacdba2191e7281ad112aae00540d3fa1 0xa46125301827966c53968bc829afd6ec 0xc11d0f0a93287f5c1b9900eb6c5b6d90 0xd723aefa2d73f7b7e89ed17ea33cb420 Coins: HTTTTTHTHTHHHTHTTTHTHHTHHTHTTTHHTTHHHTTTTHTTHHTHHTHHHTTHHTHTHHHHH 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 --> rolling dice used 33 random numbers Cards: 8s 8h Td 8c Js Jd 5s Kd 8d 9s 4d Ah 2d 4h As Th 4s 6s Qc Ad 9h 3h Qh 5d 3s 9c 7c 3c Ts Kc 6c Jh 6d 2h 7d 9d Ac 5c Qs 2c 6h Ks 4c 3d Kh 2s 7s Qd Jc 5h 7h Tc pcg-cpp-0.98.1/test-high/expected/check-pcg128_oneseq_once_insecure.out000066400000000000000000000102101250047755200257230ustar00rootroot00000000000000pcg128_oneseq_once_insecure: - result: 128-bit unsigned int - period: 2^128 - size: 16 bytes Round 1: 128bit: 0xf7d42ec98a2a818c287472e87ff5705a 0x1e69ebc79672e381bbd190b04ed0b545 0xefb0314dea875a49b6cee3580db14880 0xff56268e0e45f685bf5f7d7e4c3d1864 0x03f0bf312cd0282c734eedbe7e50bbc5 0xfcfdd5e15426494fa5b6b5f867691c77 Again: 0xf7d42ec98a2a818c287472e87ff5705a 0x1e69ebc79672e381bbd190b04ed0b545 0xefb0314dea875a49b6cee3580db14880 0xff56268e0e45f685bf5f7d7e4c3d1864 0x03f0bf312cd0282c734eedbe7e50bbc5 0xfcfdd5e15426494fa5b6b5f867691c77 Coins: HHTHHHTTHTHHTTTHHHTHHHTTTTTHHTHTTTTHHTHHTTTTTTHHTHTHTTTTTHTHHTTHT 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 --> rolling dice used 33 random numbers Cards: 3s Jd Qd Ts 8s 4c Kh 4s Ac Ad 9c Ah 5d 7d 7h Jc Ks Qh 6h Th 6d 9d 6c 9h 7s 2d Qs Kc 3h Jh Qc 4h As 2h Tc Td 2c 8h Js 7c 5s 6s 5h 3c 2s 9s Kd 5c 3d 8c 8d 4d Round 2: 128bit: 0xf657b5d68ca3880a7d97ee72fb94fdf0 0xb6d7db0f93fbc13fb35f07d53cc42b66 0x3090b33f287f5fc90854c5caec0c251f 0x7bd6f8253f1bb54df37961a645554320 0xc080f66ee911f6861d1d213622351b24 0x42504eca45b1ed4c6edbb396c73fb49f Again: 0xf657b5d68ca3880a7d97ee72fb94fdf0 0xb6d7db0f93fbc13fb35f07d53cc42b66 0x3090b33f287f5fc90854c5caec0c251f 0x7bd6f8253f1bb54df37961a645554320 0xc080f66ee911f6861d1d213622351b24 0x42504eca45b1ed4c6edbb396c73fb49f Coins: HHTTHHHTHHHHHTTHHHTHHTHTHTTTHHTHHHHHHTHTTHHHHHTHTTHTHHHTHHTTHHHHH 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 --> rolling dice used 33 random numbers Cards: 7h Qs 4d 2h Qh Jd 6d Tc 3d Ac 9h Js 8c 6h 5s 5d 2d Kc 6c 3h Qd As Qc 2c 7c 4s Jh Td Ah Th 5h 4h 9d 4c Kh Kd 5c 3c Ad 9s 8d Ks 9c 2s 6s 7s Ts 8h Jc 7d 8s 3s Round 3: 128bit: 0x474a8b4dd63fff9a187ee00430cec695 0xd4f3e727b584915338efe3fb60c70613 0xc49d27028d4f01593949bd01ef38c552 0x60ef12216f0362b9d3f1543a45f3b48f 0x8eae641ccbbcb70dfb81a0482dc602cd 0xd15396a34394d7f6b48e4f661e4c7fc5 Again: 0x474a8b4dd63fff9a187ee00430cec695 0xd4f3e727b584915338efe3fb60c70613 0xc49d27028d4f01593949bd01ef38c552 0x60ef12216f0362b9d3f1543a45f3b48f 0x8eae641ccbbcb70dfb81a0482dc602cd 0xd15396a34394d7f6b48e4f661e4c7fc5 Coins: THTTTHHTHHHHHHTHTTTTHHTHTHTHHHTHTTTTTHHTHTTTTTHTTTTTHHTHHHTTTTHHT 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 --> rolling dice used 33 random numbers Cards: Ac As 6s Ks Tc Qd Js 6c 8c 8d 4d Ad Jh Jc Qc 6d 7h 3c 5h 5d 4s Th 5c 7d Qs 3d Kd Kc Ah 9d 5s 2c 2h 2s Qh Jd 9c 9h 8h 7s 3h Ts 6h 4c 8s Kh 9s 7c 3s 4h 2d Td Round 4: 128bit: 0x2f507b073ac8d692d04c0a3a8cf6c571 0x36ea864decf51f82bc94812fe9ec2c93 0x6b484924a27f6dbd691f3e3aa2f42c77 0x954cc5481ed0a339b7188d5162d89a1e 0x71cf26b7d22eeeaa17fbf02e08fee28a 0x1c485acb575bc6b71aa17486e288664f Again: 0x2f507b073ac8d692d04c0a3a8cf6c571 0x36ea864decf51f82bc94812fe9ec2c93 0x6b484924a27f6dbd691f3e3aa2f42c77 0x954cc5481ed0a339b7188d5162d89a1e 0x71cf26b7d22eeeaa17fbf02e08fee28a 0x1c485acb575bc6b71aa17486e288664f Coins: THTHHHTTTHHHHHTTHHHHHTTHHTTHTHTTHHHHHTHTTHTTTTHTTTHTHHHHTTHHTTHTH 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 --> rolling dice used 33 random numbers Cards: 4h Qd 7c Ks Jh Jd 3s 9d Js 5s 2h 3d Jc 3h Kh 8c 4d 6c 7s 2d Ac 6h Qc 4s Ad 8s 6d 9s 7h Tc 9h Kd As Ah Ts 3c 2s Qh 8h 7d 5d 2c 5h 8d Th Kc 5c 4c Td Qs 6s 9c Round 5: 128bit: 0x5429101b49650cc710bda17a1292d5aa 0xda89dc366ccf5b0bf0cd1384e25b3497 0x2e9e600e8203edde8e592be49a6a6181 0x554d49c17d5ce73a5edc4faf5cda5865 0x604de2e6fe77a156b2ecea43437a3f8c 0xaaf05073cb7cd14c98dbb99c3550f0e4 Again: 0x5429101b49650cc710bda17a1292d5aa 0xda89dc366ccf5b0bf0cd1384e25b3497 0x2e9e600e8203edde8e592be49a6a6181 0x554d49c17d5ce73a5edc4faf5cda5865 0x604de2e6fe77a156b2ecea43437a3f8c 0xaaf05073cb7cd14c98dbb99c3550f0e4 Coins: HTHTHHHHHHTHHTTHHHTTTTTTHTTTHHHTHHHHHHHHHTTTTHHTTTHTHHHHTTHHHHTTH 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 --> rolling dice used 33 random numbers Cards: Th 3h 3s 8h 6h Kh 4c 4s Js 8c 2s 6c Qc 9c 9s Ks As Ad 5d 7h 5h 3c 8d Qs Ts 4d Jh Tc Ac 6s 2c Jc 3d 9d 5s 4h Ah 6d 7c 8s 7d Td Qh Kc 2d 9h 5c Qd Jd 2h Kd 7s pcg-cpp-0.98.1/test-high/expected/check-pcg16_once_insecure.out000066400000000000000000000053601250047755200242770ustar00rootroot00000000000000pcg16_once_insecure: - result: 16-bit unsigned int - period: 2^16 (* 2^15 streams) - size: 4 bytes Round 1: 16bit: 0x9bec 0x5957 0x960e 0xd08d 0x4e05 0xde00 0x03f7 0x1fa6 0xee22 0xf6fa Again: 0x4e05 0xde00 0x03f7 0x1fa6 0xee22 0xf6fa 0x4aad 0xed64 0x9b8a 0x8a77 Coins: TTTHTTHTTHHHTTHHTTTTHTHHTHHTHTTHHHTTHTTHTHHTTTHTHTTHTHTHHTHTTTHTH 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 --> rolling dice used 33 random numbers Cards: Js 4s Jd Ts 2h Qc 4c 9d Jh 3d 2d 8h 3c Jc Tc 9h Kh 4h 6h 4d As Qd 5d 8s 7s 6s 2s Kd Kc 7d 6d 7c Ks 5s Ad Qh 3s Ah 9s 6c 7h Ac Td 9c 3h Th 8d 2c Qs 5h 8c 5c Round 2: 16bit: 0x6d56 0x15fd 0xde82 0x6cef 0x283e 0x8b82 0x94b3 0xdb7a 0x6c9d 0xaeac Again: 0x283e 0x8b82 0x94b3 0xdb7a 0x6c9d 0xaeac 0x0522 0x1190 0xad62 0x9490 Coins: THHHHHTTTTTTTHTHTHHHTHTHHTTHTHHHHTHHTHTHHTTTHTTTTTHHTHTTTTTHHHTTT 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 --> rolling dice used 33 random numbers Cards: 4c 8d 9d 5d 2c Kh 5h 6c Ks 7h 8c 8s 7d 5s Jh Ah Qs 8h Th 2s 5c Jc 4d 6h 3c 9h Qh As 6s 3s Ac Kd Qc 7s Jd 9s 3d Ad Td Js Kc 6d Tc 3h 4h 2h 4s 2d 9c Ts 7c Qd Round 3: 16bit: 0x7d5b 0xfd3f 0x64a4 0x1752 0x70b2 0x093f 0x9888 0xed16 0xa2d3 0x485b Again: 0x70b2 0x093f 0x9888 0xed16 0xa2d3 0x485b 0x89ac 0x0b44 0x1028 0xd78f Coins: HHHTHTTTTHTTHTTTHHHHTTTTTTTTHTTTTTTHHHTHTTTHHTHTHHHHHTHHHHHTTTHHT 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 --> rolling dice used 33 random numbers Cards: 4c 6c 5s 5h 3s Kd 6d Ac Jc As 5c 7d Qh 4d Ah 5d Qd 2d 9d Th 3c 8s 9c Td 6h Ts Kc 7c Qc Tc 2c 8d 7s 7h Jh 2h Qs Js 8c 9s 9h 8h 2s Ks 3d 3h 4h Kh Jd Ad 6s 4s Round 4: 16bit: 0xb560 0xc497 0xf27a 0x7b73 0x1c23 0x38f4 0xe221 0x10aa 0x030c 0x8ea3 Again: 0x1c23 0x38f4 0xe221 0x10aa 0x030c 0x8ea3 0xf40f 0xc014 0x1fe2 0xa1c2 Coins: TTHHTTTTTTHTTHTHHTTTHTTHHHHHHTTHHTHHTHTHTTHTTHTTHHHHTTHHHTTTTTHHH 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 --> rolling dice used 33 random numbers Cards: 2s Jd Kc Tc 9d Qs Js 8c 5h 3d 6c 8h 8d Td 4s 2c 2d Th Kd Ah 9s 5d 7c 7h 4d Qh 7d 6d Ac Ad 7s Jc Jh 3s 4c Ts 2h 9c 8s 3c 3h 6h 4h Kh As 5s Qc 9h Qd 5c 6s Ks Round 5: 16bit: 0xd3e8 0xe4e6 0xa68f 0xe732 0x7e4e 0xbd98 0x537b 0x0be1 0x720b 0x2087 Again: 0x7e4e 0xbd98 0x537b 0x0be1 0x720b 0x2087 0x5534 0x84ba 0x94b4 0x30f1 Coins: HTTHTTTTTHHTHHTTTTHTHTTTTHTTHHHTTTTHTHTTTHTHHTHHHTTTHHTTTTHHHTHTH 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 --> rolling dice used 33 random numbers Cards: 3d Ah 6c Ts 3h Kh 4s 9h 6s As 5c 7c 8h 9s Kd 6d Th Qs 7h Ad Qh Js 5h 9c Qd Jh 8s 7d 3c 9d 3s Ac 4h 2c 8c Td Tc 5s Qc Kc 4d 2h Jd 7s 2s Ks 5d Jc 8d 4c 6h 2d pcg-cpp-0.98.1/test-high/expected/check-pcg16_oneseq_once_insecure.out000066400000000000000000000053441250047755200256530ustar00rootroot00000000000000pcg16_oneseq_once_insecure: - result: 16-bit unsigned int - period: 2^16 - size: 2 bytes Round 1: 16bit: 0x7f90 0x7f82 0x54f7 0xe8c8 0x9444 0xba1a 0xb7fb 0x2167 0x39dd 0xb0f2 Again: 0x9444 0xba1a 0xb7fb 0x2167 0x39dd 0xb0f2 0x71e2 0xa94c 0x05c4 0x8119 Coins: THHHTTTHHHHHHTHHHTTTTTHHHHTHHTHHTTTTHTHTTHHHHTHTHTHTTHTHTHHTTHTHH 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 --> rolling dice used 33 random numbers Cards: 3s 5s 2h 9c 4d Qc Ks Ad 3h 8s 8d Td Ts 3d 4s As Js 8c 7c Qd Tc 5c Jd 6h Th Qh 4c 2c Ac 6s 9d 7s 3c Kc 9h Qs 7h 9s Jh 8h 2d 6c 7d Jc 5d Ah 6d Kh 4h Kd 2s 5h Round 2: 16bit: 0x19d4 0xadde 0xdce3 0xe222 0x7199 0xe4aa 0x9e56 0xe264 0x238e 0xe5b9 Again: 0x7199 0xe4aa 0x9e56 0xe264 0x238e 0xe5b9 0x6d73 0x83e3 0x281e 0x91cc Coins: HTTHHTHTHTTHHHTHHHHHTHTHHTHTTTTTHHHHHHHHHHTTTTTTHTTHTHHHHTHTTTTHH 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 --> rolling dice used 33 random numbers Cards: 4s 8d Tc Kd 9h 7h Qc 4h 7c Kh 5d 4c 5h Kc 7s Ac Js Ts Ks Jd Th 8s 4d 3d 5s 8c 3c Jc Td 7d Ad 3h Qh 9d 2s 6h 6s 2h 2d 8h As 9c 6d Qd Ah 2c 3s 6c 5c 9s Qs Jh Round 3: 16bit: 0x0b43 0x96d8 0x6d84 0xfb69 0xfdbc 0x053b 0x64bc 0x145d 0xd617 0xaaed Again: 0xfdbc 0x053b 0x64bc 0x145d 0xd617 0xaaed 0x4438 0x09f3 0x90da 0x0ecc Coins: HTTTHTHHHTTTHTHHTHHHHTHTHHTHHTTHTTTHTTTHHHTTHHHHTTTTHHHTHTTHTHTTH 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 --> rolling dice used 33 random numbers Cards: 4c Jd 2s 2c 8s Td 3d Ac 9c 9d Th 6s Qd 4d 6d 7s 9s Jh 8h Kh 8d 7h 5h 3h 4h 7d Tc 2h Qc Qh Ts 7c 2d 5c 3c Jc Ks 5d As 9h Ad 8c Qs Ah 6h 3s 5s 6c Kc 4s Kd Js Round 4: 16bit: 0x8e36 0x32bf 0x52af 0x7420 0x6630 0x6d3b 0x9052 0xf56d 0xdc76 0x018d Again: 0x6630 0x6d3b 0x9052 0xf56d 0xdc76 0x018d 0xfdee 0xbb1e 0x9892 0xa779 Coins: THHTTTTTHTTHHHTTTHHTHHTHTHTTHHHTHHTHTTTTHTTHTTHHHHHTHHTTHHTHHTHTT 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 --> rolling dice used 33 random numbers Cards: Td 6s Qh 3c Ts 7d Js 5h 3d 6h 7h Ac 9s Th 2d Ah 4d As 8h 8s 8c 4h 8d Jd 5s Kd 7s Tc Ks 6d Jh Jc 7c Qs 5d 9c 9h 5c 2h Kc 2s 3s 3h 6c Qc Qd 4c 4s Ad 2c 9d Kh Round 5: 16bit: 0x50cc 0xc1f3 0x63d4 0x436e 0xabb8 0x1983 0xe595 0x6424 0xf0f6 0x7a55 Again: 0xabb8 0x1983 0xe595 0x6424 0xf0f6 0x7a55 0xf5d1 0xa53f 0x3e76 0x1bd5 Coins: TTTHTHHTHTHTTTTHTTHTTHTTTHTTTTTTHHHHTTHHTTHTTHHHHHTTHHHTTTHTHTHHT 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 --> rolling dice used 33 random numbers Cards: Th 6c 2d 7s Ad 9d 8s 8c Jc Kc Jh 6s Qc Ac Tc 9c 4d 2s 3d 2h 4h 3c Qh 2c As 5d Qs 7h Kh Jd 4c 5c 8h 9s Qd 5h 9h Td 3h 5s Ks 3s Ts Ah 6h Js Kd 8d 7c 6d 4s 7d pcg-cpp-0.98.1/test-high/expected/check-pcg32.out000066400000000000000000000052731250047755200213770ustar00rootroot00000000000000pcg32: - result: 32-bit unsigned int - period: 2^64 (* 2^63 streams) - size: 16 bytes Round 1: 32bit: 0xa15c02b7 0x7b47f409 0xba1d3330 0x83d2f293 0xbfa4784b 0xcbed606e Again: 0xa15c02b7 0x7b47f409 0xba1d3330 0x83d2f293 0xbfa4784b 0xcbed606e Coins: HHTTTHTHHHTHTTTHHHHHTTTHHHTHTHTHTTHTTTHHHHHHTTTTHHTTTTTHTTTTTTTHT 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 --> rolling dice used 33 random numbers Cards: Qd Ks 6d 3s 3d 4c 3h Td Kc 5c Jh Kd Jd As 4s 4h Ad Th Ac Jc 7s Qs 2s 7h Kh 2d 6c Ah 4d Qh 9h 6s 5s 2c 9c Ts 8d 9s 3c 8c Js 5d 2h 6h 7d 8s 9d 5h 8h Qc 7c Tc Round 2: 32bit: 0x74ab93ad 0x1c1da000 0x494ff896 0x34462f2f 0xd308a3e5 0x0fa83bab Again: 0x74ab93ad 0x1c1da000 0x494ff896 0x34462f2f 0xd308a3e5 0x0fa83bab Coins: HHHHHHHHHHTHHHTHTHTHTHTTTTHHTTTHHTHHTHTTHHTTTHHHHHHTHTTHTHTTTTTTT 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 --> rolling dice used 33 random numbers Cards: 7d 2s 7h Td 8s 3c 3d Js 2d Tc 4h Qs 5c 9c Th 2c Jc Qd 9d Qc 7s 3s 5s 6h 4d Jh 4c Ac 4s 5h 5d Kc 8h 8d Jd 9s Ad 6s 6c Kd 2h 3h Kh Ts Qh 9h 6d As 7c Ks Ah 8c Round 3: 32bit: 0x39af5f9f 0x04196b18 0xc3c3eb28 0xc076c60c 0xc693e135 0xf8f63932 Again: 0x39af5f9f 0x04196b18 0xc3c3eb28 0xc076c60c 0xc693e135 0xf8f63932 Coins: HTTHHTTTTTHTTHHHTHTTHHTTHTHHTHTHTTTTHHTTTHHTHHTTHTTHHHTHHHTHTTTHT 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 --> rolling dice used 33 random numbers Cards: Kd Jh Kc Qh 4d Qc 4h 9d 3c Kh Qs 8h 5c Jd 7d 8d 3h 7c 8s 3s 2h Ks 9c 9h 2c 8c Ad 7s 4s 2s 5h 6s 4c Ah 7h 5s Ac 3d 5d Qd As Tc 6h 9s 2d 6c 6d Td Jc Ts Th Js Round 4: 32bit: 0x55ce6851 0x97a7726d 0x17e10815 0x58007d43 0x962fb148 0xb9bb55bd Again: 0x55ce6851 0x97a7726d 0x17e10815 0x58007d43 0x962fb148 0xb9bb55bd Coins: HHTHHTTTTHTHHHHHTTHHHTTTHHTHTHTHTHHTTHTHHHHHHTHHTHHTHHTTTTHHTHHTT 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 --> rolling dice used 33 random numbers Cards: Qd 8h 5d 8s 8d Ts 7h Th Qs Js 7s Kc 6h 5s 4d Ac Jd 7d 7c Td 2c 6s 5h 6d 3s Kd 9s Jh Kh As Ah 9h 3c Qh 9c 2d Tc 9d 2s 3d Ks 4h Qc Ad Jc 8c 2h 3h 4s 4c 5c 6c Round 5: 32bit: 0xfcef7cd6 0x1b488b5a 0xd0daf7ea 0x1d9a70f7 0x241a37cf 0x9a3857b7 Again: 0xfcef7cd6 0x1b488b5a 0xd0daf7ea 0x1d9a70f7 0x241a37cf 0x9a3857b7 Coins: HHHHTHHTTHTTHHHTTTHHTHTHTTTTHTTHTHTTTHHHTHTHTTHTTHTHHTHTHHHTHTHTT 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 --> rolling dice used 33 random numbers Cards: 4d 9s Qc 9h As Qs 7s 4c Kd 6h 6s 2c 8c 5d 7h 5h Jc 3s 7c Jh Js Ks Tc Jd Kc Th 3h Ts Qh Ad Td 3c Ah 2d 3d 5c Ac 8s 5s 9c 2h 6c 6d Kh Qd 8d 7d 2s 8h 4h 9d 4s pcg-cpp-0.98.1/test-high/expected/check-pcg32_c1024.out000066400000000000000000000041561250047755200222070ustar00rootroot00000000000000pcg32_c1024: - result: 32-bit unsigned int - period: 2^32832 (* 2^63 streams) - size: 4112 bytes Round 1: 32bit: 0x9f2e1932 0x778f59b0 0x288e298c 0x7c86f454 0x5380867e 0xbc1ebfef Coins: TTTTHTHTTHTTHHTTTTTTHHTHHHTTTHHHHHHTTTHHTTHHHTTTTTTHHHTHTTTTHTHHT 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 Cards: 8d 3c 8c Kh 5d 6s 6h Th 7s Ad 9s 3h 9h 9c 7h 5s Qd As Jc 8s 2h 6c Ah 5c Qh Kd Ts 7d Qs 8h 4h 4s Jd 3s Ac 5h Qc 2s 3d 7c 6d 9d 2c Js Td Kc 2d Ks Jh 4c 4d Tc Round 2: 20bit: 0x566843ac 0x905997f7 0x5b238391 0x66aed7fc 0xba6c7310 0x977fc9df Coins: TTHTTTTHHTTHTHHTHTHTTTHHHHTHHHHTTHHHHTHTTTTTHHHHHHHTHHHTTHTTHTTHH 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 Cards: 2h As 2c Qh 7d 5s Jc 6s 7h Kh 9s 4h 3s 2d 6h Qc Kc 8c Ah Tc 4c 7c Ad 3c 7s 9c 3d 2s 5d 6c Qd 6d Jd 5h 9h 5c 8d Ks 8h 4s Ts Jh Th 8s Js 4d Ac Td Qs Kd 3h 9d Round 3: 20bit: 0xddea7331 0x79f2e4e5 0x60cc53a2 0xa5c5ccc5 0x3e3053ad 0x1434a470 Coins: TTTTTTTHHTHHHTHHTHHHTTTTHHTTHHHHTTTHTTTHTTHTHHHTHTHHTHTTHHTHTTTTT 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 Cards: 4s Kh 6c Qc 5s Jc 3d 2s 6h 7s Th 3s 5d Ts Ks 9c Jd 5c Qh Ah 8s Td 7h Ac As 9s 2d 2c Ad 9h Qs 2h 8c 4h 6s 8h 5h 7d 3c Jh 9d Qd 7c 6d Kd 8d Tc Js Kc 3h 4d 4c Round 4: 20bit: 0x37d70079 0x274cad70 0xbcab1ee3 0x423840d4 0xf1becf52 0x26cfcace Coins: HTHTHHTTHHTHHTHHTHTHHTTHTTTHTHHTHTTTHTTTHTHHTTTTTTTTHTHHHHTTHTHTT 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 Cards: Jh 8d 3s 5c 5d Ac 3c Kd 4s Jd Tc Qs Qd Js 8h 9h Th Kh Ts 7d Td 7h 9c Kc 2s 7c 9d 6s 6d Qc 4d 3d 4c 3h Ad Ks 7s Jc 2d 2c 5s Qh 6c 4h 8c Ah 6h 5h 9s 8s As 2h Round 5: 20bit: 0x85d178c2 0xc263a20b 0x232a5ea9 0xaf7570ce 0x2e0b0f69 0x11823de5 Coins: TTTHTHHHTTHTTHHHTHTTHHTTTHHTTHTTTHTTHHTTHTTTHTTHTTHHTHTHHHHTTTTTH 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 Cards: 3d 8c 2d 2s As 4s 4c Tc Kc 7c Jd 5s 3c 2h 7h 6c 8s 5c Ah 6h Jc 7d Qs Ac 9c 2c 6s Th Kd Jh 9d 8h Js Td Kh Ad 3s 4h 9s 4d 9h Qc Qh Ks Qd Ts 5d 3h 7s 8d 6d 5h pcg-cpp-0.98.1/test-high/expected/check-pcg32_c1024_fast.out000066400000000000000000000041401250047755200232150ustar00rootroot00000000000000pcg32_c1024_fast: - result: 32-bit unsigned int - period: 2^32832 - size: 4104 bytes Round 1: 32bit: 0x1e355225 0xe4a06497 0xbb5f3b7b 0x5eae6c11 0xbe34aa20 0xcbd73863 Coins: THTTHHHTTTHTHTTHHHTTHHHTHHTHTHTTTHHHTHHTHTTTHHHHTTTHHHHTTTTTHTTTT 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 Cards: 7c Ac Jc Qd 5c 5h Kh 8d 2h Js 5d Ts Qs 3d 4c 6c 9c 8s 7h 7s Qc As 9d 8h 6s Ks Kc 3s 4d 2c 4s Qh Kd 5s 3c Th Ah 2d Td Jd Ad 8c 2s 4h Tc 9s 6h Jh 7d 9h 3h 6d Round 2: 20bit: 0x2a0995a5 0x33960b87 0x44137706 0x1c4df60f 0x03788d7f 0x20a26cfa Coins: HHTTTTTTTHHHHHTHHTHHHTHHTTTTTTHHHTHTTTTHHTHHHTHHTHHHTHTTTHHTHHTHH 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 Cards: Qc 4s 6c 6d Qd 2h Ts 2s Qs 7h Ad 3h 5c 4c Kd 6s 2d 4d Jh Ac 7d 3s 8h 5s 9h 8s Ah 8d 9d Td Tc Ks 8c Js 3c Kc 7c 6h 2c 9s 5d 7s Qh Th 4h 3d Jd 9c Kh 5h Jc As Round 3: 20bit: 0x163fedf6 0xf81a02e1 0x5337b072 0xb1089395 0xcb17724c 0xd19f73d1 Coins: HHHHHTTHHHHHTTTTHHTHHHTTTHHHTTTHHHHHHHTHTTHHHTHHHHTHTTTHTHTHTTTTT 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 Cards: 2c Jd 8c Kh 2d Qh Jc 7c Ah 7d Qd 3h 8h Td 5h 8s 6c 9s Th Qs 6h Tc Qc Ts 8d 2s Jh Kd 3d 5d 3s Js Ad 6d 5c 2h Ks 9h 7s 3c 9d 5s 6s 4h 4d Kc 4s As Ac 7h 9c 4c Round 4: 20bit: 0x4ca9b37f 0x5f024b85 0x6dfb8620 0xbf0d2c53 0x1408579f 0xf8915f8b Coins: HTTHHTTHTHTHTTTHHTTHTTHTHHHHTTTTHHTHHTHHHHHTTHTHTHHHHTTHTHHTHHTTH 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 Cards: Jc 4h 8c 3c 5c 7d 4c 2c Ad Kh Ah 3h 2d Qs 7h Qh Qc Ks 7s 4d Th Ts 4s Td Kd 6c 6s 2s 9h 9s Tc 8d 8s 6h Jd Js As 7c 2h Jh Qd 9c Kc 3s 6d 5h Ac 8h 5s 3d 5d 9d Round 5: 20bit: 0x242c363b 0x1fa88c24 0xd3dc68bb 0xc935d193 0xce165b29 0x5cbafaf4 Coins: TTHHTTHTHHHHTHHTTHTTTTHHTHHTTTTTHTTHTHHTHHTHHTHTTHTTHTHHTTHTTHTTT 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 Cards: Jd 7c Ad Kc 4h 5d 7d 8d 6d Th 7h 9s Ac 5h 4d Tc 9h Kh As 9c Qs 3c 3h 3s Jc 2h Js Ts 8h 8c 9d Td 2c Ks Jh 6s 2s 4c 6c Kd 7s 4s 2d 8s 5c Ah 6h 3d Qc Qh Qd 5s pcg-cpp-0.98.1/test-high/expected/check-pcg32_c64.out000066400000000000000000000041521250047755200220460ustar00rootroot00000000000000pcg32_c64: - result: 32-bit unsigned int - period: 2^2112 (* 2^63 streams) - size: 272 bytes Round 1: 32bit: 0x020b2353 0x7a157379 0xada83160 0x2953c47e 0x77c0190d 0x3f19bcb1 Coins: TTTHHHHTTHHTHHHHTHHHHHTHTTHTTHTTHHTHTTTTTHHTTHHTHHHHHTHTTHHTHTHTT 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 Cards: Qc Jh 9c 5c 7s Kh 2c Ts 8h Ks Ad 5h Th Qs 4h 6d 2s Qh Js 6c 7c 5s 8c Ac 2d 8d 9d Kc 3h 4c 9s 9h Kd 3s 6h 5d Td Ah As Qd 3d 4s 8s Jd 2h Tc 6s 7d 3c Jc 4d 7h Round 2: 20bit: 0x24751219 0x62509dfc 0xad1edbf0 0x8358d34a 0x281bfe2a 0x6fb4e17d Coins: HHTHTHTHTHHHHTHTTHTTHHTTHHTTTHHTHHHHTTHHTTTHTTHHHHHTHHHHHHTTTHTTT 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 Cards: 6c Jc Qh 7c Qd 5d 6s Ks Ts 5h 6d 2s 5c Kh 4d 8h As 9h 9s 2d Qc Jh Ah 8s Td 7s 2c Ad Qs 9c 2h Kd Kc 8d 5s Tc 4c Js 6h Th 8c 7d Jd 3h 3d 7h 3c 9d 4h 4s 3s Ac Round 3: 20bit: 0xaefc5f6a 0x8837288e 0x99485a39 0x6b33e8ec 0x3b0d9da8 0xa22e1914 Coins: HTTHTHHTTHHTHHHTHHTHTHTTHTHTTTTHHTHHTHHHHHHHHHHHTHHTHHHTTTTTTTHHT 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 Cards: 7s 3c Ad Jh 7d Qs As 2d 4d 9d Kc 8h 9s 3s 2c 8c 5c 6h Jd Ah 9h Th Qh Tc 6c Js Kd 2h 4s 7h 6s 8s 5d Td Qc 4c Kh Qd Ks 5s Ts 8d Jc 2s 4h 6d Ac 7c 9c 3d 3h 5h Round 4: 20bit: 0x910a66f1 0xfaea9f3a 0x1fb82293 0x4842083e 0xe10fbb53 0x9f265bdf Coins: HHTTHHTHHHHHHTHHHHHTTHHTTHHTHTTTHHTHTHHHHHHTHHTTHHTHTTHHHHTTTHHTT 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 Cards: 5d 3s Ac Kd Qc Qs 4s 6s Ks 8h 3c Jc Th Ad 5h 9s 9c 5c 2s 9d 7h 4d 2d Ah Tc 2c 4h 5s 9h Jd Td Ts Kh 6c 7c Qh 7d As 7s 3h 6d 8c Qd Kc 3d 6h 8s 2h Js 4c Jh 8d Round 5: 20bit: 0xd8fe156d 0xeee08bf3 0x6e5beff9 0x1defb7b7 0xbc64b375 0x11e75f12 Coins: HHHHHTTTHTTHTHHHHHHHHHHHTHHTTTHHTHTTHHTHTHTHHTTHHTTTTTTHHHHHTTTTH 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 Cards: 7d 3s 2d Ac 9s 9d Qh Jh 5c 4c 6h 9c 9h 5h Td 5s 7h Jc 4d 6s 3d Js 4s 7c 2h 8s Qd 6c 8d 7s Kc Qc Jd Ks 8h Qs 5d 2s Kd Ah Ad 4h 3c Tc 6d 2c Kh Th 3h Ts 8c As pcg-cpp-0.98.1/test-high/expected/check-pcg32_c64_fast.out000066400000000000000000000041341250047755200230630ustar00rootroot00000000000000pcg32_c64_fast: - result: 32-bit unsigned int - period: 2^2110 - size: 264 bytes Round 1: 32bit: 0x24b21aff 0x7d390e28 0x82e2dfab 0x0a2ae49e 0x3b9b07d7 0xd6c66bd1 Coins: HTTTHHTHTHTTHHTHHHHHHHTHHHHTHTHHHTTHHHTTHHTHTHTHHHHTHHHHHHTTHHTHH 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 Cards: Qc 6h 2h 8c Tc 5c Ac 7h Ts 5d Jd 8h 3s Th 9s 9h Ad 2d Kd Jh 7c 4h 4c 9c 8s 6c Kh 6d Ks 4s 2c 3d Td Kc Qs 8d 7s 5s 3c 9d Ah 7d 2s Qd Jc 3h As 6s Qh 4d Js 5h Round 2: 20bit: 0x33668329 0x05512f11 0x86b4a881 0xe69e1d73 0x078ed3c7 0xd05cee1e Coins: HTHTTTHHTTTHTTHHTHHHHHHTTHHHTHHHHHHHTTHHHTTTHHHHHTTHTHHHTHTTTTTTH 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 Cards: Ad 3d Kc Tc 6c 3c Ts Qd Qh 6d Jd Ks Td 8s 4h Jh As 5d Th 3s Kh 9d Ac 7s 6h 9c 8h 2h 2s 4c 7d 5c 5h Ah 6s Js 9s Qs 2d 4d 8c 9h 4s 7h 8d 3h 7c Qc 2c Jc Kd 5s Round 3: 20bit: 0x0ef168f2 0x0e0f90fe 0x34f4889d 0x78274f67 0xee43a56f 0x966c625a Coins: HHHTTTHHHHTHHHHHTHHHHTHHHTTTTTTTHTHHHTTTHHTHTHTTTTTHHTHHTHTHTTHHH 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 Cards: Qs 8s 2d Qd 8c 6c Kh Ts Ah 4h 3d 3c 5h Qc 3s 4d Kd Ks 6s 3h Kc Jc Td Jh 7c Qh Ad 4c 9s 8h 6d 7d Jd 7h 7s 5c Ac 2s 4s 9d 9h 2c 2h 6h As 8d Js 5d 5s 9c Th Tc Round 4: 20bit: 0xeb88b9b7 0x6877b6d1 0xe4689557 0x8e7a0f18 0x1f111185 0x1c862358 Coins: HHTTHHHTHHHTTTTTHHTTHTTTHTTHTTTTHTHHHTHTTTHHHHTHHTTTTTTTHHHTHHTTH 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 Cards: Kc 7c 4s 6s Js 3d 8c 2d 9s 5c 6c 6d Qc Qd 2h 2c Tc 7s 2s 5h 5d 9h Jd Jc 3s Qs 7h 8h Td Ts Qh Kd 4c 7d 8s 3c 6h Ah Ad 4h 9d Th 9c As 8d 3h 5s Jh Ks 4d Kh Ac Round 5: 20bit: 0x92c5be80 0xf87ee090 0x9d648d40 0xf7de421a 0xba013d74 0xdb8c6381 Coins: TTTTTTHHHTHTTTTTHHTTTHTTTTHTHHHTTTHHTHTHHHHTHTTTTHTTTHHHTTTHHTTHT 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 Cards: 5s 3h 5c Td Ah 7c 3d Tc 7h 6d 5h Th 4h Qc 9s 6c 6h Jc 4d Ts 8c 9h 9d 2d Js Jh 9c 8s Ad 2s 4s 8h 4c 7d 2c Ac 8d Jd 5d Kd As Qs 3c 2h Qh Ks Qd 3s 6s Kh 7s Kc pcg-cpp-0.98.1/test-high/expected/check-pcg32_c64_oneseq.out000066400000000000000000000041361250047755200234220ustar00rootroot00000000000000pcg32_c64_oneseq: - result: 32-bit unsigned int - period: 2^2112 - size: 264 bytes Round 1: 32bit: 0x77b22db0 0xc0d701de 0xa73ff12e 0x7bec2cfc 0x94682a9d 0x493de263 Coins: TTHTTHHTTTTHHTHHTHTHTHTTHHHHTTTHTHHHHTHTTHHTTHHTHTHTHHHHHTTTHHTHH 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 Cards: Kc 2d 9h 2s 7d 5c Td 6h 9c Th 5s 8h 3s 3h Jc 4d Qc 4h Ac Js 6s Kd 4c 9s 9d 8d 8c Kh Qh Jh 6d Ts 7s 8s 2c 2h Tc Ad 5h 3c 7h As Qd 5d Jd 3d 4s 6c Ks 7c Ah Qs Round 2: 20bit: 0x4c0edc92 0x07406631 0x62de4826 0x27621708 0xf3fe1e49 0x812b2e17 Coins: THHHHHHHHHTTTHTHTTTTHTTTHTHHTTTTTTTHHTTHTTHHTHTHHTTTTTTTTTHTTHTHH 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 Cards: Tc 4c Qs Td Ac Qh 7c 5d Ts 9s 2c 8d Ah Jd Th 5s 9c As 6d 8h 8s 3h 6h 9d 7d 5c 7h 3s 6s Kc Jc 8c Ks Qd Qc 3c 4d 4h 5h Jh 2s 2h 7s Kd 9h Js 2d 3d Kh Ad 6c 4s Round 3: 20bit: 0xe761bbf8 0x7993beb4 0xaff5e793 0x391ebef8 0xa4397fba 0xfba6ecaa Coins: TTHHTHTHTHTTHHTTHHTTHHTHHTHTHTHHTHHHHTTHHHTTTTTTHTHHHTTHTTTTHHHHT 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 Cards: 9h 8h 9c Tc 2d 3h Kh Jd As 7d Qc Ts 3s 7s Ks 5d 3d Kd Jh 7h 8c 4h 5s Jc 6h 2h Ac Qh Ad 2s 2c Th 7c 8d 6s 6c 9d Kc 8s 9s 5h Ah Td 4d Js Qs 4c 6d Qd 4s 3c 5c Round 4: 20bit: 0x32a474ca 0x33a6179f 0x9184ae8c 0x9277ff8a 0xfc81ddca 0x844a798f Coins: THTTTTTHTTHHHTHHTTTHTHHHTHHHTTTHHTHHHTHTTHHHHHHHHHTHHTHHTHHTTHTTH 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 Cards: 5s Js 2c 2h 5h Tc Kh 8h 2s 2d 8c Kd 8s As Qs 3d Th 5d Qd Ac Td 4c 4h Jh 8d Qc 5c 6c 9s 4s Ks 9d 3c Ts 7d 9h 3s 3h 6d 6h Jc 4d 7c Kc Qh Jd Ad 9c 6s 7s 7h Ah Round 5: 20bit: 0xb8af4d5e 0x3b843775 0xa811b5aa 0xcd63ad11 0xa26b78e2 0x6c6704ec Coins: TTTHTHTTHHTTTHTTTTTTHTTHTHTTHTHTTTHHTTHHTHTHHHHTHHHHHTTTHTHTTHHTH 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 Cards: Ah 3s Th Ks 4d 2d 2s Qh 3c 6d 7s 3h 5d 6h Ts 8c Jc Jd 2c Jh 6s Kd 8h Qc 9s 3d Ac 7c 4s 2h Ad 5s Qd Qs 4h 7h 5h 5c Td 9h Kc Tc Kh 6c 4c Js 9c 8s 9d As 7d 8d pcg-cpp-0.98.1/test-high/expected/check-pcg32_fast.out000066400000000000000000000052541250047755200224130ustar00rootroot00000000000000pcg32_fast: - result: 32-bit unsigned int - period: 2^62 - size: 8 bytes Round 1: 32bit: 0x00000000 0x5c400ccc 0x03a8459e 0x9bdb59c5 0xf1c9dcf5 0xaac0af3b Again: 0x00000000 0x5c400ccc 0x03a8459e 0x9bdb59c5 0xf1c9dcf5 0xaac0af3b Coins: HTHHTHHTTHTHHHTTTTTHHTTTTHTHTHTTHTTHHHHTHHTTTHHTTTTHTTTTHHHTHTHHT 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 --> rolling dice used 33 random numbers Cards: 2s 8d 7s 9h Ad Qc Jh 5s 3d 3s 7c Qs Kh Ts 3h Ac 5c 9d 6s 4c 8h 2d Kc 6c 9c 8c 6d 5d As 2h 7h Th Td Js Jd 3c 5h 7d Ah Qd 4d 2c Ks 4s 9s Jc 6h 8s 4h Kd Tc Qh Round 2: 32bit: 0x9d4c8720 0x888c050e 0x20a18d88 0x9af6f5ac 0xe9e08d16 0x30dc8422 Again: 0x9d4c8720 0x888c050e 0x20a18d88 0x9af6f5ac 0xe9e08d16 0x30dc8422 Coins: HTHHHTTTHHHTTHHTTTTTHHHHHHHHHTTHHHHHHTTHHTTTHHTTTHHHTTTHHTHHTHTHH 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 --> rolling dice used 33 random numbers Cards: 8c 3c 5h 2d 4s 7d 4h 5c Kh 5s 3s Kd 9h 6h Th 7h 8d 8h Qs Ks Tc Qh Qd Ac 9d Jd Td 6d Ts 8s Js Jh 6c 7c 6s 2c Kc 2h 4d 9c 3h Ah Qc 4c 5d 7s Jc 9s As 2s Ad 3d Round 3: 32bit: 0xd9561348 0xc5f085ff 0x55b15d21 0xb00d4c13 0x1ad51817 0xb1687c92 Again: 0xd9561348 0xc5f085ff 0x55b15d21 0xb00d4c13 0x1ad51817 0xb1687c92 Coins: THTHHHTTTHTHHTHTHTTTTHHTTTTHHHTHTTTTTHHTHTHHHHHTTTHTTTTHTTHTTHTHT 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 --> rolling dice used 33 random numbers Cards: 7d 5h As 8c Qh 6d Ts Qd Ah 6c 7c 9c 8d 9h 4s 4c 3d 4d Ad Ks Td 3s 3c Kd 8h Kc Jd Kh Th Qs Jh 8s 2c 7s Jc 2h 6h 9d 2d 9s Ac 2s Qc 5s Js 5d Tc 5c 4h 3h 6s 7h Round 4: 32bit: 0xb00d4873 0x97e247d1 0x3aed3e74 0xa6f02f6a 0x007428ae 0x88fb2312 Again: 0xb00d4873 0x97e247d1 0x3aed3e74 0xa6f02f6a 0x007428ae 0x88fb2312 Coins: HTTHTHTTTHHTHHTTHHTTHTHHTTTHTHTHHHTHTHTTTHHHHTHHTHHHHTTHHHHTHHHHT 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 --> rolling dice used 33 random numbers Cards: 4s Qc 2s 4h Kh 6d Ts 9s 2c Ks 5h Jc 2h Ac Qs Jd 8d 2d 7s 3c 8c 6c Kd Kc 7h 4c 9h 3h 5s Ah 8h 7c Td 3d 6h 5d Tc Qh 3s 4d 9c Ad Qd 9d 8s Jh 7d 5c As Js Th 6s Round 5: 32bit: 0x9b08b727 0x4b6859af 0x06de6f08 0x628f4193 0x39397e2d 0x9e8304d1 Again: 0x9b08b727 0x4b6859af 0x06de6f08 0x628f4193 0x39397e2d 0x9e8304d1 Coins: THTHHTTTTHTTHHHTHTHTHTHHTTTHHHHTHHHTTTHHTHTHHTHTHTTTTTHHHHHHTTTHT 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 --> rolling dice used 33 random numbers Cards: 4c 2h Qh 6d 6h 8h 5s Qd 6c 7d Ac 5h 8s Ad 4d 9s 2c Tc Js 3d Th Ah Jd 5d 3h 4s Ts Kc 6s 8d 8c 2d Kh 7h 9c Qc 3c Td As 7c Kd 2s 9d Ks Jh Jc 5c 4h 3s Qs 9h 7s pcg-cpp-0.98.1/test-high/expected/check-pcg32_k1024.out000066400000000000000000000053061250047755200222150ustar00rootroot00000000000000pcg32_k1024: - result: 32-bit unsigned int - period: 2^32832 (* 2^63 streams) - size: 4112 bytes Round 1: 32bit: 0x35101047 0x038b320a 0x2d64ba34 0x5358b5f9 0x94ec4dae 0x1018b3a1 Again: 0x35101047 0x038b320a 0x2d64ba34 0x5358b5f9 0x94ec4dae 0x1018b3a1 Coins: HTHHHTTHTHHTTTTTTTHHTTHTHHHHHHTTHHHTHHTTTTHHTTHTHTHTTTTTTHTHHHHTT 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 --> rolling dice used 33 random numbers Cards: Ad 4c 6s Tc Qh 7c Kd Td 5d Jc 9d 2s 4d Kc 9c Ks 8c Jh 6h 3s 3d 3c 5s Th 5h Ac 7h 2d Ah 6d 5c Ts Qc 8h 2c 6c 4h Qd 7s 8s Js 9s 4s 9h 2h Kh As 7d Jd 3h Qs 8d Round 2: 32bit: 0x86bbb4b0 0x521c7b58 0x9f04cb6d 0x99fa2db5 0x0fedab13 0x3784e5f2 Again: 0x86bbb4b0 0x521c7b58 0x9f04cb6d 0x99fa2db5 0x0fedab13 0x3784e5f2 Coins: THHHTTHHHHHHHHTTHTHHHHHTHTHHHHHTHTTTTTHHTHTHTTTHTTTHHHTHHHHHTHHHH 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 --> rolling dice used 33 random numbers Cards: 6h 4h 4s 7h 4c 2d 6c 7s Kc Js Ah 8h Kd Ts Jh Ks 3s 9d 3h 6s 4d Qs Jc 6d 9s Td 3d Jd 5s Qc 2c 8c 3c 5h Tc 7d Ad 2h 5d 9c 2s 9h As Th 8s Ac 7c Qd 5c 8d Kh Qh Round 3: 32bit: 0xf7229861 0xc4197aed 0xf047bd79 0xed006f07 0xa6c671c8 0xd53e3104 Again: 0xf7229861 0xc4197aed 0xf047bd79 0xed006f07 0xa6c671c8 0xd53e3104 Coins: HHHHTHHTTHHTTHTTHHHTHHHTTTHTTTHTHTHTHHTTTTTTHHHHHHTTTTTTTHTHHTHTT 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 --> rolling dice used 33 random numbers Cards: 8c Ac 6d Jc 2d Kh Jd Qs Ks 6c Jh 3d 4s 5h Js Qc 2c 5c Ad 7d Kc 9h 3s 8d 6s 2s Kd Qd 6h Ts 2h As 7h 9d 3c 4h 5s Td Ah 4d 8s Tc 4c 5d Th 3h Qh 9s 8h 9c 7s 7c Round 4: 32bit: 0x1e8c0c96 0x1e36c8b8 0x390dfe9c 0x2eefcb94 0xdc38c0ef 0xabf50bb7 Again: 0x1e8c0c96 0x1e36c8b8 0x390dfe9c 0x2eefcb94 0xdc38c0ef 0xabf50bb7 Coins: HHTTHTHTTTHHHHHHHTHTTHTHTHHTHHHHHHHHHTHTTTTTHTHHTHHHTTHHTTTTTHTTH 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 --> rolling dice used 33 random numbers Cards: 7s 7h 7c 3d 4s 5d Th 7d Qc 3c Qs 5c Tc 5h Js 6h 6c 8c 2d 5s 9c 3s 4h Qd 4c 6d Qh Td Kc 2s Ac Kd 4d Jd Kh Jc 2c As Ah 8h 9s 3h 8s 2h Jh 6s Ts 9d 8d Ad Ks 9h Round 5: 32bit: 0xaaab00d6 0x85f97565 0x45080fa4 0xb2568821 0x061724af 0xd520c0df Again: 0xaaab00d6 0x85f97565 0x45080fa4 0xb2568821 0x061724af 0xd520c0df Coins: THHHHTHTHHTTHHHTTTHHHHTHHHTTTTTTTHHTTHTTHTTHTHTHTHTHHHHTTTTTHTHHH 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 --> rolling dice used 33 random numbers Cards: 6h 8s Kc As 7d Qc 5c 7h 6d 2h Tc Qd 3c Td 9s 7c Ad Ts 8d Ac Kd Js Qs 4d 4h Ks 4s 4c 9h Qh 5s 8c 9c 6c 6s 5h Jc 3h 2d 3s 3d Jd Ah Th 5d Kh 9d 2c 2s Jh 8h 7s pcg-cpp-0.98.1/test-high/expected/check-pcg32_k1024_fast.out000066400000000000000000000052701250047755200232320ustar00rootroot00000000000000pcg32_k1024_fast: - result: 32-bit unsigned int - period: 2^32832 - size: 4104 bytes Round 1: 32bit: 0xc7221d08 0xff86f771 0x75f34ec3 0xa7a2023a 0x125ae5e7 0xb5ca5bc4 Again: 0xc7221d08 0xff86f771 0x75f34ec3 0xa7a2023a 0x125ae5e7 0xb5ca5bc4 Coins: TTTTHTTHTTTTTHHTTHHHHTTTTHHHTTHTHHHHHHTTHTTHTHTHTTTHHTTTHHTHTHTHT 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 --> rolling dice used 33 random numbers Cards: Qs 4h 8h 6d Qd Js Td 2c 3s 8d As Kh Ah Ts 5s Tc 2s 9d 7s 3c Ad 4s Jh 5c Kc 9h 5d 3d Jc Th Kd Qc 4d 2d 6h 9s 5h 6s Ac Ks 7d 7c 8c Qh 8s Jd 6c 3h 9c 2h 4c 7h Round 2: 32bit: 0x748a6a64 0xa03af0b2 0xb129b59b 0xcf5e4f80 0x4839d150 0xb0ee13b8 Again: 0x748a6a64 0xa03af0b2 0xb129b59b 0xcf5e4f80 0x4839d150 0xb0ee13b8 Coins: HTHTHHHHHTTTHHHHTHHHHHTTTHHTHHTHTTTTHTTHTHTTHHTHHTTTTTTHTHTTTTTTH 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 --> rolling dice used 33 random numbers Cards: Qd 2c 7s Ts 7h Ks 3c Kc 2s Js 9h 5c 8d 4s Jd 8c 9c Jc Kd 6c 8s Ac 2d 2h 9d Td Qs 7d Tc 6d 9s Ah 4h 5s 3d 3h 7c Qc 8h As 4d 6s Kh Ad Qh Th 6h Jh 5d 5h 3s 4c Round 3: 32bit: 0xeed322b4 0x7605071e 0x12f1f90b 0x84d6454e 0x9f738fea 0xa4e3bbb2 Again: 0xeed322b4 0x7605071e 0x12f1f90b 0x84d6454e 0x9f738fea 0xa4e3bbb2 Coins: HHTHHHTHHHHTTTHTTHTHHTHTTTHHTTHTTTHTTHTHHTTTTTTTTHHTTHTHHHTHHHHHT 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 --> rolling dice used 33 random numbers Cards: As Kh 4d 2s 3d 3h 4c Qc 8h 6d 7s Qs Kd 9c Ts 6s 7h 6h Ad Qh 9s 4h Jd Ah 6c 3c Jc Ks 5h 8s 2h 7c 3s 8d Js 9h 8c 9d 2d Ac Tc 4s 5c Th Kc Td 7d 2c 5s Jh 5d Qd Round 4: 32bit: 0x077dddbd 0x95ae5918 0x4df93a9d 0x35067e2b 0xb3a80eeb 0x621f87bd Again: 0x077dddbd 0x95ae5918 0x4df93a9d 0x35067e2b 0xb3a80eeb 0x621f87bd Coins: THTHHTTTHHTTHHTTTHHHTHHHTHHHHHHTHTTTHHHHHTHHTHTTHTHHHTTHHTTTTHHTT 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 --> rolling dice used 33 random numbers Cards: 5h Qc 7c 9d 5s 4d 3d 4s Jd Qs Ad 6h 7s 6c 7d Qh 8c Ts 5d 6s Tc 2c 3c 8h 6d Qd 3h 4h 8s 9h Th 9c 2d Kc Kh As Js 3s 2s Jh 8d 4c 9s 5c Kd 2h Ah Ac 7h Ks Jc Td Round 5: 32bit: 0x4a27d143 0x68c5d423 0xa02ed010 0x8412cad2 0x2356d187 0x9079eac3 Again: 0x4a27d143 0x68c5d423 0xa02ed010 0x8412cad2 0x2356d187 0x9079eac3 Coins: HHTHHTTTHHHTTHHTHTHHTHTTHHTHHTHHHTHHTTTHTTHTHHTTHHTTHHHHTTTTHTHTH 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 --> rolling dice used 33 random numbers Cards: 5c 4d Tc Kh Qc 6h 9h 7d 7s Th 4s 5s 6s Ks 6c 3d 7h 7c 2d Ad 5h Kd 9c 8d 4h Qh 9s 2c 4c 5d 8h 6d Kc 3c Ts 3s As Qd Ah Jd Qs 2s 2h Jh Td Jc 8c Js 9d Ac 8s 3h pcg-cpp-0.98.1/test-high/expected/check-pcg32_k16384.out000066400000000000000000000053111250047755200223100ustar00rootroot00000000000000pcg32_k16384: - result: 32-bit unsigned int - period: 2^524352 (* 2^63 streams) - size: 65552 bytes Round 1: 32bit: 0xe7cee806 0x5f20781c 0xfe49a493 0x18715647 0x4624a50a 0x7d1c9694 Again: 0xe7cee806 0x5f20781c 0xfe49a493 0x18715647 0x4624a50a 0x7d1c9694 Coins: HHTTHTHHTHTTHHTTTTTTTTTTHHHTTTTTTHHHHHHHHHHHTTHTHHHHTTHHHHHHTHTTT 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 --> rolling dice used 33 random numbers Cards: 4h 3c Qd Qh 4d 6d 9d 5s Jd 3d 4c 6c 9h 7h 2d Kc 6s 7d 4s 3s Kh Ah Qc Ac 8s 7c As Tc 3h 5h 8d Ts 2s 9c Td Qs 9s Ad 8h 8c Th Js Kd Jh 6h 5c 2c 7s Ks 5d Jc 2h Round 2: 32bit: 0x572f5c46 0xcf87184a 0x61374621 0x9ee8ee68 0x04a606ce 0x2ecb1cdf Again: 0x572f5c46 0xcf87184a 0x61374621 0x9ee8ee68 0x04a606ce 0x2ecb1cdf Coins: THTHTHHTTTHTTHTTTHHHTTHTHHTHTTHHTTHHHHTHTTTHHHTTHHHHHHHHHTTTTHTHH 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 --> rolling dice used 33 random numbers Cards: 5d Th 2d Qs Qd 6s 6d Kh 2c Kd Ad 4s Ah 6c Td Ac 4h 9s 7s Tc 8c Jc Jh 9h 8d 7h 2h Ts 5c Kc Jd 3d 8s 3c 2s Qc 7c 7d Ks 6h 5h 8h 4c Js Qh 4d 3s 9d 9c As 5s 3h Round 3: 32bit: 0xc21b1b6b 0xe17a116c 0x21895137 0xc0a7923d 0x389c0b3b 0x4a16d90e Again: 0xc21b1b6b 0xe17a116c 0x21895137 0xc0a7923d 0x389c0b3b 0x4a16d90e Coins: THTTTHHTTHHTHTTTTHHHTTHHTTHTHTHTTTHHHTHHHHHTHHHHHTHHHHHHHTTTTHTTH 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 --> rolling dice used 33 random numbers Cards: 7s Qd Ah 4c 6d 4d Ac 8d Tc As 2c Jc Qs 6c 3c 9s 5h 4s Kh Kd 2d Jd 9d 9c Ks Jh Kc 8c Td 3s 2h Ts 5c 4h 7h 9h Th 7d Js 7c 3h 6s Qc 5s 8h 5d 8s 6h Ad 3d Qh 2s Round 4: 32bit: 0x72fea21a 0x0a08832b 0x4daa4481 0x15c072de 0x84278d28 0x426515f4 Again: 0x72fea21a 0x0a08832b 0x4daa4481 0x15c072de 0x84278d28 0x426515f4 Coins: HHHTTTHHTHHHHHHTTTTHHHHTTTHTTTTTTTTHHHHHHTTHTHHTTTTHTTHHHHHHHTTHH 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 --> rolling dice used 33 random numbers Cards: 2h 6s Tc As 2c Ts 2s 5s 6c 8d 8s 7h 3h Ad 7c 9c Kc 4c 3c 5d 3s Qd Ac 9d Qs Td 5c Th 2d Js 9s 8h 6h Qh Ks 4d Kd Jc 4s Jd Qc 6d 9h 7s 7d 8c 5h Kh 3d 4h Ah Jh Round 5: 32bit: 0x253cb0a3 0x8c048602 0xe2c21841 0x948f5ed1 0xe460f940 0x606e28a7 Again: 0x253cb0a3 0x8c048602 0xe2c21841 0x948f5ed1 0xe460f940 0x606e28a7 Coins: HHTTHHTTTHTHHTTHHHTTHHTHHHHHTHHTHTTTTTHTTHHHTHTHTHTHHTHTTHHHTTTHT 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 --> rolling dice used 33 random numbers Cards: 2h Kh 6h Jc 3d Kd 7h 6s 5h Jh Ks 8d 6d Ad 4c 2s 7c Ah Js 7d 7s 6c Td 3s 8h 5d 4h As 3c Ts Qc 9d 2c Kc Jd 9s 5s 2d 8s 4d 3h Tc Qs 8c 9c 4s 5c Qd Qh Th Ac 9h pcg-cpp-0.98.1/test-high/expected/check-pcg32_k16384_fast.out000066400000000000000000000052731250047755200233340ustar00rootroot00000000000000pcg32_k16384_fast: - result: 32-bit unsigned int - period: 2^524352 - size: 65544 bytes Round 1: 32bit: 0x3308e4a7 0x8e821ae6 0x0a95201f 0xbfc13f62 0x392ac135 0x9a9a3aab Again: 0x3308e4a7 0x8e821ae6 0x0a95201f 0xbfc13f62 0x392ac135 0x9a9a3aab Coins: HHHTHHTHTTTHHHHHTHHHTHTHTHTTTHTTTTHHHTHTHTHTHTTHTHHTTHHTHHTHHHHTH 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 --> rolling dice used 33 random numbers Cards: 7h 4c 8s 7s 4d 2h 8c Th As 9s Qh Qc 4h 9d 6d Ad 6c 3s Kh 9h Js 5c Tc Ks Ac 7c 3h 2d 5s Qd 3d 2c Qs 2s 6h 8h Jd 5h Kd Ts Kc Jh 4s 7d Ah 9c Td 8d 5d 6s Jc 3c Round 2: 32bit: 0xdadd159c 0xbc2b894c 0xd0fe7abb 0xd3c99cc7 0xeec433b7 0xeb7f9d46 Again: 0xdadd159c 0xbc2b894c 0xd0fe7abb 0xd3c99cc7 0xeec433b7 0xeb7f9d46 Coins: THTTHTTHTTTTTHTTHTHHTTHTTHHTHTTTTTHHTTTHHTHTHHHHHTHHTHTTHHHTHTHHH 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 --> rolling dice used 33 random numbers Cards: 2s 7s Qd Ah 4c Ad 8s 5d 5h 3s Ts Kc Js 5s 8c 9h 2d Kd 4h 9d Jh 3d 2c Tc Ac 3c 4s 5c 7h Qc Qh 6h As 8d 2h 6d 7c Kh 3h Jd Th 9s Jc 4d Qs Td 7d 9c 6s 8h 6c Ks Round 3: 32bit: 0x1f019ace 0x4286124a 0x3f6959fc 0x6882a83f 0xd2c77978 0x721f00b2 Again: 0x1f019ace 0x4286124a 0x3f6959fc 0x6882a83f 0xd2c77978 0x721f00b2 Coins: HTHTHHTHTHHHTTTTTHHTTTHTTTHTTTHHTTHTHHHHTTHHHTTHHTHTHTTTHTHTTTHTH 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 --> rolling dice used 33 random numbers Cards: 6s 4d 2d 7h 9c 4c 4h As Js 3d Ts 3s Jh 8h Qc Qd Ac 8s Jc Ks 3c 5c 5d Jd 7c 7s Ad 6c 6h Kd 9h Tc 2s 2h 5s 6d 7d 2c 8c Qh Kh 8d Td 5h Qs Th Ah 4s 9s 9d Kc 3h Round 4: 32bit: 0xd607142f 0x2a130ecc 0xe1cdd7c8 0xbd5fd344 0xf003d169 0x0e7823df Again: 0xd607142f 0x2a130ecc 0xe1cdd7c8 0xbd5fd344 0xf003d169 0x0e7823df Coins: HTTHHHHTTHTHTHHTHHHHHTTTTHTHHHTHHHTHHHTTHTTHTHHTTTTTHHHHHHHTHHTHH 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 --> rolling dice used 33 random numbers Cards: 8s 7c 7s Kh Ks 7h Tc 7d 9c Kc 3d 6c 4d 9d 5h 6s 3c 3s Ad Jd Qh Qd 4c Jh 6h Ah 8d 3h 5s 5c 4h Ts 4s 8c Td 2h Jc 2d 5d 2s 6d Th Ac 2c 9h 9s Qc Js Kd As Qs 8h Round 5: 32bit: 0x1511e2e9 0x51bde329 0x7a8b724b 0x60a82f6f 0x13bf7f80 0x97870401 Again: 0x1511e2e9 0x51bde329 0x7a8b724b 0x60a82f6f 0x13bf7f80 0x97870401 Coins: HTTTHHTTHHHTTHHTHTTTHTHHTTTHHTTHHHHHHTTTHHTHHHHHTHTHHTTHHTTHTHHTH 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 --> rolling dice used 33 random numbers Cards: 8s As 2c Ad 7s Ac Kh Qh 5d 8c Jd Qc 8d 6h 5s 2h 2d 7c 7h Qs Jh 6c Kd 3s Js 9d 4s 3c 8h 7d Qd Th 4c 3h 6s 9c Ah 5h 4d Kc Tc 9h Td 6d 3d 9s 4h 2s Ks Ts 5c Jc pcg-cpp-0.98.1/test-high/expected/check-pcg32_k2.out000066400000000000000000000053011250047755200217630ustar00rootroot00000000000000pcg32_k2: - result: 32-bit unsigned int - period: 2^2112 (* 2^63 streams) - size: 272 bytes Round 1: 32bit: 0xe85244a0 0x7112822f 0x9325f975 0xf50dea01 0x8cec9bba 0xaa9fa4b3 Again: 0xe85244a0 0x7112822f 0x9325f975 0xf50dea01 0x8cec9bba 0xaa9fa4b3 Coins: HHTTTHTHTTHHHHHHTHTHTHTTHHTHTHHHHTTTHHHTTHTHHHHTHTTHTTTTTTTTHTTTT 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 --> rolling dice used 33 random numbers Cards: Qs 2d 6s 8c 6d 4d 5d Ah Ks 3d 5s Qd 6h Td 5c 4h 2c 8h Ad 2s Js 7c 5h Qc Ac 7s 4s Jd Kc 9c 9s 2h Kh Ts Qh Jc 7h 8d Th Tc 3h As Jh 4c 8s 3c 9h 6c 3s 7d 9d Kd Round 2: 32bit: 0x98c55d02 0x0fd39f52 0x11b56e6c 0x54cbf14e 0x45bde3a6 0xa77ab20f Again: 0x98c55d02 0x0fd39f52 0x11b56e6c 0x54cbf14e 0x45bde3a6 0xa77ab20f Coins: THTHTHTHTTHHTHTHHTTTHTTHTTHTHTTHTTHTTTHHTHHTTTTHTHHTTTHHTTTTTTHHH 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 --> rolling dice used 33 random numbers Cards: 9s 6s 7c 4h 4d 8d 8h Jc 3h Qh 5s 9c 3s Tc 8s As Kh Kc 2c 2s Ac 8c 5c 4c 6c 2h Jh 5d 9d Qs 7d Qc Th Ks Ts 3c Js 7s 6h 7h Kd 5h Qd 9h 3d Td Ad Ah 2d 4s 6d Jd Round 3: 32bit: 0xf2fe5c00 0xacc7f4f5 0xeac130c7 0x7a2ce2be 0xd39bf181 0xce784be4 Again: 0xf2fe5c00 0xacc7f4f5 0xeac130c7 0x7a2ce2be 0xd39bf181 0xce784be4 Coins: THTTHTHTTHTTHHTHTHHHTHTTHTHTHHTHHTHTHHTTTHHHHTHTHTTHHTHTHTHHTTTTH 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 --> rolling dice used 33 random numbers Cards: 7c Jc 9s Ah 4h 3d 2d 5d 3s 7h Kh 6s 6h Ks 2c 9c 2s 8s Tc 7d 5h 3c 8h 4d Jh Td 4s 5s 2h Ac 9d 6c Js Ts Qd 8c 5c Ad 7s Kd Qc Jd Th 9h Qh 6d 8d Kc Qs 3h As 4c Round 4: 32bit: 0x1ef66795 0x83d37b1c 0xfc6d9564 0x9806e724 0xe10fbb53 0xdc1d6eab Again: 0x1ef66795 0x83d37b1c 0xfc6d9564 0x9806e724 0xe10fbb53 0xdc1d6eab Coins: TTTTHHHHHTTTTHHTHTTTHHTHTHTHHTHTTHTHTHTHHHHHTHHTHTHTTTHHTTTTHHHTT 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 --> rolling dice used 33 random numbers Cards: 2d 4s Qs 8h Jd 6d Jh 2s 7c 3s 5h Kd Js Td 3c 9s As Ts Ah Tc 8d 7h 5s 9h Th 7d 4c 8c Qc 5d 5c Qh Qd 8s Ac 6c 3d 2h 4h Kc Jc 9c 4d 6s Ks 7s Kh 9d Ad 6h 2c 3h Round 5: 32bit: 0x24b9177f 0x83dde908 0xd2719639 0x43d1afbf 0x35db4e5a 0x5d9f5718 Again: 0x24b9177f 0x83dde908 0xd2719639 0x43d1afbf 0x35db4e5a 0x5d9f5718 Coins: HHHHTHHHTTHTTTHHTTTTTTHTTHTHHHTTTHTHHHTTTTHTHTTTTTHTHHHHHHHHTTHTT 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 --> rolling dice used 33 random numbers Cards: 6c Th Kc Qd 7d 6s Ks 7h Tc 9c 5s 9h 8d 9d 7s 5d Kh Ad 6d Qc Td 9s Js 5h 6h Qh 2s Ts 2h Jd 3c Ac Qs 8s 5c 2c As 2d 7c 4d 3s 8c Kd 4c 4s Jc Ah Jh 3h 4h 8h 3d pcg-cpp-0.98.1/test-high/expected/check-pcg32_k2_fast.out000066400000000000000000000052631250047755200230070ustar00rootroot00000000000000pcg32_k2_fast: - result: 32-bit unsigned int - period: 2^2112 - size: 264 bytes Round 1: 32bit: 0x623d127c 0xfa4987c9 0x1a27eeee 0x603880d8 0xd94c8039 0x0f4aa323 Again: 0x623d127c 0xfa4987c9 0x1a27eeee 0x603880d8 0xd94c8039 0x0f4aa323 Coins: HTHTTTHHHHTHHHTTHHTHHTTTHTHHTHTHTTHHTTTTHTTHTHHHTTTHTTTTTTTHHHHHT 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 --> rolling dice used 33 random numbers Cards: 5d 3s 9c Jd 6c 8d 2s 8h Qd 9d Kd 3h 7d 4c 7s Jc Js Th 5s 2d Ad 9h Ts Ks Ah 8c 3d 9s Qh 3c 7c 5c 6h 2h As Kh Td 7h 4h Jh Qs Kc 2c 6d 8s Ac Tc 4s 5h 4d Qc 6s Round 2: 32bit: 0x8df2a75a 0x8d0158a9 0xafeb1142 0x79c26727 0x149f2c2c 0xfdb241eb Again: 0x8df2a75a 0x8d0158a9 0xafeb1142 0x79c26727 0x149f2c2c 0xfdb241eb Coins: HHHTTHTHTTTTHTHHHTTHTTHHTTTHHTTTTHHHHHTHTTHTTTTHHTHHTHHTHHTHHHHHT 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 --> rolling dice used 33 random numbers Cards: 6h Ts Qd 8c Ks 9d 2d Kc 4h Qc Td 5s 3d 8s 2s 6c Ah Kd Ac 5c Ad 3h 2c 5d Jc Qh 8d 3s As 2h 7h 7c 9s 5h 4d Kh 9c 6d 7s Th Qs Js 3c 9h 8h Jd Jh 7d Tc 4c 6s 4s Round 3: 32bit: 0x4d5299d6 0x7993beb4 0xa9878cdf 0xb23d608f 0x442110c0 0x701b5b8c Again: 0x4d5299d6 0x7993beb4 0xa9878cdf 0xb23d608f 0x442110c0 0x701b5b8c Coins: TTTHTTTHTHHTTHHTHTTTHHTTTHTTHTTHTTHTHTTHHHTTTHHTHHTHHHTHTHTTHTHTH 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 --> rolling dice used 33 random numbers Cards: Th Kc 3h Qc 3d 7s Ks 2h Qd 4d 6c Ts 3s Kh 9h Ac Ad 5d 2d 4s 7h Jc 5h 9d 9c 8h Js 7d Jd Kd 7c 3c Jh 5c 8d 9s 8c 8s Tc 6h 5s Td Qh Ah 4h 4c As 6d 2c Qs 2s 6s Round 4: 32bit: 0xb3686885 0xbfa94438 0x47b29921 0x2787b39e 0x685c3666 0x844a798f Again: 0xb3686885 0xbfa94438 0x47b29921 0x2787b39e 0x685c3666 0x844a798f Coins: THHHTTHTHHHHHTTHTHTTTTHHTHTHTHTTHTHHHHHTTHHHHTHTHHTTHHTHTTHHHTHTH 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 --> rolling dice used 33 random numbers Cards: 9h 2s Tc As Th 7d Jh 3h Td 7h 9s 4c 5s 5h 6h Jd Ts 2d Qd Ad Js Ks 8c 9c 3s 9d 8d 7s 4s Qc 6c 3c Jc 5d Ac 2h 7c Qs 8h Kd 8s 4h Kc 6s Kh Ah 2c 4d 6d Qh 3d 5c Round 5: 32bit: 0xcf9ef109 0xcdc3a236 0xa3107d4a 0x8481cc76 0x14cb0dc0 0xbeb351d3 Again: 0xcf9ef109 0xcdc3a236 0xa3107d4a 0x8481cc76 0x14cb0dc0 0xbeb351d3 Coins: TTTTTTTTHTHHTTHTHTHTTTHHTHTHTTHHTHHTHHHHHTTHTTTHTTTHHTTTTTTTHTHHT 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 --> rolling dice used 33 random numbers Cards: 8s 6s 3d 2c 9c 4h 5d 9s 7s 8c Ah 8d Td 5c Js 8h Qd 9h 2s Jc 6h As Qh 4s Qc Kh Ts Qs Th 5s Ad Tc 9d 3s 4d 7h Kc 3c 7c 2d Ac 6c 4c Ks 3h 6d Kd Jh 2h 5h 7d Jd pcg-cpp-0.98.1/test-high/expected/check-pcg32_k64.out000066400000000000000000000053021250047755200220540ustar00rootroot00000000000000pcg32_k64: - result: 32-bit unsigned int - period: 2^2112 (* 2^63 streams) - size: 272 bytes Round 1: 32bit: 0xe85244a0 0x7112822f 0x9325f975 0xf50dea01 0x8cec9bba 0xaa9fa4b3 Again: 0xe85244a0 0x7112822f 0x9325f975 0xf50dea01 0x8cec9bba 0xaa9fa4b3 Coins: HHTTTHTHTTHHHHHHTHTHTHTTHHTHTHHHHTTTHHHTTHTHHHHTHTTHTTTTTTTTHTTTT 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 --> rolling dice used 33 random numbers Cards: Qs 2d 6s 8c 6d 4d 5d Ah Ks 3d 5s Qd 6h Td 5c 4h 2c 8h Ad 2s Js 7c 5h Qc Ac 7s 4s Jd Kc 9c 9s 2h Kh Ts Qh Jc 7h 8d Th Tc 3h As Jh 4c 8s 3c 9h 6c 3s 7d 9d Kd Round 2: 32bit: 0x98c55d02 0x0fd39f52 0x11b56e6c 0x54cbf14e 0x45bde3a6 0xa77ab20f Again: 0x98c55d02 0x0fd39f52 0x11b56e6c 0x54cbf14e 0x45bde3a6 0xa77ab20f Coins: THTHTHTHTTHHTHTHHTTTHTTHTTHTHTTHTTHTTTHHTHHTTTTHTHHTTTHHTTTTTTHHH 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 --> rolling dice used 33 random numbers Cards: 9s 6s 7c 4h 4d 8d 8h Jc 3h Qh 5s 9c 3s Tc 8s As Kh Kc 2c 2s Ac 8c 5c 4c 6c 2h Jh 5d 9d Qs 7d Qc Th Ks Ts 3c Js 7s 6h 7h Kd 5h Qd 9h 3d Td Ad Ah 2d 4s 6d Jd Round 3: 32bit: 0xf2fe5c00 0xacc7f4f5 0xeac130c7 0x7a2ce2be 0xd39bf181 0xce784be4 Again: 0xf2fe5c00 0xacc7f4f5 0xeac130c7 0x7a2ce2be 0xd39bf181 0xce784be4 Coins: THTTHTHTTHTTHHTHTHHHTHTTHTHTHHTHHTHTHHTTTHHHHTHTHTTHHTHTHTHHTTTTH 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 --> rolling dice used 33 random numbers Cards: 7c Jc 9s Ah 4h 3d 2d 5d 3s 7h Kh 6s 6h Ks 2c 9c 2s 8s Tc 7d 5h 3c 8h 4d Jh Td 4s 5s 2h Ac 9d 6c Js Ts Qd 8c 5c Ad 7s Kd Qc Jd Th 9h Qh 6d 8d Kc Qs 3h As 4c Round 4: 32bit: 0x1ef66795 0x83d37b1c 0xfc6d9564 0x9806e724 0xe10fbb53 0xdc1d6eab Again: 0x1ef66795 0x83d37b1c 0xfc6d9564 0x9806e724 0xe10fbb53 0xdc1d6eab Coins: TTTTHHHHHTTTTHHTHTTTHHTHTHTHHTHTTHTHTHTHHHHHTHHTHTHTTTHHTTTTHHHTT 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 --> rolling dice used 33 random numbers Cards: 2d 4s Qs 8h Jd 6d Jh 2s 7c 3s 5h Kd Js Td 3c 9s As Ts Ah Tc 8d 7h 5s 9h Th 7d 4c 8c Qc 5d 5c Qh Qd 8s Ac 6c 3d 2h 4h Kc Jc 9c 4d 6s Ks 7s Kh 9d Ad 6h 2c 3h Round 5: 32bit: 0x24b9177f 0x83dde908 0xd2719639 0x43d1afbf 0x35db4e5a 0x5d9f5718 Again: 0x24b9177f 0x83dde908 0xd2719639 0x43d1afbf 0x35db4e5a 0x5d9f5718 Coins: HHHHTHHHTTHTTTHHTTTTTTHTTHTHHHTTTHTHHHTTTTHTHTTTTTHTHHHHHHHHTTHTT 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 --> rolling dice used 33 random numbers Cards: 6c Th Kc Qd 7d 6s Ks 7h Tc 9c 5s 9h 8d 9d 7s 5d Kh Ad 6d Qc Td 9s Js 5h 6h Qh 2s Ts 2h Jd 3c Ac Qs 8s 5c 2c As 2d 7c 4d 3s 8c Kd 4c 4s Jc Ah Jh 3h 4h 8h 3d pcg-cpp-0.98.1/test-high/expected/check-pcg32_k64_fast.out000066400000000000000000000052641250047755200231000ustar00rootroot00000000000000pcg32_k64_fast: - result: 32-bit unsigned int - period: 2^2112 - size: 264 bytes Round 1: 32bit: 0x623d127c 0xfa4987c9 0x1a27eeee 0x603880d8 0xd94c8039 0x0f4aa323 Again: 0x623d127c 0xfa4987c9 0x1a27eeee 0x603880d8 0xd94c8039 0x0f4aa323 Coins: HTHTTTHHHHTHHHTTHHTHHTTTHTHHTHTHTTHHTTTTHTTHTHHHTTTHTTTTTTTHHHHHT 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 --> rolling dice used 33 random numbers Cards: 5d 3s 9c Jd 6c 8d 2s 8h Qd 9d Kd 3h 7d 4c 7s Jc Js Th 5s 2d Ad 9h Ts Ks Ah 8c 3d 9s Qh 3c 7c 5c 6h 2h As Kh Td 7h 4h Jh Qs Kc 2c 6d 8s Ac Tc 4s 5h 4d Qc 6s Round 2: 32bit: 0x8df2a75a 0x8d0158a9 0xafeb1142 0x79c26727 0x149f2c2c 0xfdb241eb Again: 0x8df2a75a 0x8d0158a9 0xafeb1142 0x79c26727 0x149f2c2c 0xfdb241eb Coins: HHHTTHTHTTTTHTHHHTTHTTHHTTTHHTTTTHHHHHTHTTHTTTTHHTHHTHHTHHTHHHHHT 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 --> rolling dice used 33 random numbers Cards: 6h Ts Qd 8c Ks 9d 2d Kc 4h Qc Td 5s 3d 8s 2s 6c Ah Kd Ac 5c Ad 3h 2c 5d Jc Qh 8d 3s As 2h 7h 7c 9s 5h 4d Kh 9c 6d 7s Th Qs Js 3c 9h 8h Jd Jh 7d Tc 4c 6s 4s Round 3: 32bit: 0x4d5299d6 0x7993beb4 0xa9878cdf 0xb23d608f 0x442110c0 0x701b5b8c Again: 0x4d5299d6 0x7993beb4 0xa9878cdf 0xb23d608f 0x442110c0 0x701b5b8c Coins: TTTHTTTHTHHTTHHTHTTTHHTTTHTTHTTHTTHTHTTHHHTTTHHTHHTHHHTHTHTTHTHTH 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 --> rolling dice used 33 random numbers Cards: Th Kc 3h Qc 3d 7s Ks 2h Qd 4d 6c Ts 3s Kh 9h Ac Ad 5d 2d 4s 7h Jc 5h 9d 9c 8h Js 7d Jd Kd 7c 3c Jh 5c 8d 9s 8c 8s Tc 6h 5s Td Qh Ah 4h 4c As 6d 2c Qs 2s 6s Round 4: 32bit: 0xb3686885 0xbfa94438 0x47b29921 0x2787b39e 0x685c3666 0x844a798f Again: 0xb3686885 0xbfa94438 0x47b29921 0x2787b39e 0x685c3666 0x844a798f Coins: THHHTTHTHHHHHTTHTHTTTTHHTHTHTHTTHTHHHHHTTHHHHTHTHHTTHHTHTTHHHTHTH 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 --> rolling dice used 33 random numbers Cards: 9h 2s Tc As Th 7d Jh 3h Td 7h 9s 4c 5s 5h 6h Jd Ts 2d Qd Ad Js Ks 8c 9c 3s 9d 8d 7s 4s Qc 6c 3c Jc 5d Ac 2h 7c Qs 8h Kd 8s 4h Kc 6s Kh Ah 2c 4d 6d Qh 3d 5c Round 5: 32bit: 0xcf9ef109 0xcdc3a236 0xa3107d4a 0x8481cc76 0x14cb0dc0 0xbeb351d3 Again: 0xcf9ef109 0xcdc3a236 0xa3107d4a 0x8481cc76 0x14cb0dc0 0xbeb351d3 Coins: TTTTTTTTHTHHTTHTHTHTTTHHTHTHTTHHTHHTHHHHHTTHTTTHTTTHHTTTTTTTHTHHT 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 --> rolling dice used 33 random numbers Cards: 8s 6s 3d 2c 9c 4h 5d 9s 7s 8c Ah 8d Td 5c Js 8h Qd 9h 2s Jc 6h As Qh 4s Qc Kh Ts Qs Th 5s Ad Tc 9d 3s 4d 7h Kc 3c 7c 2d Ac 6c 4c Ks 3h 6d Kd Jh 2h 5h 7d Jd pcg-cpp-0.98.1/test-high/expected/check-pcg32_k64_oneseq.out000066400000000000000000000052661250047755200234370ustar00rootroot00000000000000pcg32_k64_oneseq: - result: 32-bit unsigned int - period: 2^2110 - size: 264 bytes Round 1: 32bit: 0x8bfad379 0x21d323ad 0xd58574f9 0x282d3aa0 0x33b49afc 0x5821fdb2 Again: 0x8bfad379 0x21d323ad 0xd58574f9 0x282d3aa0 0x33b49afc 0x5821fdb2 Coins: TTHHTTHHTTTHTTTHTTHHTHHHHTTTTTTTHTHTHTHTHTTHHTHHTTHHTTHHHTTHHHTTH 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 --> rolling dice used 33 random numbers Cards: 8s 5s 2d Qh Ad Kd 4c 3c 4d Ac Jd Js Kh 2h Qc Th Kc 6h 5d 3h Ah Td 7h 8c 9s 7s 9h Ks 4s 3d 2s 7c 7d 3s 5c 2c 6s 8d Jc 6d 9d Ts 5h Tc 6c Jh Qd 9c 4h 8h As Qs Round 2: 32bit: 0x97d54bf1 0xb85353db 0xc986820d 0x44c61d24 0x8263654e 0xcafc64df Again: 0x97d54bf1 0xb85353db 0xc986820d 0x44c61d24 0x8263654e 0xcafc64df Coins: TTHHHHHTTHTHHHHTTTHHHTHTTHTHTTHTHHTTHTHHTHHHTHTHHTTHTHTHHTHTTHHTH 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 --> rolling dice used 33 random numbers Cards: Kc 9c Td 7d 4h 8s 8d 2h Ad Qh 4c 3s 6s Jh 8h Qs 7c 7h Th 9d 3c Js 2s 4d Kd 2c Tc As 4s 5d Ah 9s 5h 7s 9h Jd Ac 3h 2d Jc Ks Kh Qc Ts 3d 5c 6c 6d 5s 8c 6h Qd Round 3: 32bit: 0x2c1b99e5 0xf187ff1f 0xd1079e86 0x74c45a92 0x4d0b42be 0x652cd137 Again: 0x2c1b99e5 0xf187ff1f 0xd1079e86 0x74c45a92 0x4d0b42be 0x652cd137 Coins: HTHHTHTHTHTHTHHTTHHHHHHHTHHHHTHHTTHHTTTTHTTTHHTHTTHTTTTHHHHTHTHHH 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 --> rolling dice used 33 random numbers Cards: 8s 8h 7s As Ac Qh 5h 3d Jd Ks 5s 4c Qc Td 4s 4h 3h Kd 2d 9d Tc 9c 8c 2s 6c Kc 7d 4d 9s Qs 6d 2h 8d 7h Ts Jh 7c 3c 5c Ad Ah 9h 6s Kh Qd Th Js Jc 5d 3s 2c 6h Round 4: 32bit: 0x0166955b 0x98c26e63 0xa2eb39be 0x8e7a0f18 0xa1ee6dc4 0xa28d8093 Again: 0x0166955b 0x98c26e63 0xa2eb39be 0x8e7a0f18 0xa1ee6dc4 0xa28d8093 Coins: TTHHTTTTHHHHHHTHTHTTTTHTHTHTTTTHHHTTTTHTTHHTHHHTTTHHTTHTTHHHHHHHH 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 --> rolling dice used 33 random numbers Cards: 8h Qc 7c 2d 2s 2c 8c 4d 7h Js 9c Td 5h 4c 7d 6c Ad Qh Kh 2h 8d Th 9d 6h 3s 6s 5c 5s 4s 3d Jc 3h 3c Jd 9h 9s Kc Kd Ks 4h Ah 8s Ts Tc Qs 6d Ac 5d Jh As 7s Qd Round 5: 32bit: 0xc0f40efc 0x77437fab 0x80c937c8 0xc6ae4e8b 0xa9809bbb 0xe6523fd7 Again: 0xc0f40efc 0x77437fab 0x80c937c8 0xc6ae4e8b 0xa9809bbb 0xe6523fd7 Coins: HHHTTTHHTTTHHHHTTTTTHTTHTHHTHHHHHHTTTHTHTHHTTHTTHTTHHHHTTHHHTHHTH 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 --> rolling dice used 33 random numbers Cards: 4d 9c 9s 8s Jc 7d 3c Ac 3d 5h 5c Js 2c Qs Th 4s 7h 2s 8c 4h Qd Tc Ah 9h 3h Qh Jh 6s Jd 3s 8h Ts Kh Kd 4c 7s 2h 6c Qc 6d 8d Kc Ks Td Ad As 5s 7c 6h 9d 5d 2d pcg-cpp-0.98.1/test-high/expected/check-pcg32_once_insecure.out000066400000000000000000000053101250047755200242700ustar00rootroot00000000000000pcg32_once_insecure: - result: 32-bit unsigned int - period: 2^32 (* 2^31 streams) - size: 8 bytes Round 1: 32bit: 0xf84b622d 0xdc1e5bb4 0x74fb8ac1 0xb3bbf8de 0x9cf62074 0x2d2f5e33 Again: 0xf84b622d 0xdc1e5bb4 0x74fb8ac1 0xb3bbf8de 0x9cf62074 0x2d2f5e33 Coins: HTHHHHTTTTTHHHHHTTTTTHHTTTHTTHTHTTHTTTTTHTTTHHTHTTHTTHTTTTHTTHHHT 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 --> rolling dice used 33 random numbers Cards: Kd 8h Td 9d As 4h 7s 5s 2s Js Qd 5h Ac 3d 8d 2d 3h 8s 7h Th 4d 9s Qc 3s Kc 6d 7c 9h 4c 8c Kh Jh Jc 4s 3c Ah Tc 6s 9c 7d 5c Ks 6c Qs Ad 6h Ts Jd 2h 2c 5d Qh Round 2: 32bit: 0xd6fdef4c 0xb793e894 0x62d8db75 0x51c7462c 0x9bbee1c9 0x9c609fb5 Again: 0xd6fdef4c 0xb793e894 0x62d8db75 0x51c7462c 0x9bbee1c9 0x9c609fb5 Coins: TTTHTHTTTHTTHTTHHTTTHHTHTHTHTTTTHTTHHTHTHHHHHTHHHHTHHTTTHHHTHHHTT 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 --> rolling dice used 33 random numbers Cards: 6c Qd 9s 3d 7c 7h Ts 2c 3h Kd 2s Td 6h 8d Jh 2d 2h Ah 5h Th 5c 9c 8s Kh As Kc 5s 6d Js Jd 4h 7d 5d Tc 8c Jc 6s 4s 9d 3c 4c Ac Qh Qs 7s 4d 9h Ad Ks 8h 3s Qc Round 3: 32bit: 0x7e849685 0x0a1a7a41 0xcf53a482 0xcbc007c5 0x60e65898 0x9179fbd7 Again: 0x7e849685 0x0a1a7a41 0xcf53a482 0xcbc007c5 0x60e65898 0x9179fbd7 Coins: THHHHHHTTHHTHHTHHTHHTTHTHTTHHHTTHHHHHTHTHTHTTHTHTTHTHTHHTHTTHTTTH 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 --> rolling dice used 33 random numbers Cards: Jd 8d 6c Jc 2s 9h 4d Kd 5d Qc Ts 8c 5s 3h 5h Ks 6d 4s 7c 5c Kc Js 6s Kh Qs 7d 2c Ah 9d 3c 4c 4h 7h 9c 3s 3d As Tc Ac Ad 8s 8h Th Jh 2d 6h Qd Qh 9s 7s 2h Td Round 4: 32bit: 0xcc53664c 0xe23c4863 0xa79bb6df 0x96f9b755 0x13a38786 0x34a8f727 Again: 0xcc53664c 0xe23c4863 0xa79bb6df 0x96f9b755 0x13a38786 0x34a8f727 Coins: TTTTHTHHTHHTTTHTHTHHHHTHHTTHHHHHHHTHTHHHTHTTTHTTHHHHHTHTTTHHHTHTT 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 --> rolling dice used 33 random numbers Cards: Ad 9h 9d 5c 5d 5s 2s Ac Qs 4c 8s 6d Qh Kd 9c Ts 3d 4d Td 6h 4s 2h Jd 8h 7h Qd Ks Tc 7c 6s 8d As Kh Th Jh 3c 9s Kc Jc 3s 2c 8c 2d Js 4h Ah 3h 5h 7d Qc 7s 6c Round 5: 32bit: 0x34c5b8b1 0x818c3828 0x23842fe4 0xd64649b8 0x5d1b76c9 0x18819107 Again: 0x34c5b8b1 0x818c3828 0x23842fe4 0xd64649b8 0x5d1b76c9 0x18819107 Coins: TTHHTHTTTHTHTTTTTHHTHTHTTTHHTTHTHTHHHHTTTHTTTTTTHHHTHTTTTHHTHTTTT 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 --> rolling dice used 33 random numbers Cards: 3h 5h 7s 4h 3c 8h 2h Qc 8c 4d 6s 5d Jh Ad 6c 4c 7h Js 7d 6d 8s 9d 2d Qs 3s Ts 2c 2s Ac 8d Th Kd 5s Kc 9c 7c 3d Td Jc As Tc Ks Qh Qd 6h 9h 4s Jd 5c Ah 9s Kh pcg-cpp-0.98.1/test-high/expected/check-pcg32_oneseq.out000066400000000000000000000052561250047755200227520ustar00rootroot00000000000000pcg32_oneseq: - result: 32-bit unsigned int - period: 2^64 - size: 8 bytes Round 1: 32bit: 0xc2f57bd6 0x6b07c4a9 0x72b7b29b 0x44215383 0xf5af5ead 0x68beb632 Again: 0xc2f57bd6 0x6b07c4a9 0x72b7b29b 0x44215383 0xf5af5ead 0x68beb632 Coins: THTHHHTTHHTTHTTHTHHHTHTTTHTTHTTHTTTHHTTTTTHHTTTHTTHTHHTHHHTTHTTTH 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 --> rolling dice used 33 random numbers Cards: 2d 5c 3h 6d Js 9c 4h Ts Qs 5d Ks 5h Ad Ac Qh Th Jd Kc Tc 7s Ah Kd 7h 3c 4d 8s 2c 3d Kh 8h Jc 6h 4c 8d Qc 7c Td 2s 3s 4s 7d Qd Jh As 6c 8c 5s 2h 6s 9d 9s 9h Round 2: 32bit: 0x0573afcc 0x2cab16db 0x6af6f55a 0xe916bec2 0x1ca9b4a4 0xbb2778eb Again: 0x0573afcc 0x2cab16db 0x6af6f55a 0xe916bec2 0x1ca9b4a4 0xbb2778eb Coins: THHHTHTTTHHHTTTTTTHTTHTHTHHHTHHHTHTHTTHTTTTTHTHHTHHTTHHHHHTTTHTTH 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 --> rolling dice used 33 random numbers Cards: 9c Ad 5d 7d Ah 8c Th Kd 5c Js 7c Kc Kh 6c Ks Tc Td 3d 7h 2d 5s 9s 3h As 9d 8h 4s 6h Ts 2c Jh 3c 8s 4h 5h 6s Jd 8d 3s 6d 7s 4d Ac Qc 4c 2h Qh 9h Qd 2s Qs Jc Round 3: 32bit: 0x114306f3 0xb9bf0d91 0x1aed8e5e 0x587de8b7 0x7477c8bd 0xd853ec9d Again: 0x114306f3 0xb9bf0d91 0x1aed8e5e 0x587de8b7 0x7477c8bd 0xd853ec9d Coins: HTHHTHHHHTHTHTTHTHTHHTHTTHHHTTTTHHTTTTTTHTHTTTHTHTTTHTHHHHTTTTTTT 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 --> rolling dice used 33 random numbers Cards: Ah 8d Ad Jd 2d 3h Jh 7c Kc Ks 3d As 4s 3s 8h Qc 7d Td 6c 8c 4d 5c 9d Qh Js Ac Kd 5s 6d Ts 9h 9s 9c 2c 5h 3c 5d Th 4c 6s 7s Qd 7h 2h Tc 6h 4h 8s Qs Jc Kh 2s Round 4: 32bit: 0xb982cd46 0x01cc6f94 0x0ad658ae 0xf6c6c97e 0xd1b772dd 0x0098599e Again: 0xb982cd46 0x01cc6f94 0x0ad658ae 0xf6c6c97e 0xd1b772dd 0x0098599e Coins: HTTHTTHHHHTHTHHHTTHTHTHTTTHTHTHHTHTHTTTTHHTTHHHTHTTHHTTTHHHTTHHHH 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 --> rolling dice used 33 random numbers Cards: 6s Td 3h Js 7h Jh Ac Kh Th 4h 3c 6d Qs Ah 8h Kc Tc 2h 8c 2c Jd 2s Qh 4d 3d Ks 7s 9d 5d 2d 5s 5h Jc 3s 9s Qd Qc 7d 6h As 8s 4s 4c 8d 9c 6c 5c Ad 7c 9h Kd Ts Round 5: 32bit: 0xef3c7322 0xa1ff2188 0x3f564b42 0x91c90425 0x17711b95 0xf43aa1f7 Again: 0xef3c7322 0xa1ff2188 0x3f564b42 0x91c90425 0x17711b95 0xf43aa1f7 Coins: HTTHHHTTHTTTHTHHTHTHTHHTHHTTTHTTHTHHTHTTTTTHTHTTHHHHTHTHTHHTHHTHT 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 --> rolling dice used 33 random numbers Cards: 6c 8d 4d Jc 9d As 9s 3c 9c Th Ks Qs 4c Js Ah Qc Ac Kd Td Qd Kh Kc Tc Jd 6s 5h 8c 8s Ad 5s 4s Ts 3h 3s 7h 7d 8h 2c 2d 5c 6h 2h 3d 7c 9h 7s 4h 2s Jh 6d Qh 5d pcg-cpp-0.98.1/test-high/expected/check-pcg32_oneseq_once_insecure.out000066400000000000000000000052741250047755200256530ustar00rootroot00000000000000pcg32_oneseq_once_insecure: - result: 32-bit unsigned int - period: 2^32 - size: 4 bytes Round 1: 32bit: 0x256b5357 0xa5efad32 0x170b7830 0x334a5b22 0x3de5c680 0x9b47b7b3 Again: 0x256b5357 0xa5efad32 0x170b7830 0x334a5b22 0x3de5c680 0x9b47b7b3 Coins: HTHTHTHHHTTHTTTTTTHHTTTHHTTTHHTTHHTHTTHHTHHTTTTTHTTTHHHHHHHHTTTTT 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 --> rolling dice used 33 random numbers Cards: 3c 5c Kc 6s Qh 7s Jh 4d 3s 5d 9h Th Qs 7h 4c 7c Qd 2d 3h 5h 2h 6c 6d Js Jd 9d 8s 9s 9c Qc Kh 8d 8c 2s Tc 4s Ac 2c Jc Ks As Ah 6h Ad Ts 7d 3d 8h 5s Kd 4h Td Round 2: 32bit: 0xd3ea68f3 0x004a141a 0x08de95da 0xe6f4f6ad 0x1023b258 0x0fdabaa1 Again: 0xd3ea68f3 0x004a141a 0x08de95da 0xe6f4f6ad 0x1023b258 0x0fdabaa1 Coins: HTHHTTHHHTTHTTTHTTTHHTHHHHHHHHTHTTHHHHTTTHTTHHHHTTTHHTTHHTTTHHTTH 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 --> rolling dice used 33 random numbers Cards: 6c Kc 5d Ac Tc 3c 7h Qh 7c 2c Kd 8c 2h Qs Qc 2s 6s Ts Jc 4h Ah 5c Qd 8d 4d Th 3d 7s 5s Jd 4c 9h 8h 6d 9c 9s 3s Td Js Kh 9d As 6h 3h 2d Ks 4s 7d Jh Ad 5h 8s Round 3: 32bit: 0x6a106195 0xe06d41b2 0xbfd78624 0xe0ef944f 0x57571028 0x10aae72d Again: 0x6a106195 0xe06d41b2 0xbfd78624 0xe0ef944f 0x57571028 0x10aae72d Coins: HHTTHHTHTTTHHTHTHTHHHTTHHHTTHTTHTTHTTHTTHHTTTHHHTHTHTHHHHTHHTHTHH 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 --> rolling dice used 33 random numbers Cards: 4d Jc 6d 2s 8c 7d Th 6h 5s 3c 3d Qd Ad 4h 2c 7s Tc 4s 3s Td 6s 9c 2d 7c 8d 8h Jh Ts 4c 2h 5c 5h Ac 8s Qs Kh Kc 6c Qc 9h 9s 5d Kd Js Qh 3h 7h Ah As Jd 9d Ks Round 4: 32bit: 0xdde49a52 0x79306ca7 0x2bb1673c 0xfde1d6ff 0x0b261fe8 0xe866fced Again: 0xdde49a52 0x79306ca7 0x2bb1673c 0xfde1d6ff 0x0b261fe8 0xe866fced Coins: HHHHTTTTTTTTHTHTHHTTTHHTHTHHHHHTTTTTTTHTTHTTHTTHHHHHHTHTHTHTHHTTT 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 --> rolling dice used 33 random numbers Cards: Td 7d 3h 2c 5s 6d Ac 8s Kc 5c 4s Qd 2s Kd As 6c 2d Kh 9c 3d 5d 3s Jd 8c 7s 4d 4h Qc 5h Js 7c 9s Ts Qh Ks 6s Th 8d 3c Tc 8h 9h Ad Jh Jc 9d 7h 2h Ah 6h 4c Qs Round 5: 32bit: 0x4253371d 0xcc6b3679 0xb8d7cd7d 0x9e7e0310 0xb1ee5e37 0x6cbff1d2 Again: 0x4253371d 0xcc6b3679 0xb8d7cd7d 0x9e7e0310 0xb1ee5e37 0x6cbff1d2 Coins: HHHTHHHTTHTTHTHHTHHTTHTTTHHTHHTTHHHTHHTTHTHHTTTTHTTHHHTTHHTHTTHTH 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 --> rolling dice used 33 random numbers Cards: Kh 4d 8d 5h 4c 8s 3s Qc Js Td Jc 6c 5d 8h 9s 3h Kc Ac Tc 8c 6s 7h Jd 7c Ad Qd Jh 9d As 2c 6d 4h Kd 4s Qs 7s Qh 9h 3d 6h Ts Ks 7d 5c 5s 9c 3c 2s 2h 2d Th Ah pcg-cpp-0.98.1/test-high/expected/check-pcg64.out000066400000000000000000000062611250047755200214020ustar00rootroot00000000000000pcg64: - result: 64-bit unsigned int - period: 2^128 (* 2^127 streams) - size: 32 bytes Round 1: 64bit: 0x86b1da1d72062b68 0x1304aa46c9853d39 0xa3670e9e0dd50358 0xf9090e529a7dae00 0xc85b9fd837996f2c 0x606121f8e3919196 Again: 0x86b1da1d72062b68 0x1304aa46c9853d39 0xa3670e9e0dd50358 0xf9090e529a7dae00 0xc85b9fd837996f2c 0x606121f8e3919196 Coins: TTTHHHTTTHHHTTTTHHTTHHTHTHTTHHTHTTTTHHTTTHTHHTHTTTTHHTTTHHHTTTHTT 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 --> rolling dice used 33 random numbers Cards: 3d 7d 3h Qd 9d 8c Ts Ad 9s 6c Jh Ac 5s 4c 2c 7s Kh Kd 7h Qh 6d Qc 8d Qs 6s Js 4d Kc 9h 3c 2h Td 5d 5h 9c 4s 5c 7c 3s 4h As Th 6h Jc 2s Jd Tc Ah 2d Ks 8h 8s Round 2: 64bit: 0x1773ba241e7a792a 0xe41aed7117b0bc10 0x36bac8d9432af525 0xe0c78e2f3c850a38 0xe3ad939c1c7ce70d 0xa302fdced8c79e93 Again: 0x1773ba241e7a792a 0xe41aed7117b0bc10 0x36bac8d9432af525 0xe0c78e2f3c850a38 0xe3ad939c1c7ce70d 0xa302fdced8c79e93 Coins: TTTTHTHTHHTHTHTTTTTHHTTHHHHTHTHHHHHHHTHHHTHHTHTTTHHHHTTHHTTTHTHTH 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 --> rolling dice used 33 random numbers Cards: As 2h 4d 7d Ad Qc 9s 7h Kh Jc 7c 3d 8c Th 9c Qd 9h Td 6d 8d Qs 5c 6s 8s Ac Kd 2d 3h Qh Tc Jh Ah 3s 4h 9d 8h Jd 4s 2s Ts 5s Kc 4c 5d 3c 6h 2c 6c 7s Js 5h Ks Round 3: 64bit: 0xc96006593aed3b62 0xf04d5afa3f197bf1 0xce6f729cc913a50f 0x98b5fc4fbb1e4aea 0x802dce1b410fc8c3 0xe3bac0a14f6e5033 Again: 0xc96006593aed3b62 0xf04d5afa3f197bf1 0xce6f729cc913a50f 0x98b5fc4fbb1e4aea 0x802dce1b410fc8c3 0xe3bac0a14f6e5033 Coins: HTTHTHTTTTTHTTTHHTHTHHTHHHHHHHHHTTTHTHTHTHHTTTTTTHHHHTHTTTTHHHHHH 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 --> rolling dice used 33 random numbers Cards: 5c 5d 9d 4s Qs Kh 2c 3h Ac 2s 7s 4c 6s 8h 9c 6d 2h 4d 3c 5h 6h Ad 7c Js Jd 6c 2d 3d 4h Kd 9s Th Kc 7h 8s Tc Qc Qd Jh Ks 8d Ts Ah Jc 5s As Qh 8c 3s Td 7d 9h Round 4: 64bit: 0x68da679de81de48a 0x7ee3c031fa0aa440 0x6eb1663983530403 0xfec4d7a9a7aec823 0xbce221c255ee9467 0x460a42a962b8a2f9 Again: 0x68da679de81de48a 0x7ee3c031fa0aa440 0x6eb1663983530403 0xfec4d7a9a7aec823 0xbce221c255ee9467 0x460a42a962b8a2f9 Coins: HHHTTTTHHHHHTTTTTTTHHHTHHHHTTHTTTHTTTTHTHHHHTHHTTTHHHTHHTTHHHTHTH 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 --> rolling dice used 33 random numbers Cards: 7c Kh 2d Qc Jh Js Kc Ks Kd 3d 8d 4s Jc 8c 9d 5c 9c Qh As Qd 3s Ac 3h 3c Ad 9h 6h Th Jd 5s 6s 7h 7d 7s 2c 2h 2s 6d 8h 4d Ts Tc 4h 5h 4c Ah 9s Td 8s 5d 6c Qs Round 5: 64bit: 0x9e0d084cff42fe2f 0x63cd8347aae338ea 0x112aae00540d3fa1 0x53968bc829afd6ec 0x1b9900eb6c5b6d90 0xe89ed17ea33cb420 Again: 0x9e0d084cff42fe2f 0x63cd8347aae338ea 0x112aae00540d3fa1 0x53968bc829afd6ec 0x1b9900eb6c5b6d90 0xe89ed17ea33cb420 Coins: HTTTTTHTHTHHHTHTTTHTHHTHHTHTTTHHTTHHHTTTTHTTHHTHHTHHHTTHHTHTHHHHH 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 --> rolling dice used 33 random numbers Cards: Jd Qh 8s 9h Kh 3c Ts Th Kc Kd 4s Ah 5h 4d Jc 7d 9c Ac 8c Ks 6s 2d Td Qc 2s 8h Tc 6c 3d 3h 4h 6h 7s Qs As 5d 3s 5c 6d 4c Js 5s 8d 9d 2c 9s 7h Qd Jh Ad 2h 7c pcg-cpp-0.98.1/test-high/expected/check-pcg64_c1024.out000066400000000000000000000045511250047755200222130ustar00rootroot00000000000000pcg64_c1024: - result: 64-bit unsigned int - period: 2^65664 (* 2^127 streams) - size: 8224 bytes Round 1: 64bit: 0x200999d12bfbb05b 0x304c583ef1f0d4ec 0x58e7941ada40a827 0x43491a838632e10a 0x95c900affaf14524 0x7d8b6a3e06b3386c Coins: HTHHHHHHTHHHHHHHHHTTHTHHTTTHTHTTTHTTHTTTTHHHTHHHHTHTHHHTTHTHTHHHH 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 Cards: As 7c 3c 3s Qs 5s Kh Ks 2d Th 9c 8s Jh 6d 5d Ad 8d 9s 2c 2s 9d Jd Jc 7h 4s Ts Kd 6s Qc Js 3d Td 5c 8c Kc Ac 6c 4d Tc 2h Qd Qh 5h 7s 3h 9h 6h Ah 8h 4c 4h 7d Round 2: 40bit: 0x25fd681dcf01e40e 0x15b20d676e3c3ad8 0xd62454123f18447b 0xd2ed41a518ff61ba 0xf4625131fa78629c 0xcf5f2a2bc592ed41 Coins: TTTHHHHTHTTTHHHTTHHHTHHHHTTHHTTTHHHTHTTHTTHHHTTTHTTTHHTTHHTHHTTHT 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 Cards: 8h 9h Tc 5c 8d 7h 4d 4h 5d 2s Ad 6d Qs 8c 9s 6h 4c Th Qc Jc 3d 7c Td Js 3c Qh 2h Kh Kd 7s 5h Ks 8s As 6c 3s 9c Ah Jh Jd Ac 3h 9d 5s 2c Qd Ts 2d 4s 6s Kc 7d Round 3: 40bit: 0x7246882f97ca618d 0x6bfacfdb29810ed3 0xece86a774cd51bfd 0x52ef744f62744c94 0x62567a265fafb889 0xe1b1c00d183ee96a Coins: THTHTHTTHHHHTHHTTHTTHTHTTTTTTHHTTTTHHTTHHHHTTTHTHHHHTHHHHHTTTTHTH 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 Cards: Td 4d Th 5h 3d Kc 9s 3s 4c 7c 4s Jd 7s Ac Ts Qh 2h 4h As 3h 5s 9c 8d Qs Qd Qc 8s Js 2s Ad Jc 6d 2d 9h 2c 7h 8h Jh Tc 9d 5c 6c Ah Kh Ks 3c Kd 8c 7d 6h 6s 5d Round 4: 40bit: 0x8c19c475c51bd13b 0xd283cb08853371e7 0x123c48d92fa977f2 0xcac972ff67005a54 0x2db2dd6e5f4cbba6 0xf22c80b048063362 Coins: TTHTTTHTHHHTHTHTTTTHHHHHHTHHTTTTTTHHTTHHHHHHHHTTTHTTHHHTTHTTTTTHT 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 Cards: Ah 4s 3h 6d Ad 3d Ks 3s Kh 4c 4h Kc Jd 6h 8d Qs Tc 4d Qd 5s Kd 5h Ts As 9h 7h 9d 2d 3c Td Th 7d 8s 7s 8c Js 2h Jh 2s 9s Qc 5c 6c 9c Ac 7c 5d 6s 2c 8h Jc Qh Round 5: 40bit: 0xcd297aeff4ebb56a 0xe7bac4baf02a88ae 0xb309261fdd99f0ee 0x22801c7fe80eb42f 0xcf1a7245e5c59690 0x6aee2db8a6176987 Coins: TTTHHTTTTHTTHHTTTTTHHHHTTTTTHHTTHTHHTTTHHTHTTTTHHTTTHTTTTHTTHTTHT 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 Cards: 2c 3c Kd 2s Qs 6d Ad Qc Kc Js 3h 4c Jc 5h 9c 7h 8h 9s Ks Th 2d 9h Qd 7d 8d 8s 4d Tc Ah 5s Jd Ac 7s 6c 7c 2h 6s 8c 4s Qh 5d Td 5c Ts 9d Kh 3s As 4h 3d Jh 6h pcg-cpp-0.98.1/test-high/expected/check-pcg64_c1024_fast.out000066400000000000000000000045321250047755200232270ustar00rootroot00000000000000pcg64_c1024_fast: - result: 64-bit unsigned int - period: 2^65664 - size: 8208 bytes Round 1: 64bit: 0x55da58820315b3ac 0x023660d88886b4ad 0x7f0d3cf17d612bc5 0xc8dd682283a63192 0x529779d196589320 0x72a700ae18ab8763 Coins: HHHTHTHTHHTHHTHTHHTHHHHHTTHHHHTTHHTTHHHHTHHTTTTTHHTHTHTTTTHHHHTTH 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 Cards: 9h 8c 6h 5s As Td Js Ah 5d Qh 6s 2d Kh 3h 7s 7h 8s Tc Jc 5h 2c 8d Ad 3d 3c 7d 6c Kc 5c 6d Qd 2s Qc Jh 9s 4c 7c Ts Th 2h Ks 9d 4s Jd 4d 3s 4h Qs 9c Kd 8h Ac Round 2: 40bit: 0xacc17347a5e62cfb 0xbd254b04c901de89 0xd04990b28a2de92c 0xa18498a3c28e7579 0x2da084ee4056e2fd 0xe087775f49f66d33 Coins: HHTHHTTHHTHTHHTHTHTTHHHHTTHHHTTTHTHTHHHHHHTTTHTHTTHTTHTHTTHHTHTHT 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 Cards: 3s Ac 3h Td Jh 2d 3c Qc 7d 9d 2c 8h 4c 6d 7s Js 9c 4h 5h 2s 2h 7h Kc 6h Qs 5s Ts Qh Ad 9h Tc As Ks Qd Th 8d 9s Kh 8c Kd 4s 7c Jc 6c 3d 5c 8s Jd 5d Ah 4d 6s Round 3: 40bit: 0x36adb072902e8a7f 0xb0ecc5bbd3a64e7d 0x2849bc91170b00f6 0xf5c2550ebb3fe21f 0x4ee68fc51aa05b8d 0x4e34d4b191ccecb1 Coins: HTHTHHTTHTTHTHTTTHHHHTHTHTHTHTTTHTTHTHHTTHTHTHTHHTHTHHTHTHHHTHTTT 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 Cards: Jc 7s Th 3h 2c 8h Qs Ah Td Ac Tc Ad 5s 7d Kh 2s Jd Qc Kd Ts 9d Kc 6s 4s 5d Ks 5h 2h 2d 4h 3d Js 4c 9h 6c Jh 5c 4d Qd 8d 9s As Qh 3c 8c 7h 6h 8s 6d 3s 9c 7c Round 4: 40bit: 0x11f84c40c21e0095 0x9b2997036eb49e12 0xa38479388dc5edbc 0xe5be8c81f92df921 0xe37566cbb95fa05b 0x316f422cb4d4c6c7 Coins: HHHHTTTHTTHTHTHHTTHTTHTHTTTTHTTHHHTTHTTHTTHHTHHTTTHTTTTHHHTTHHTHT 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 Cards: 6d 4c As 6c Ac 9c 4h 8s 3s 7d Qh 2h Ah 2c Kc 9d Tc 5s Js 9h 8h 7c Jd 3h 4d 6h 2s Qs 2d 5d Qc 8d Th 6s Qd Kd 5c 3d 5h Jh 7h Td 7s Ad Jc 8c Kh Ts 4s Ks 3c 9s Round 5: 40bit: 0x4a9b182682cc6f6c 0xad05fd2a2371d288 0x35aeda738467fa7a 0xb31217ade0c408d7 0xbe558337184cc9bb 0x53dc9a7087a99250 Coins: THHTHTHTHTTHHTHHTTHTTHHHHTTHHTHTTHHHTHHHHHTTHHTHTTTTHTHTHHTTTHHHT 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 Cards: 3h Qc 3s 7c 7s 4h 9d Js Kd 2d 6h 8h 9h 5d 6s 9s 5h Ks Jc Qd 4d 7d 4s Jh Td Kh Jd 8s 4c 5s 2h 5c 2c Ac As 8c 7h Qs 6c 9c 6d Th Ts 2s 8d Tc 3c Qh Kc Ah 3d Ad pcg-cpp-0.98.1/test-high/expected/check-pcg64_c32.out000066400000000000000000000045451250047755200220540ustar00rootroot00000000000000pcg64_c32: - result: 64-bit unsigned int - period: 2^2176 (* 2^127 streams) - size: 288 bytes Round 1: 64bit: 0x6a202138d9ee51c5 0xa0e544ab585ba357 0x45c954470b9ca7eb 0xbaa3e4f04003b756 0x69fc867f81c36264 0x79080620c60f42f1 Coins: HTTHHTTHTHTTTHHTTHTTHHTHHHHHTHHTTHTHTHHHHHTHHTTHTTHTTTTTTTHTHTHTH 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 Cards: Jh 8c 2d Kd Jd 4h 8d 3c 5d 6h Kc 9h 3h 4s 5c 6c Th Ad As 2c 4d Qc Js Qs 7c 5s 9s Tc 9d Ts 3d 7d 2s 3s Qd 9c Ks Ac Jc Ah 6s Td 7h 2h Kh 7s 8s 5h 6d 4c 8h Qh Round 2: 40bit: 0xa0f1d0aca239a53b 0x898fe5131e4ccb68 0xf75d2bf2ace26841 0xb8ae157b92baa061 0x5d81af69594697df 0xdce14e9cff8ec370 Coins: HHTHTTTHHTHTHHTHHHTTHTTTTHHHTHTHHTHHHTTHHTHTTTTTTTHTHHHTHHTHHHTHH 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 Cards: Kd Ah 2d 3c 4c Jc Jd Qc Ks 6d 9c 4h 2c Ts 8h 3s 4d 8s 7s Tc 6s 4s 5c Ac 3d 5d 5s Qs Kh Td 7d 2s 7h Jh 5h Th 9s 7c As 6h Kc 2h 8c Qd 8d 9h 3h 6c Js Ad Qh 9d Round 3: 40bit: 0x91b7889987aa1ec6 0x0ed5084055a71e1e 0xd9235ff37902ab6e 0x3f587978e907a6e4 0xa4b0d25c45e6a5b6 0x1d5af98fe7046ebc Coins: HHHTHHTTHTHTTTTHTHHHTHHHTTTTTTHHHTTHHTHHTTHTHHTTHTTTTTTHHTTTHTHHH 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 Cards: 3d 9h Jc 8s Qc 5h Ks 5d 6h Jh 9c Jd 5s 4d 2c Js 9d 5c 9s 7s 7h 3h As 4c Kd 6c 2s 7d 8d Ah Tc Ad Ac Qd 3s 6d Kh 3c 8c Td 2d Qs 4h 8h 2h Qh Th 6s 7c 4s Ts Kc Round 4: 40bit: 0xb9bd5d2cdacdda6d 0x8df76d5c83998fdd 0x47ffde0b04c8e4c7 0xc0f51b1946a32345 0x327d52590dcae958 0x8fd4cf60789eec4a Coins: HHTHHHTTTHTHTHHTHTTHTTHHHHTHHHTTHTTHTTHHTHHTTHHHHTHTHTTHHHHHHTTTT 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 Cards: 8s 9c 3d Js 5s 7c 2d 6s 7s 6h Ts As 4h 4d 7h Tc Jh 6d Qs 3h Ks Th 5c 5d Td Kh Ad 8h 3s Qh 8c 2h 2s 6c 5h Jd Ac 3c Qd 7d Jc 9d 8d Ah 4c 4s 9s Qc 2c Kc 9h Kd Round 5: 40bit: 0x087140d144b810b7 0x56fb1cc84113d2da 0xc92332d25992ed0a 0xc47bbb3a90cea863 0x3d73ce0952a62a2b 0xd7e60982f60a00aa Coins: HTHHTHHHHTTTHHTTTTTHHTHHTHTTHTTHTHHTTHTHTTTHTTHHTHHHHTTTHTTHTHTTH 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 Cards: 5d 9s Qs Ts 6h 7h Qc 4s 2c 7s Kc 2d 3d Qd 8d 4d 7d Jc 9d Jh 6s Th 2s 3h 5c Td 9c Js Jd Ad 6c Ac 3s 8h 8c Kd 5h 2h 3c 9h Qh 5s Ah 4h 6d 8s As Tc Kh 7c 4c Ks pcg-cpp-0.98.1/test-high/expected/check-pcg64_c32_fast.out000066400000000000000000000045261250047755200230700ustar00rootroot00000000000000pcg64_c32_fast: - result: 64-bit unsigned int - period: 2^2174 - size: 272 bytes Round 1: 64bit: 0x8c3dcea9a8ec012a 0xa3e7dd5265ee932a 0x12ad974d3d6acc0c 0xb43c7893cb23f33c 0xce33b533163330c6 0x8760bf8099dc52f3 Coins: THTTTTTTTHHHHHTHHTHHTTHHTHHHHHHHHTHHHTHTHHHTTTHTTHTTTHHHHHHTTHTTT 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 Cards: Ts 2h Ac Jd As Kc Jh 2c Kd Ks Qs 5h 4d 7d Ad 3s 3d 4c 7s 3c 5d 3h 8s Tc 9s 8h Qc 2d 5s Th 9d Qh 5c 6s 9h 7c Qd 8d 6h 4s 9c Kh Td 6c Ah 8c Js Jc 2s 4h 6d 7h Round 2: 40bit: 0x1365608a27ecbe73 0x1710ffa1040e1777 0x73bc625a07e2a046 0x4b7559ba56e977e4 0xbb21240566940491 0x6abfbecb80b1ff1d Coins: TTHHHTHTTTTHHTHHHTTTTHTHHHTHTHTTTHTHTHHHHTHHHHTTTHHHHTTTTHHHTHHHT 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 Cards: 5c 8c Ts 9h 9c 8s Js 7s 6d 4c 4d 3d Qs 9s Ah 8d 7c 6c Kh 6h 3c Td 2h Ac Ks 3s 9d Th 2d 5h Kc Ad 6s Kd 8h Qh 4s Qc Jd 7d 5s Jh 2c 3h 7h Qd 4h As 5d Jc 2s Tc Round 3: 40bit: 0x2da6bd5828fedd55 0x9360e79d3218b8ce 0x7a9ca1bfb4ae99fa 0xdb7e60857a9bb076 0xed1bdd0db1089228 0x039882d1422cbc3d Coins: HTTHHTTTHHHTHTHTTTTTTTHHTHHTTTHHTTHHHTHTHTHHTTHTHTTTTTHHHHTTHHHTH 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 Cards: 2c Jd 5s Ks 3h 5c 2h 8h 5d 9c 6c Qh 3d 2s Tc 6h Ac Qd 7c Jc Jh 4h 4s 6d 7h 5h 4d As 3s 8c Qc 3c 7d 9h 4c 8d Kd Kh 9d 6s 8s Td Ah Qs Kc 9s Ts 2d 7s Th Ad Js Round 4: 40bit: 0xcf2b14d23f2c5e0c 0x46ff4fe90f397ca0 0x563c15e615148eed 0x517a7e4a24bdcc9e 0x627bd4295ec1ca63 0xf215acf4ee0dda66 Coins: HTHTHTHTHTHHHHHTTHTHTHTTTHTTHTHHHTTTHTTHHTHTTTTTTHTHHHHHTTHTTTHHH 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 Cards: 9d 2s 9h 5d 6s Ad Kd 6h Qh Jd 3h Ts 8s Jh Qs 7c Kc Kh 4c 7d 6d 8d 5h 5c 7h 3s Jc 4s 2d 3c As 4d Qd 2c 9s 5s 2h Tc 8h Js 9c 8c Ac 7s Td 4h Ah Qc Ks 6c Th 3d Round 5: 40bit: 0xc843447bfaca04a4 0x438faa7f4fd7fd4b 0x3734fddb3819962d 0xe2db1ef1e551c13c 0xbe6c37b5b98bab8d 0x53c0265dab44b2b1 Coins: THTTTTTTTTHTTTHTTTHHHHHTTTHHHTHTHTHTTTTHHTHTTHHTTTTHHHTTHHTHTTHTH 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 Cards: 9c Td 7c 7h 8h 2s Ac Kh 2d 8c 9s Js 9h 5c 5h 6d 6h 4h Qs 4d Kd 8d 3s 3d 4c Th Tc 6c Ts 5s 3c 7d 3h 2c 7s 2h Jc 4s 6s Ks 5d Ah Qc Kc 9d As Qd 8s Jd Jh Qh Ad pcg-cpp-0.98.1/test-high/expected/check-pcg64_c32_oneseq.out000066400000000000000000000045301250047755200234200ustar00rootroot00000000000000pcg64_c32_oneseq: - result: 64-bit unsigned int - period: 2^2176 - size: 272 bytes Round 1: 64bit: 0x676b3134f9ebe60f 0xe59f0e55fe310920 0xf7321efeda8b40cb 0xda90bfd7e3230978 0x641802497d52fda0 0xd96e3fb921e8b33d Coins: HTHHTTTHTTTHHTHHTHHTTTHTTHHHHTTHTTTTTHTTTTHTTTTTHTHHTTTHHHHHHHHHT 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 Cards: Ts Qh 4d Ad 9d 8d 6c Qd 4s 7c 8s 9h 8h 2s Ks 5d Ac Tc 4c Js Kc 5h 2h 6s 3h Qc 2d 6h Td 6d Qs 3c Ah 9c Th 2c 3d 7s Jd Jh 7h 7d Kd 5c 5s 4h 8c As Kh 3s Jc 9s Round 2: 40bit: 0x512b5aafa488800c 0xfdee3c27da7686a9 0x41fe7ffbc0a8ef66 0xe76b420836ecccc7 0x1083b5aec0846e99 0x40a0f567b36dc10f Coins: HHTTTHTHTHTHHTHHTTHHTTHTHTTTHHHTTHHHTTHTHHHTTHHTHTHTTHTHTHTTTHTTH 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 Cards: 3c 8h 5s 6s Ts 7h Ac 2d 2s Ks Qs Kc 7s Td Qd 4h 7d 9d 2c Kh 6h 3h 4c Jh Js As 8c 6c 7c Qh Ad 8s Jc 5d 4d Th 9s Qc Ah 2h 3d 4s Tc 3s 5c 6d 9c 5h 8d 9h Kd Jd Round 3: 40bit: 0x2dbd95ce2bb203e2 0xa38f7b3be5eb97d3 0x4f343774560b7753 0xf0a9e5743a450957 0xe31ff462c5c9b5ae 0x5a1c3ec0609a8cb1 Coins: HHTTHHTTHHTHHHTTTTHTHTHHTHTHHTHHTHTHTHHHTHTTHHTHTTHHHHTHHTTTHTTHH 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 Cards: 4d 9s 6h 5d 8c Ks 6s Qc 2s Qh 2d Td 9c Jd As 6c Th Ad 8d Ah 2h Kh Kc 7s 3h 8h Jc Qd Jh 5s 8s 9d 6d 5c 2c 4s Kd 5h 7h 3c Js 7d 9h 4h 3d 3s Ts Ac Qs 7c Tc 4c Round 4: 40bit: 0xfb8eab4ddeff6324 0x41403a4419e4cf9a 0xbaf19e0432c6062f 0xc89ade15d828ef9a 0xf14e9ab7f6fd226e 0xf40d5df6e172b649 Coins: HTHHTTHTHHTTHTHHTHHTHHTTHTTHHHTTTHHHHHHHTTTHTTTHTHTHTTHHHTTTTHHHT 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 Cards: 7s 3c 7c Qs Kd Js 4d 8d 3d Ah 5d 9d 9s 6s 7d Kc 6h Jc Ac 2h Th As Ad 6c Kh 7h 3h Jh 2c Qd Tc 6d 5s 5h 9c 9h 4s Ks 2s Qc 8c 4c 4h 5c 3s Td Qh 8h 2d 8s Jd Ts Round 5: 40bit: 0x1109ba6f20c9c9b9 0x4fcc9e6d4bf4cbd3 0xcd8ae4b2edbe29bd 0x59a447b4fdd0e5ba 0xaf03a68ef8b853a3 0x8b6e215c53d25ad9 Coins: TTHHHHTTHTTTHHTTHTTTTHTHTTHHHTTHTTTHHHTTHTTHTTHTHHHHHTHTHTTHHHHTH 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 Cards: 8h Tc 3h Kd Th Qd 2d 9h 4h 8d 9d 5s 7h 7s Jd 9c 6h 4s 4d 2s 8c 9s 5h Qc Td 5d 3c Ks Qs 6c 5c Js Jc Ac 3s Kc 6s Ad Ts 3d 2h 7c Qh As 6d 4c Ah 2c 8s 7d Jh Kh pcg-cpp-0.98.1/test-high/expected/check-pcg64_fast.out000066400000000000000000000062421250047755200224160ustar00rootroot00000000000000pcg64_fast: - result: 64-bit unsigned int - period: 2^126 - size: 16 bytes Round 1: 64bit: 0x63b4a3a813ce700a 0x382954200617ab24 0xa7fd85ae3fe950ce 0xd715286aa2887737 0x60c92fee2e59f32c 0x84c4e96beff30017 Again: 0x63b4a3a813ce700a 0x382954200617ab24 0xa7fd85ae3fe950ce 0xd715286aa2887737 0x60c92fee2e59f32c 0x84c4e96beff30017 Coins: HTTTTTTTTTTTHHTHHHHHHTTHTHTTHTTTTTHTTHTTHHHHTHHTHHHHHTTTHHHHHHHHH 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 --> rolling dice used 33 random numbers Cards: Jh Jc 2h 4h Kd 2c 4d 5c Kc 8c 7h Td 9s 4s 2s Jd 8s 6h Qd 6d 9c Qh Tc 3h 7c 2d 4c 3s Qc 5s 8d 9d Ah Ac 3c 6s 5h 7s Ks Th 5d Ad Js Kh 9h Qs 6c 3d 7d 8h As Ts Round 2: 64bit: 0x824eb71d0f02dfb4 0x7aaad63730e335c1 0xf87271e197a74023 0x86d11317e615a346 0xe067147998450163 0x59fc13368ae72993 Again: 0x824eb71d0f02dfb4 0x7aaad63730e335c1 0xf87271e197a74023 0x86d11317e615a346 0xe067147998450163 0x59fc13368ae72993 Coins: TTHHTHTHTTTHTTTHHHTTTHTTHTHHHTTHHTHHTHHTHTTHTTHTHHHTTTTHTHTTTTTHH 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 --> rolling dice used 33 random numbers Cards: Th Qs 2c 4d Jc Jd 4c 2h 4s Tc Kh 6d 3c 7s 5c 6c 6h Kc Qh 6s 2d 4h 9s 8c 3s 9c 7c 8d Kd 7d Ac 3h Qc 5s 5h As 8h Ks Ts 8s 9d Qd Js Td Jh 2s Ad 7h 9h Ah 5d 3d Round 3: 64bit: 0xaf64b2a730ffd1b9 0xef9f2e946e08fbe3 0x181b81b6a0b5bee2 0x219851c742250cf4 0xb459875e221e7df5 0xe7518dd5d411bae8 Again: 0xaf64b2a730ffd1b9 0xef9f2e946e08fbe3 0x181b81b6a0b5bee2 0x219851c742250cf4 0xb459875e221e7df5 0xe7518dd5d411bae8 Coins: HTHHTHTTTHHTTHHTTTTHTTHHTHTTHHHTTHTTHHHTTTHTTTTHHHHHTTTTTHHTHTTTT 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 --> rolling dice used 33 random numbers Cards: Jc Jh 2s 3s Ac 5s Td Kc 7s Th 7d 5h 3d As Qd 4h 3h Js 4c 5d Tc 4d 8s Ah 6h 5c 2c 7c 3c Qs 6s 2h Ks Ts 9c 2d Kd 6c 8h Qh 9s Ad 9d 4s Jd 8c 7h 6d Qc 8d Kh 9h Round 4: 64bit: 0xe7e1d1711485e473 0xc0c6d1f0e72a55d3 0x2d0fa33eb3638524 0xd0cb8d73a16deacd 0x3e410a9cc7682918 0x8df7d57b4d2f9ac4 Again: 0xe7e1d1711485e473 0xc0c6d1f0e72a55d3 0x2d0fa33eb3638524 0xd0cb8d73a16deacd 0x3e410a9cc7682918 0x8df7d57b4d2f9ac4 Coins: THHTHTHTHHTHTHHTTHTHHTHHHTTTHTTHHHHTTTTHTTHTTHTTTTHTHHHTHTTHTHTTH 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 --> rolling dice used 33 random numbers Cards: 3d 4h 2d 8d Js Qs 3s 4d 9h Ks Tc Qc Qh 9c 7s 6s 6c Th 6h Ts 9s Jh 2s 7c Td Ac Jc 8c 6d 4s 9d As 7d 5h 3h 2h Ad 4c 8s 8h 5s Kh Ah Kc 3c Jd 5c 7h Kd Qd 5d 2c Round 5: 64bit: 0x2a2d820a8f859ba2 0x1a74e59c8e288526 0x6b856b08000af65c 0x793c0d4103ce2a55 0xc5081bea922d1d0c 0x6b61da59d73efbf9 Again: 0x2a2d820a8f859ba2 0x1a74e59c8e288526 0x6b856b08000af65c 0x793c0d4103ce2a55 0xc5081bea922d1d0c 0x6b61da59d73efbf9 Coins: HTTHTHTTHTTTTTHTHTHHTHTHHHTHHHTTHHTHTTTTTHHHHHTHHHTTTHHTTTTHHHHHH 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 --> rolling dice used 33 random numbers Cards: Ks Ah Ac Ad 3d 9h 7c 3c 7d 3s Th 2d Jh 7h 5h Td 8d 6c Kd 2h Jc 9d 8s 2c 8h 4h Qd 6d 5c Js 5s 9c As 4s Jd Kh 2s Tc 8c 5d Qh 3h Qc 6s Kc 7s 4d Ts Qs 6h 4c 9s pcg-cpp-0.98.1/test-high/expected/check-pcg64_k1024.out000066400000000000000000000062731250047755200222260ustar00rootroot00000000000000pcg64_k1024: - result: 64-bit unsigned int - period: 2^65664 (* 2^127 streams) - size: 8224 bytes Round 1: 64bit: 0x8d9706afa56d17d4 0x44a818481d01d2df 0x3a13d5e1754b6a96 0xc21dcf2b4a6a4655 0x59c706aa47a07c78 0x7f0fc2a85642e319 Again: 0x8d9706afa56d17d4 0x44a818481d01d2df 0x3a13d5e1754b6a96 0xc21dcf2b4a6a4655 0x59c706aa47a07c78 0x7f0fc2a85642e319 Coins: HHTHHHTHHTHHTHHHHTHHTTTHTTHTHHTTHTHHTTHTTTHHHHHHHTHTTHHHTTHTHTTHH 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 --> rolling dice used 33 random numbers Cards: 3h 5d 8s Kh 8d 9c 7s 2h 6c 6s Ac 8h Jc Ks Qh Td 5h 4d 4h 9h Ah Th 6d Jd 2d 3s 8c 2c 3d Js 7d 7c 4s 3c Ts 9s 7h 6h 5s 9d 4c Kc Qs 2s Kd 5c Jh Qc Ad As Qd Tc Round 2: 64bit: 0x50638899fce02849 0xb7ce1bddfaba4e10 0x64b3829fcd739931 0x66fd9a2569fcd08a 0x96976fd1c0d8cbb4 0xcdf58a9c465c4abf Again: 0x50638899fce02849 0xb7ce1bddfaba4e10 0x64b3829fcd739931 0x66fd9a2569fcd08a 0x96976fd1c0d8cbb4 0xcdf58a9c465c4abf Coins: THTTHHTTHHTHHHTHTHHTTHTHHTTHTHHHHHHHHTTHTTHHTTTHHHTTHHHHTTHHTTTTT 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 --> rolling dice used 33 random numbers Cards: Td Ad 2c 7c 7h Jc 3s 6s Ts 8s 9h 4s Qd Ah 4h Ks Tc 6d 6c Qc 2d Jd Kd 2s 6h 7s 3d 5h Ac 4c Kc 9c 2h 9d 5s 8h Qs 7d 8d Jh 3h 5c 4d Qh 3c As 8c 9s Kh Js Th 5d Round 3: 64bit: 0xeaceeac7d52650bd 0xf38d15184cc47e50 0xbf1ad446c85f7e68 0x4dbcfd5bc51f94ef 0x78d33a2bb1990870 0x2db896fdc9338bdb Again: 0xeaceeac7d52650bd 0xf38d15184cc47e50 0xbf1ad446c85f7e68 0x4dbcfd5bc51f94ef 0x78d33a2bb1990870 0x2db896fdc9338bdb Coins: HTTTTHHTHTHHHHTHTTTHTHTHHHHTHHHTTHTTTHTHTTTTTTHTHTHHTTHTTHHHHTTTH 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 --> rolling dice used 33 random numbers Cards: Tc Th 6d 8s Qd 4s 9h 9d Kc 3c 8c 8h 5h Ah Ks Ts 2d Kh 4c Qh 7s 9c 4h 2s Jd 7h 9s 3h 6h Td As 5s Ac 2c 6c Ad Jh Js 6s 5c 3d 4d 2h Kd 7d Jc Qs 3s 5d Qc 7c 8d Round 4: 64bit: 0xb0a33faf71a1f334 0x94f66590597ae5d8 0x3c7fe68cd26ebdf8 0xa2180af6a8d1473c 0xc2688c12707e3b62 0xda672a42428bf0a4 Again: 0xb0a33faf71a1f334 0x94f66590597ae5d8 0x3c7fe68cd26ebdf8 0xa2180af6a8d1473c 0xc2688c12707e3b62 0xda672a42428bf0a4 Coins: THHTHTHHTTHTTTTTHTTHTTTHTTTHHHHTHTTTTHTTTTTTHHTTTHHTHHTHTHHHTTHHT 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 --> rolling dice used 33 random numbers Cards: 4h 8s 4c Ad 9d Qh 2s Ts Jd Jh 6s 7h 9s Qc 2c As 8h 5d Ac 3d 8c Kc 8d 5c Js 2d 9c Qs 3s 3c Td Kh 7s 7c 6d Ah 5h Jc Th 7d 4d Ks 9h 4s 5s 2h 6c Kd 6h 3h Tc Qd Round 5: 64bit: 0x0e46cf5648162dac 0x085cfe3fc86e06af 0x7aa43a225abaf9c1 0x898e076f83632286 0xaf1f07f02715ef10 0x9807752b8f8907b6 Again: 0x0e46cf5648162dac 0x085cfe3fc86e06af 0x7aa43a225abaf9c1 0x898e076f83632286 0xaf1f07f02715ef10 0x9807752b8f8907b6 Coins: HHTTHHHTTTHTTTHTTTHTTHHTTHTHTHHHTHTHHTHTHHTHHHHTHTHHHHTHTTTTHTHHT 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 --> rolling dice used 33 random numbers Cards: Jc Ad Ts Qs Jh 7d 2h Ah 2d 4s Kc Qc 6s 5h 7s 6h Qd 3d 4d Jd 4c Js 6c 4h 9d 8c 2s As 8s Ks 8h Kh 3h 3c 8d Th 9h Tc 7h 5d 6d 9s Td 9c 5c Ac 7c 5s 2c Kd Qh 3s pcg-cpp-0.98.1/test-high/expected/check-pcg64_k1024_fast.out000066400000000000000000000062541250047755200232420ustar00rootroot00000000000000pcg64_k1024_fast: - result: 64-bit unsigned int - period: 2^65664 - size: 8208 bytes Round 1: 64bit: 0x716e1291ecd614bf 0x6d9c60c68bfa5bac 0x6011e6dee28a425f 0x3a93df63ad5d8c2d 0x8c276f08b088c497 0x4d7204001d16777d Again: 0x716e1291ecd614bf 0x6d9c60c68bfa5bac 0x6011e6dee28a425f 0x3a93df63ad5d8c2d 0x8c276f08b088c497 0x4d7204001d16777d Coins: HHHHHHHHTTHTTTTTTHTTTTHHHHTTTHTHTHHTTTHTHTTHHHTTHHHTTTTHTHHHTHHHT 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 --> rolling dice used 33 random numbers Cards: Ts 2h 3c 9d 3s 2c Th 3h 4c Qh Js Ad 7c 9c Td 8s 7h 4s 6c 6h Tc 7d 8d Jc Qs Ac Jd 5s 6d 4d Kc Kd Jh 8h Qd 2s 5d Kh 3d 4h 8c Qc 9h 6s 5c As Ah Ks 7s 5h 9s 2d Round 2: 64bit: 0xbd047092dbc12c12 0xb8023964c5590845 0x6a2acc287da9b782 0xf27a18fdeaca790a 0x5dd53aa3af4dd73e 0x407a59d050593064 Again: 0xbd047092dbc12c12 0xb8023964c5590845 0x6a2acc287da9b782 0xf27a18fdeaca790a 0x5dd53aa3af4dd73e 0x407a59d050593064 Coins: TTHTHTTTHHHTTHTTTHHTHHTTTHHTHHHHHTHTHTTHTTHHHTTTTTTTTTHTHTHTHTTTT 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 --> rolling dice used 33 random numbers Cards: 4c 4d 9c 6d Qs 3d 5c Tc 9d Ts 2h Th Qh Jh 6h 8s 2s Ac 3h 7s 4s 5h 9h Js Jc 2c 4h Kd Ah 5d 8c As 5s Kc Qd 7c Ks Ad Qc 8h 6c 7d Jd 8d 2d 3c 7h Kh 6s 3s Td 9s Round 3: 64bit: 0xb9f6e508611fa39b 0x50ff50a7fda1c6ff 0xc9fc4c468fc0e452 0x13992edc8b596e39 0x6e621625efd5f7df 0xe0ec108a27c75fae Again: 0xb9f6e508611fa39b 0x50ff50a7fda1c6ff 0xc9fc4c468fc0e452 0x13992edc8b596e39 0x6e621625efd5f7df 0xe0ec108a27c75fae Coins: HTHTTTHTHTHTTHTTHHTTHTHHHHTTTHHHTHHHHTHHHTHHTTHTTHTHHTHTTHHHTHTHT 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 --> rolling dice used 33 random numbers Cards: 3d 5h 2d 7s Ts Tc 3s Kd 8c 6c 4s Js 9s Jd 4d Qc 2s As 6d Jc Qs Ad 8h Kc Td 7h 7c 4h 6h 2h 5c 9d 4c 2c Qh Jh Ks 3c 9h 8d Ah Ac Qd Th 7d 3h 8s 5s 9c 6s Kh 5d Round 4: 64bit: 0xb5cb75ddd90a0f9e 0x4cf347f82cce20c6 0x6243c21a2332efc2 0x43f3e96d96ce7569 0xea93a4709c0f83f8 0x88c99d75a1dec4a9 Again: 0xb5cb75ddd90a0f9e 0x4cf347f82cce20c6 0x6243c21a2332efc2 0x43f3e96d96ce7569 0xea93a4709c0f83f8 0x88c99d75a1dec4a9 Coins: HTTHTHHHTTTHTTTTHHTHTHHTTTHHHTHHHHTTTTHHHTHHTHTHHTTTTTHHTHHTTHTHT 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 --> rolling dice used 33 random numbers Cards: 7d 6c 4d 8s Td Kd Qh 9h 9c 5d 7s Tc Qs Ks 9s 6d As Jc 8h Qd 4s 4c Kc 7h 7c Jd 4h 2c 8c 2d 5s 2s 3d Jh Kh 6h 2h Ts Ac Js 9d Ad 8d Qc Th 3c 6s 3s 5c Ah 3h 5h Round 5: 64bit: 0xa9cba0879f523763 0x9d063cc605508ab9 0xaa9dd9f6f8792bdc 0xa3005a22d15b695b 0x66f3b5676edeceea 0x8e315e033cded525 Again: 0xa9cba0879f523763 0x9d063cc605508ab9 0xaa9dd9f6f8792bdc 0xa3005a22d15b695b 0x66f3b5676edeceea 0x8e315e033cded525 Coins: THTTHTHHHHTTHTTHHHHHHHTTHTHTHTTTTHHHTHHHTTHTTHTTHHHTHHHHTHTTTTTHT 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 --> rolling dice used 33 random numbers Cards: Th 2c 2s Td 4s Tc Jh Js 6h 2h Ac Qs 9h Kd 9s Qh 6d 6s Ad 2d 9c 3h 7h 8s Qc 5d 3d 5h Ah Jd 3s As 9d 5c 6c Ks 7c Jc Qd 4c 5s 8c 3c Ts Kc 8h 7s 4h Kh 7d 4d 8d pcg-cpp-0.98.1/test-high/expected/check-pcg64_k32.out000066400000000000000000000062671250047755200220670ustar00rootroot00000000000000pcg64_k32: - result: 64-bit unsigned int - period: 2^2176 (* 2^127 streams) - size: 288 bytes Round 1: 64bit: 0x2dcbaf9339a0a8db 0xa5486595bb7ecc26 0x800934faba0d0759 0x7eff732dee5b72cb 0x44760d3bb06156f9 0x6f3622730aff6c44 Again: 0x2dcbaf9339a0a8db 0xa5486595bb7ecc26 0x800934faba0d0759 0x7eff732dee5b72cb 0x44760d3bb06156f9 0x6f3622730aff6c44 Coins: THTTHHHHHHTHTTHHTHTTTHTTTTTHTTHHHHHHHHHHHHTTHHHHTTHTHTTHTHTHTHHHH 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 --> rolling dice used 33 random numbers Cards: 2s 2d 9s Jd 3c 4h Qs 5s 4c 2h 9c 6s Qd Kh Ac Ah 7h 8h 6c Ks 5c Tc Qh 8d 8s Kd 4s Th 9h 3h Ts 7s Td 5d 2c 4d Kc Qc 3d As 6h 8c 6d 7c Jh Ad 3s 5h 9d 7d Js Jc Round 2: 64bit: 0x08362f38c5184d06 0x2ba1b3164afc696d 0xf18e00ded413293e 0x14512048d47657aa 0x003ef118b96e494b 0xb6ba214a64598dc5 Again: 0x08362f38c5184d06 0x2ba1b3164afc696d 0xf18e00ded413293e 0x14512048d47657aa 0x003ef118b96e494b 0xb6ba214a64598dc5 Coins: TTHHHHTHTTHTTHTTTTHHHHHHTTTHTHHHHHTTTTTHTTTTHTHHHTHTHTTHTTTTTHHTT 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 --> rolling dice used 33 random numbers Cards: Th Jd Tc 7d Qd 3d 2c Qs 8c 6d 2h 7s Jh 9d Td 6c Ac 8s 7c 8h 9s Jc 4d Kc 2s 7h 2d 5c 9c 9h Ad Kh 4c Qh 3h 3c 5d 3s 5s Qc 5h Ts 8d Js Ah Ks As 4h Kd 4s 6h 6s Round 3: 64bit: 0xedfa63d9e74cb0d7 0xb9a431ed222e20e3 0xe0bc6a0b891ffa90 0x8e1c3e7e25a97e13 0x7065328d5502585a 0x30ea18f29c9dd917 Again: 0xedfa63d9e74cb0d7 0xb9a431ed222e20e3 0xe0bc6a0b891ffa90 0x8e1c3e7e25a97e13 0x7065328d5502585a 0x30ea18f29c9dd917 Coins: HTHHTTHHTTTHHHHTTHTTTHHTHTHHTHHHTTHTTTHHHHTHHTHTHHTHHTTHTHHHTTHHH 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 --> rolling dice used 33 random numbers Cards: Th 8d Jh 2s Td 3h 2d Kc 3c 7d 6s Jc 5c Jd 8c Qd 6d As 4s 5d Kh 6h Js 7h 8s 9h Ad Qs 2c 9s 4d 5h 8h 4c 6c 3d 9d 3s Ac Tc 5s Qh Qc 7c 2h 9c Kd 7s 4h Ah Ks Ts Round 4: 64bit: 0x778fbeeb1240be87 0x146e38cf2b84691c 0x51f4076de124d878 0x3aa6741428102d8b 0xfe712690a64ff70b 0xfdbb7799320fb4a3 Again: 0x778fbeeb1240be87 0x146e38cf2b84691c 0x51f4076de124d878 0x3aa6741428102d8b 0xfe712690a64ff70b 0xfdbb7799320fb4a3 Coins: THTTTHTTHHHTHHTTTTTHTTTHHTTHHHTTTTTHTHTHHTHTHHTTHTTTTHTHHTTHTTHHH 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 --> rolling dice used 33 random numbers Cards: 7s Kd 3d Tc 9s Ah 6d 8d 3s Ad Kc 6s 9h Kh 4c Qs Ks Js Th 3h 5s 4h Ts 5c 7d 4d 7c 9c 5d 8h 2s 2h 6h 6c 4s Jc Jd As Td Qd Qh 8s 2d Qc 7h 5h Ac 3c 8c 9d Jh 2c Round 5: 64bit: 0xc698f9ba129692a7 0x94646b27c1c8ca84 0x5ed4146e49289180 0x646e2e367a11b087 0xcf0ec8f5395d2d9f 0xb81f13d75e8265af Again: 0xc698f9ba129692a7 0x94646b27c1c8ca84 0x5ed4146e49289180 0x646e2e367a11b087 0xcf0ec8f5395d2d9f 0xb81f13d75e8265af Coins: THTHTTHHTHTTHHHHTHTTTTTHTHTHTHTTTTHHHTHTTTTHTHHTTHTHTTHHHTHTTTHTT 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 --> rolling dice used 33 random numbers Cards: Ac 3d 8s 4c 5h 7c 4d 9c 7d Kc 4h Qc Td 8c Js 9s Tc Jd Qs 3h Jh 6d 2h Ks 5s Ts 7s 5d 2c 2d 2s 5c 7h As 3s Qh Kh 9d Th 9h 8h Jc Ah Qd Kd 8d 6c 4s 3c 6s Ad 6h pcg-cpp-0.98.1/test-high/expected/check-pcg64_k32_fast.out000066400000000000000000000062501250047755200230740ustar00rootroot00000000000000pcg64_k32_fast: - result: 64-bit unsigned int - period: 2^2174 - size: 272 bytes Round 1: 64bit: 0xb630722e1a261b23 0xa3e7dd5265ee932a 0x88ec8f3994a7ea76 0xaed90a0ebbb4cc14 0x58fb1a0fa08733a2 0xab8b8a9f25b4d827 Again: 0xb630722e1a261b23 0xa3e7dd5265ee932a 0x88ec8f3994a7ea76 0xaed90a0ebbb4cc14 0x58fb1a0fa08733a2 0xab8b8a9f25b4d827 Coins: HTHTTHHTHTTHHTTTHTTTHHTHHHHHHHHTTTTTHHHHTTTHHHTTHHHHHTTHHHHTHHHTH 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 --> rolling dice used 33 random numbers Cards: 2h 6d 8s 9h 4h Kh Jd 2d Ks Qh 8d 4c 3d 3c 5s 7h 6h Tc 8h 2c Ah Jc Kd 6c Ts 5c Qs 9s Kc As 9d 7s 8c 5d Ac Jh 4d Qc Ad 5h 7d 3s 7c 6s 3h 9c Qd 2s Td 4s Js Th Round 2: 64bit: 0xb82624143a5c6f6c 0x3516272dc09bc391 0x73bc625a07e2a046 0x0e81a232551edc75 0xf31b469e981a3d37 0x34f114a797eadf62 Again: 0xb82624143a5c6f6c 0x3516272dc09bc391 0x73bc625a07e2a046 0x0e81a232551edc75 0xf31b469e981a3d37 0x34f114a797eadf62 Coins: HHTHTTHHHHHTTTTHHTTHHHHTTHHHTHHTTHTTHTTHHTTTHHTTHTHTTTTTHHTHTHTTT 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 --> rolling dice used 33 random numbers Cards: 5d 6s 9h Qh 6d Kc 3s Js 4h Kd Ts Kh Ac 5c Ks 9d Qc 4s Jd 7c 8h 6h Tc 9s Jh 2c 4d 4c 8s Ah Th 3c 5h 7d Qd 7h 5s Ad Qs 8c 7s Jc 9c 8d 2d 2h Td 2s 6c As 3h 3d Round 3: 64bit: 0xf58d7042ef8c12d9 0x1345bc317aa61740 0x11d105038caaaa58 0x9344021e841589d0 0x83970b191840b7ad 0x6643ad1f50177b5c Again: 0xf58d7042ef8c12d9 0x1345bc317aa61740 0x11d105038caaaa58 0x9344021e841589d0 0x83970b191840b7ad 0x6643ad1f50177b5c Coins: HTHHHTTTHHTTHTHTHTTHTTTHTHHHHTHHHHHHTTHHTHTTHHTHHTTHHTHHTHHTTHHTH 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 --> rolling dice used 33 random numbers Cards: Jc 2d 3h 5h 2s Jd 2h Qd 7d Ah Jh Qh Kh Ks 3d Td 7h 6c 4c 8d Qs Qc Ac 7s 8h 9s Kd 9c 9d 2c 9h 3c 6s As 5d 7c Ad 4s 8c 3s Tc Ts 5c Kc 4h 6d 8s 5s 6h Th 4d Js Round 4: 64bit: 0x16ef7e36cab3177d 0xa2054397267b284c 0x7fbef10bc156ee10 0xb03e53dc98232df4 0x2269362647946ada 0xa6e9c81dd9bfd5d9 Again: 0x16ef7e36cab3177d 0xa2054397267b284c 0x7fbef10bc156ee10 0xb03e53dc98232df4 0x2269362647946ada 0xa6e9c81dd9bfd5d9 Coins: THTHHTTTHTTHTTHTHHTHTTTTHHTHTHTTTHHTTTHHTTTTHHTTHTTHHHTTHTHTTHTTT 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 --> rolling dice used 33 random numbers Cards: 2c 6c Jd Ad 7d 5d 8c 3s 4s 9d 2d 8h Ts 6s 9h 4h 7c Ac 5h Kc Js As Kd 3h 4c 3c Jc 6d 4d Th Qh 3d 9c Kh Jh Ks 2h 6h 8s 7h 7s Tc Qc Qs 2s 8d 5s 9s Qd Ah 5c Td Round 5: 64bit: 0x2e57cdbac5d5fc79 0x1ae412eddd4103de 0x041a83f569d04daa 0x7522fc640b28eaf9 0x82c86c34d392edb1 0x3b1df82382217c5b Again: 0x2e57cdbac5d5fc79 0x1ae412eddd4103de 0x041a83f569d04daa 0x7522fc640b28eaf9 0x82c86c34d392edb1 0x3b1df82382217c5b Coins: THHHTHHHTTTHTHHHTTTTHTHHTTHTHTHHHTHHTHHHHHTHTHHHTHTTHHHTHTHTTHTTH 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 --> rolling dice used 33 random numbers Cards: 7c Td Jc 9c 3h Ad Qh Ks 4c 8s 5h 7s 6s Jh Kh 8h 3c Js 2d 3s 9h Tc 8d 7d Th 9s 5s 8c 3d 4s Ac Ts Kd 6d 2h 7h Qs 4h 6h 2c Kc 4d As 2s Qd Qc 9d 5d Ah 6c 5c Jd pcg-cpp-0.98.1/test-high/expected/check-pcg64_k32_oneseq.out000066400000000000000000000062521250047755200234330ustar00rootroot00000000000000pcg64_k32_oneseq: - result: 64-bit unsigned int - period: 2^2176 - size: 272 bytes Round 1: 64bit: 0x16877a0956ab7ab2 0x6c8007d328f335a7 0x38a4f59634854ee6 0xcc6f1d46b7d5fb7a 0x18042420cc04c23d 0x60251b7df26b98db Again: 0x16877a0956ab7ab2 0x6c8007d328f335a7 0x38a4f59634854ee6 0xcc6f1d46b7d5fb7a 0x18042420cc04c23d 0x60251b7df26b98db Coins: THHTHHHTHHHHTHHTTHHTTTTHTTTHHHHHHHTHHHHTTHTHHTTHTTHHTTTTHTTHTTHHT 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 --> rolling dice used 33 random numbers Cards: 5d Qs 8d 4h Qd 3c 8s Qh 7s 7c 2c Kc 6s 6d Ad Td Jh 9c Ac 2s Jd Ah 3h Kh Tc Th As 2h 2d 4s 9d Ks 3s Ts Jc 5h 9h 5c 7d 7h Qc 3d 5s 4c Kd 8c 6c 4d 8h Js 6h 9s Round 2: 64bit: 0xa0e8173ed367c2c3 0x0e3e8e318a71b21f 0x41fe7ffbc0a8ef66 0xc3b056e92077ff07 0xfa2d1bf9e4a0d18c 0x30bf40eb4388fd76 Again: 0xa0e8173ed367c2c3 0x0e3e8e318a71b21f 0x41fe7ffbc0a8ef66 0xc3b056e92077ff07 0xfa2d1bf9e4a0d18c 0x30bf40eb4388fd76 Coins: TTHHTTTHHHHTTTHHTHHTTTHTTTHHHHTHTTHHHHHHHTTTTTHTHHTHHTHTHTTTHHTHT 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 --> rolling dice used 33 random numbers Cards: Ts 3h 4h 6h Jd Th 5d 2d 9h 5s Ks Ah 8d 7s 9d Qh Kc 7c 7h 6c 2h Qc As Qs Ac Qd 8c Kd Kh 8s 2c Jc Td 9s 6d 4d 6s Jh 8h 2s 5c 4c 3d 3s 3c Js 9c 5h 4s Ad Tc 7d Round 3: 64bit: 0x7cbd07437e4bf6fd 0xf07ecbfe7bb74a5d 0x493b9a695358fe73 0x5b0a27f8ad68823d 0x8b6a1a1f164bc3d0 0x4a274448fa848752 Again: 0x7cbd07437e4bf6fd 0xf07ecbfe7bb74a5d 0x493b9a695358fe73 0x5b0a27f8ad68823d 0x8b6a1a1f164bc3d0 0x4a274448fa848752 Coins: TTTTTHTTHHTTHTTTHTTTHTTHHHTTTHTTTHHHHTHTTHHHTTTTHHHTTTHTHTTHHTHTT 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 --> rolling dice used 33 random numbers Cards: 4d Td Js Ks Tc Jc Ts Ad 9c Kc 7h 5h 3h 8d Th 8c 6d 6c 2h 9s 5c Ah 8s Qh 5s Kh 2d Qc 2c 3d 7s 3s 7d 6h Jd 4s 9h 6s Kd 5d Ac 2s Qd Jh 4c 3c 8h Qs 4h 9d 7c As Round 4: 64bit: 0x36759babce7820e1 0xd72e27aebd1bc4a4 0xb8a3a19fb66b260c 0x7469356680d0855b 0x458c7771c8dd99a0 0x137653a6303d2acf Again: 0x36759babce7820e1 0xd72e27aebd1bc4a4 0xb8a3a19fb66b260c 0x7469356680d0855b 0x458c7771c8dd99a0 0x137653a6303d2acf Coins: HTHTHTTHHHHHHHHTHTHHHTTHTTHHHHTTHHHHTTHHHHHHTTTTTTTTHTHTHTTTHTTTH 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 --> rolling dice used 33 random numbers Cards: 6h 7c 9d Jc 7h Qh Td 5d 5c 4h Jh 9s Ah Kd 6d Qs 2d Ac Jd 2s Qd 7s Ad 5h As Tc 2h 8c Qc 3s Kh 6c 3c 2c 9h Ts 4d 7d Th 6s Ks 4c 8h Js 8s 9c 8d 3h 4s 5s 3d Kc Round 5: 64bit: 0x67117ffc743ca9f6 0xadaae80721ded47b 0xd9f47206235ee034 0x0ef04a2a794ddff1 0x691eb88fb14af4c2 0xd3e84e7197b65752 Again: 0x67117ffc743ca9f6 0xadaae80721ded47b 0xd9f47206235ee034 0x0ef04a2a794ddff1 0x691eb88fb14af4c2 0xd3e84e7197b65752 Coins: THTTHHTTTTTHHHHHTTTTHHTTHHTHHHTHHHTHHHTHTTHHTTHHHHHHHTTTHTTTTHTTT 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 --> rolling dice used 33 random numbers Cards: 8c Jh 8d 3d Qh 4d 9d 5d Jc 7s 5c Ad 2d Qd Td 8h Kh 4s 5h Tc 9h Js 6s 8s 6d Th 2h 3h As 3s 9s Kc 6c 7d 9c Ts Kd 6h Qs Ah Ks Jd 2c 4h 4c Ac Qc 3c 7c 2s 7h 5s pcg-cpp-0.98.1/test-high/expected/check-pcg64_once_insecure.out000066400000000000000000000062751250047755200243100ustar00rootroot00000000000000pcg64_once_insecure: - result: 64-bit unsigned int - period: 2^64 (* 2^63 streams) - size: 16 bytes Round 1: 64bit: 0xe1cbc180b69606bb 0x6573bce7abaee684 0xc744f07442006076 0x9e9f98ccbd60b8fc 0xde693821ee9629ae 0x263cc2cdc66ebc25 Again: 0xe1cbc180b69606bb 0x6573bce7abaee684 0xc744f07442006076 0x9e9f98ccbd60b8fc 0xde693821ee9629ae 0x263cc2cdc66ebc25 Coins: THHHHTHHHHHTHTTHHHHTHHHTTTHTTHHTHTHTHHHHHHTHHTTHHTHHTHHTHHTTTHTTT 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 --> rolling dice used 33 random numbers Cards: Qd Qc Th 5s 6h 5c 2c 3s Ts Jh 9s Kh 4h Td Ad Ks 6c Ah 7h 8s 6s 8d 2d Jc 2h 4s 9d Kc Qs 4d 3c 2s Kd 4c Tc 9c 7d 9h 8c 5h As Qh 8h 6d 7c Js 3h 5d Ac Jd 7s 3d Round 2: 64bit: 0x6869deb01736aa1d 0x3976d7772b7283b6 0xf192d7e3c132c7d9 0x41b1b929e310e3c5 0x6a48bd0efb5c699d 0x856a779cda69bfd0 Again: 0x6869deb01736aa1d 0x3976d7772b7283b6 0xf192d7e3c132c7d9 0x41b1b929e310e3c5 0x6a48bd0efb5c699d 0x856a779cda69bfd0 Coins: HTTHTHHTTTTHHTTTTTTHHHHHHHHHTTTTTTHHTHTHTHHTHHHTHTHHTTTHHTHHTTHTT 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 --> rolling dice used 33 random numbers Cards: 4c Kh 5h Ts 8h 7c Tc 8d 5d Jc Js Jd Qh 9s 3h 9d 8s 2s Ks 2d 6d 6c 2c 4s 7h Ad 3c 7d Kd Qc Td 4d 7s 9c 8c 2h Kc 3d Jh Ac 4h 9h Qd Ah 5c Qs Th 5s 6s As 6h 3s Round 3: 64bit: 0x3f3dc8d4299c7a86 0x3e076e65a0310764 0x714322cce3e68f09 0xe88471f1e7176e5e 0x262c50673106006a 0xbcc19d6d0d1ca1c4 Again: 0x3f3dc8d4299c7a86 0x3e076e65a0310764 0x714322cce3e68f09 0xe88471f1e7176e5e 0x262c50673106006a 0xbcc19d6d0d1ca1c4 Coins: HHHHHHHHHHTHTHTTTTTHTHHTTTTHHHHHHTTHHHHHHHTHHHHHHTHTHTHHHTTTTTTTT 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 --> rolling dice used 33 random numbers Cards: 9h Kd Ks 6d 7h 4d 4s Qs 6c 6h 9d 9c Jc 5s Th 3s 2c 7c Qd Qh Qc 2h 4c 8s 9s 8d 8h 2d Kh 2s Ah Ac Ad 3d 7d 8c Jd Js 7s Jh 5c Ts 6s 3h 4h 3c As Td 5h 5d Kc Tc Round 4: 64bit: 0x24fccd9eb54476bf 0x2c32833537b2ca5d 0xfc4de62db8baf980 0x66208e6be0123658 0x9f4674d5c6e9485a 0x4e093c882196a5f3 Again: 0x24fccd9eb54476bf 0x2c32833537b2ca5d 0xfc4de62db8baf980 0x66208e6be0123658 0x9f4674d5c6e9485a 0x4e093c882196a5f3 Coins: HTTHTHHTHTHTHHHTHHHHHHHTTHHHHHTHHTTHTHTHTTHTTHHHHTTHHTTHHTTHHHHTT 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 --> rolling dice used 33 random numbers Cards: 4c Kh 2c Qd 2s Jc 8s 7c 6s 5d 2h 6d 9s Ks 8d 3s Qc 4d 8h Td Ad 6h 3d 7s As 5h 3c 7h Th 4h Js Ac 7d 2d 6c Qs 9h 3h 4s Qh 9d Jh Ts 5s Ah Jd 9c Kd Kc Tc 5c 8c Round 5: 64bit: 0x8205935a6e122e27 0x70e48fea82d8d2f6 0xa6114ae38986de05 0x05cd66f6baa6aae4 0x8aa8873d87856c4f 0xf9970ffeda4657e2 Again: 0x8205935a6e122e27 0x70e48fea82d8d2f6 0xa6114ae38986de05 0x05cd66f6baa6aae4 0x8aa8873d87856c4f 0xf9970ffeda4657e2 Coins: HHHTTHTHHTHHHHTHHTHTHTTTHHHHHHTHTHHTTHHTHTTHTTHHHHTHTHHTHHHTTHHHT 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 --> rolling dice used 33 random numbers Cards: 3c 6s 7d 4h 5h Qs 5c Js 8s 2c 6c Qd 4d 6d 6h Ks 3h Th Ts Ad 8c 2d 9s 3s Tc 5d Kh Jh 7h 9h Qc Kd Jd 9c 2s 7s Jc 5s Td 8h 8d As 9d Qh 3d 2h Ah Ac 4c Kc 7c 4s pcg-cpp-0.98.1/test-high/expected/check-pcg64_oneseq.out000066400000000000000000000062441250047755200227550ustar00rootroot00000000000000pcg64_oneseq: - result: 64-bit unsigned int - period: 2^128 - size: 16 bytes Round 1: 64bit: 0x287472e87ff5705a 0xbbd190b04ed0b545 0xb6cee3580db14880 0xbf5f7d7e4c3d1864 0x734eedbe7e50bbc5 0xa5b6b5f867691c77 Again: 0x287472e87ff5705a 0xbbd190b04ed0b545 0xb6cee3580db14880 0xbf5f7d7e4c3d1864 0x734eedbe7e50bbc5 0xa5b6b5f867691c77 Coins: HHTHHHTTHTHHTTTHHHTHHHTTTTTHHTHTTTTHHTHHTTTTTTHHTHTHTTTTTHTHHTTHT 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 --> rolling dice used 33 random numbers Cards: 9c 5h 7d 7c 4c 8d 7h Qc Kh 2d 3h 2h Qd Ts 3d Kc 9h Jc 6h 6d 8c 4d Qh As Jh 8s Th 5s 2c 9d Ac 4h Kd 5d 9s 6c 3s Ks Js Jd 7s 2s 3c Tc Qs 4s 8h 5c Ah 6s Td Ad Round 2: 64bit: 0x7d97ee72fb94fdf0 0xb35f07d53cc42b66 0x0854c5caec0c251f 0xf37961a645554320 0x1d1d213622351b24 0x6edbb396c73fb49f Again: 0x7d97ee72fb94fdf0 0xb35f07d53cc42b66 0x0854c5caec0c251f 0xf37961a645554320 0x1d1d213622351b24 0x6edbb396c73fb49f Coins: HHTTHHHTHHHHHTTHHHTHHTHTHTTTHHTHHHHHHTHTTHHHHHTHTTHTHHHTHHTTHHHHH 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 --> rolling dice used 33 random numbers Cards: Qh Ah 3c 6d 8s 3h Jh 8c 6s 9h 8d 3s 9c Ts Qd Kc Kh 4d 7c 5h Th 2s 2c 4c 6h Jd Td 2d Ks 5c 7h Qs 3d 4s 7d 5s 9d Ac 6c 9s 8h As Jc 7s 2h Tc Kd 4h Ad 5d Qc Js Round 3: 64bit: 0x187ee00430cec695 0x38efe3fb60c70613 0x3949bd01ef38c552 0xd3f1543a45f3b48f 0xfb81a0482dc602cd 0xb48e4f661e4c7fc5 Again: 0x187ee00430cec695 0x38efe3fb60c70613 0x3949bd01ef38c552 0xd3f1543a45f3b48f 0xfb81a0482dc602cd 0xb48e4f661e4c7fc5 Coins: THTTTHHTHHHHHHTHTTTTHHTHTHTHHHTHTTTTTHHTHTTTTTHTTTTTHHTHHHTTTTHHT 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 --> rolling dice used 33 random numbers Cards: 9c 4s 9d Kh Js 6c 4d 8h Qd 8d 5s 3d 6h 7s 9s Ks 2s 7h Ac Ad Kc 4c 5h Jd As Ah 8s 2h Jh 6s Th 2c Qc 8c 5d 9h 3h 4h Qh 3s Tc 5c 2d Qs 3c Ts Kd Jc 7c 6d 7d Td Round 4: 64bit: 0xd04c0a3a8cf6c571 0xbc94812fe9ec2c93 0x691f3e3aa2f42c77 0xb7188d5162d89a1e 0x17fbf02e08fee28a 0x1aa17486e288664f Again: 0xd04c0a3a8cf6c571 0xbc94812fe9ec2c93 0x691f3e3aa2f42c77 0xb7188d5162d89a1e 0x17fbf02e08fee28a 0x1aa17486e288664f Coins: THTHHHTTTHHHHHTTHHHHHTTHHTTHTHTTHHHHHTHTTHTTTTHTTTHTHHHHTTHHTTHTH 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 --> rolling dice used 33 random numbers Cards: 6d 4c 9c 7s Qs Qh 5d 5h Jd 8d 3c 3d 9h Th 7d Tc As 7h 9s 2d 2s Td 8s 4s 7c Qd Jc 5c 5s 2c 2h 6s 6c 4h Js Ks 8h 6h Jh Kh 4d 3s Ah 9d 3h Kc 8c Qc Kd Ts Ad Ac Round 5: 64bit: 0x10bda17a1292d5aa 0xf0cd1384e25b3497 0x8e592be49a6a6181 0x5edc4faf5cda5865 0xb2ecea43437a3f8c 0x98dbb99c3550f0e4 Again: 0x10bda17a1292d5aa 0xf0cd1384e25b3497 0x8e592be49a6a6181 0x5edc4faf5cda5865 0xb2ecea43437a3f8c 0x98dbb99c3550f0e4 Coins: HTHTHHHHHHTHHTTHHHTTTTTTHTTTHHHTHHHHHHHHHTTTTHHTTTHTHHHHTTHHHHTTH 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 --> rolling dice used 33 random numbers Cards: 3d 7h Jd 3h 5d 2s 7d 5s 9d 8s 4c 8c Jc Ah Tc Js Ad 5h 6h Th 7s Kd Qd 9h As 8d 3c 2d 2c Kh 9s 7c Ac 6c 9c 2h Qs 4h Ts 6s Ks Jh 5c 8h 3s 6d Kc 4d Td Qh Qc 4s pcg-cpp-0.98.1/test-high/expected/check-pcg64_oneseq_once_insecure.out000066400000000000000000000062601250047755200256540ustar00rootroot00000000000000pcg64_oneseq_once_insecure: - result: 64-bit unsigned int - period: 2^64 - size: 8 bytes Round 1: 64bit: 0x27a53829edf003a9 0xdf28458e5c04c31c 0x2756dc550bc36037 0xa10325553eb09ee9 0x40a0fccb8d9df09f 0x5c2047cfefb5e9ca Again: 0x27a53829edf003a9 0xdf28458e5c04c31c 0x2756dc550bc36037 0xa10325553eb09ee9 0x40a0fccb8d9df09f 0x5c2047cfefb5e9ca Coins: TTHHHTHHTTHHHTHTTHHTHHTTHHHTTHTTTTHHHTTHTHHHHTHTTTTTTHHHTTTHTTTTT 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 --> rolling dice used 33 random numbers Cards: 3d Ah 7d Kh Td Th 8h 5d Ac 7c Ts As 7s 2s 2c 4h 8s Kc 3c 5h 6s 9c 4s Js Kd Qc 3h 2d Jh 6d 7h 3s 9d Tc 5s 9s 9h 4d Ks Jd Qd Ad Qs Jc 8d 4c 6c Qh 8c 5c 6h 2h Round 2: 64bit: 0xbf1a2718f46a9ab3 0x400c010fa404b25f 0x3e6dcc00e4e9238d 0x2ef92088e248ee1f 0xc6ba2d56b70972a8 0x7e11c48b5ee4b511 Again: 0xbf1a2718f46a9ab3 0x400c010fa404b25f 0x3e6dcc00e4e9238d 0x2ef92088e248ee1f 0xc6ba2d56b70972a8 0x7e11c48b5ee4b511 Coins: HHTHTHTTHTTHTTTTHTTHHHTHHTHTHHHHTHHTTTTTHTHTTHHTTTHTTHTHTTHTTHTHT 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 --> rolling dice used 33 random numbers Cards: 9d Qs 4c 3s 7h 8d 3h Qd Jd 6s Ad Jh 5d Js 5s 8c 4h 5c 7s 8h Kc 9h Ac 9c 3c 2s Tc 7d Ah 6d Jc Ks 2d 2c 9s Th 8s Kh Ts 4d 6h Td Qh Kd 3d 6c 2h 5h 7c As Qc 4s Round 3: 64bit: 0xa23134099c2db545 0xfd4094498a894a69 0x1199f424f91baa00 0x6c1c7a2896530d0b 0x1b9ca95e37253136 0xc05c20630e73d51f Again: 0xa23134099c2db545 0xfd4094498a894a69 0x1199f424f91baa00 0x6c1c7a2896530d0b 0x1b9ca95e37253136 0xc05c20630e73d51f Coins: HHTTHTTTTTTHHHTHHHTHHTTTHTTHHHHHTHTTHHHTHTTTHHHHTTTTHHTTHTTHHHHTT 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 --> rolling dice used 33 random numbers Cards: Ac 7h Ts Kc 9d 7s Js 2h Th 9s 2s 6h 3h Jc 3s 2c 5h 5d Qd 8h 3d 5s 6c Qh 7c 8d 7d Td As Ah Ad 6s Ks 4c Jd 9c 3c 4d Jh 9h Qs Qc 2d Kh 5c 8c 8s 6d 4h 4s Tc Kd Round 4: 64bit: 0x61748befe0c9e052 0x9261b659354e4790 0xf5760c6a80d81414 0xe9f8cd09b4a145b6 0x63cea77be983a1c2 0xff19b1c85857ee53 Again: 0x61748befe0c9e052 0x9261b659354e4790 0xf5760c6a80d81414 0xe9f8cd09b4a145b6 0x63cea77be983a1c2 0xff19b1c85857ee53 Coins: THTHHHTHHHTTHTHTTTHHTHTTHTTHHHTHTHTHHHTTTHHHHHHHHTHTHHHHHTTTTTTTT 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 --> rolling dice used 33 random numbers Cards: Jd 6h 5d 8s 3c Qd 2c 9s Ks 4h Kd 3h 6s 5c Jh Tc 4c Kh 2s 7d 8d Qh As 9c Th 6c 9h 2h Qs 8c 7h 4s Js Ad 3d Jc Ac 7c 5h 2d Qc 6d Ah 7s Ts 3s 5s 8h Kc Td 9d 4d Round 5: 64bit: 0x36288c2f6a1fcaba 0x9761b19d77017828 0x4192af9e0d374ee5 0x3d3134763fbd6bbf 0x1fb46e26bd261bd6 0x2c22c75b821893ac Again: 0x36288c2f6a1fcaba 0x9761b19d77017828 0x4192af9e0d374ee5 0x3d3134763fbd6bbf 0x1fb46e26bd261bd6 0x2c22c75b821893ac Coins: HHHHHHTTHTHHTTHHHTTTHHHTHHTHHHHHHTTTHTTTHTTTTTTHTTTHTTHTTHTTHHHHH 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 --> rolling dice used 33 random numbers Cards: 9s Th 9d 8c Jc Td 7c 3c 7h 3h 7d 3s 8h Qs 6c Qd Ah Ad 4d 5h Jd Kh 8d Qc Ts 6s 9c 5s As Ac 4s 6h 3d Ks 4h 5d 2h 5c 2s 2c Tc Jh 9h Js 4c 6d 7s 2d Kc 8s Kd Qh pcg-cpp-0.98.1/test-high/expected/check-pcg8_once_insecure.out000066400000000000000000000053541250047755200242230ustar00rootroot00000000000000pcg8_once_insecure: - result: 8-bit unsigned int - period: 2^8 (* 2^7 streams) - size: 2 bytes Round 1: 8bit: 0xea 0x4d 0x8a 0x45 0x6b 0x23 0xcb 0xaa 0xf7 0x63 0xec 0x30 0x39 0xbc Again: 0xf7 0x63 0xec 0x30 0x39 0xbc 0x24 0xf4 0x82 0x85 0x8b 0x88 0x28 0x21 Coins: HTTHTHHTTHTHTHTTTHTHHHTHHHHTHHHHHTTHHTHTTTTTTTTTHTHHHHHHHTHTHTHTT 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 --> rolling dice used 34 random numbers Cards: 2c 6d 3c 4d Th Js 4s 8d 2d 9c 9h 3h 3d Td Tc 7c 5h 8c 5s 4h Qh 2s Ks 6h 7d Jh 5d 8s Qs As Ah 7h Ac 5c 8h Ts 9d Kd Kc Qd Ad 6s 2h Jd Kh 6c Jc 4c Qc 3s 7s 9s Round 2: 8bit: 0x98 0xfd 0x95 0x79 0xfc 0xf6 0x73 0x64 0x7d 0xf3 0x8e 0xa6 0x51 0xf1 Again: 0x7d 0xf3 0x8e 0xa6 0x51 0xf1 0x1f 0x4f 0x62 0x29 0x2e 0x01 0x05 0x72 Coins: THTTHTTTTHTHTTTHHHHTTHHTTTTTHTHTHTTTHHTHHTHHHTHTTTHTHHTHTHTHTHTHH 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 --> rolling dice used 34 random numbers Cards: Th 3d 5h 9h Kd 7s Ad 7c 2h Qs 6c Ac 7d Jd 4c Tc Ah Ts 2c As 4h 9c 6d Kh 9d 5d 3c Td 3s Jc 8h 2d 7h Qc 8c 6h 6s Kc 8s Qh 3h 4d Qd Ks 4s 5s 8d 2s Jh 5c Js 9s Round 3: 8bit: 0xfa 0xe0 0x07 0xaf 0x5d 0xc5 0x44 0xe8 0x89 0x68 0xa5 0xa2 0x2c 0x81 Again: 0x89 0x68 0xa5 0xa2 0x2c 0x81 0xe5 0xcf 0x54 0xb5 0x52 0x3e 0xb1 0xd1 Coins: TTHHTTTTHHHTHTHHTHHTHTTHHHTHHTHHTTTTTTHHHTTHTTHHHTTTHTTHTHHTTTHHH 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 --> rolling dice used 34 random numbers Cards: 6d 3d 4d 8d Ts 9d 4h 5h Js Kc Tc 2c Ah 9h Kd Jc As 5s Kh Ac 2h Ks 4s Ad 7c Qs Qh 7s 7h 8c 7d 9s Td 3h 6c 2s Th 5d 4c 3s 9c 5c Jd Jh 8s 8h 2d Qc Qd 3c 6h 6s Round 4: 8bit: 0x39 0xbc 0x24 0xf4 0x82 0x85 0x8b 0x88 0x28 0x21 0x2d 0x26 0x00 0x61 Again: 0x28 0x21 0x2d 0x26 0x00 0x61 0xba 0x77 0xbd 0x46 0x8c 0x71 0xdc 0x87 Coins: THTTTHTHHHTHHHHTHHHHHTTHHTHTTTTTTTTTHTHHHHHHHTHTHTHTTTHTHTTHHHHTT 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 --> rolling dice used 33 random numbers Cards: Ts Qd 7c Tc 8h 2d 7d 3s 2h 6h 6d Qs 5s Ad Qh 8s 3d Js Ac Kh Th 8d Kc 2c 9c 5c Td Jc Jd Kd 8c 3c 6s 4d 3h 9d 4s Ks 6c Qc 9h 5h 7s 2s 4c As 7h 9s 5d Ah 4h Jh Round 5: 8bit: 0xa6 0x51 0xf1 0x1f 0x4f 0x62 0x29 0x2e 0x01 0x05 0x72 0xe4 0xdb 0xc8 Again: 0x01 0x05 0x72 0xe4 0xdb 0xc8 0x86 0x4b 0xa0 0x1e 0x9e 0xb4 0xa9 0xb0 Coins: HTTTHHHHTTHHTTTTTHTHTHTTTHHTHHTHHHTHTTTHTHHTHTHTHTHTHHHHTHHTTHTTT 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 --> rolling dice used 34 random numbers Cards: Qs Jc Kd Th 8c 7d Qc Qd 4c 2c 2s 9h 9s 5s Jd 2h As 8s 5d Td 7c Ts 9c Js 7h 5c 4s Ac 6c 6s 9d Tc 3h Ad 3d 8h Jh Qh 4h 4d Kh 2d 5h 6d 8d 6h Ks 7s Ah 3c 3s Kc pcg-cpp-0.98.1/test-high/expected/check-pcg8_oneseq_once_insecure.out000066400000000000000000000053411250047755200255710ustar00rootroot00000000000000pcg8_oneseq_once_insecure: - result: 8-bit unsigned int - period: 2^8 - size: 1 bytes Round 1: 8bit: 0x2e 0x44 0x2f 0x91 0x50 0x84 0xcb 0x60 0x4b 0xe5 0x5f 0x97 0x0f 0x58 Again: 0x4b 0xe5 0x5f 0x97 0x0f 0x58 0x24 0xfd 0x9c 0x42 0x6c 0xd7 0x25 0xc2 Coins: HHTHTTTHTHHTTTTHTTHHHHHTHHHTTTHHHTHHHTTTTTTHHHTTHTHTTTHHHHTHTHTHT 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 --> rolling dice used 36 random numbers Cards: 6s Jc 9h Kc 4h 4c 4s As Ah 4d Ks Js 6d Qc 5h 9d 3c 5c 9c 6h 7h 3d 8s 5d 6c 2c Ad 9s Ts 2s 8c Kd Qs Kh 7s 2h 3h 8h Tc Th Td Qd Ac 2d 8d Qh 5s Jd 7c Jh 3s 7d Round 2: 8bit: 0x85 0x31 0x8f 0xae 0xda 0x7d 0x34 0x1a 0x61 0xff 0x78 0x7a 0x10 0x62 Again: 0x61 0xff 0x78 0x7a 0x10 0x62 0x5d 0x6f 0x87 0x94 0xd0 0x6b 0xb7 0xc8 Coins: THHHHHTTHHTHTTTHTHHHHHHTHHTTHTHTTHHHTTHHHHTTTHHHHTTHHHTTHTTHHTTHT 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 --> rolling dice used 33 random numbers Cards: Ac 6d Ah 6c Kh 2s As 8c 5h 8s 9h Kc Th 2h 7d 8d 7c Qs 3h Js 3d 2c 7h 6s 5d Jd Jc 5c Ad Ts Qc 2d 7s 4h Qd Ks Kd 4d 4s 9c 6h 8h Tc Jh Td 3c 3s Qh 9d 9s 4c 5s Round 3: 8bit: 0xaf 0xed 0xdc 0x01 0x83 0x17 0x02 0xce 0xa2 0xaa 0x5e 0xa0 0xd4 0xee Again: 0xa2 0xaa 0x5e 0xa0 0xd4 0xee 0x3a 0x2b 0x3e 0xf4 0x9f 0x3c 0x0d 0x7e Coins: HTTTTHTTHHTHTTTTTHTHHHTHTTTHHTHTHTTTHHTHTHTTHHTTHHTTHHHTHHTTHHHHT 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 --> rolling dice used 33 random numbers Cards: Js 3d Ad 6c 7d 9d Jc Kc 9s 6s As Th 4c 2s Jh Ah 5d 3s 3h 9c Kh Ac Jd 8d 8s 7s Td 2d 2h 2c 8c 3c 7c 4d Tc 5c 6h Ks 7h 4h Qs Qh 4s Ts Kd 8h 9h Qc 5h 5s 6d Qd Round 4: 8bit: 0x0f 0x58 0x24 0xfd 0x9c 0x42 0x6c 0xd7 0x25 0xc2 0x2d 0xf3 0x08 0xbf Again: 0x25 0xc2 0x2d 0xf3 0x08 0xbf 0x48 0xc6 0xe0 0xe1 0x8c 0x29 0xb9 0x56 Coins: TTTHTTHHHHHTHHHTTTHHHTHHHTTTTTTHHHTTHTHTTTHHHHTHTHTHTTTTHHHTHHTHH 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 --> rolling dice used 34 random numbers Cards: 8s 7s 9h 3h 4c Ts 6h 6s Jd 8h Qc 4d Th 7d 2s 5s 3d Jh Ad As 8d 9s 2h Kh 9c 2d 6c Qs Kc Qd Qh 8c 4s Js 3s 7h 5h 5d 6d 9d 7c Jc 4h Td Ah Ks Ac 5c 2c Tc Kd 3c Round 5: 8bit: 0x1a 0x61 0xff 0x78 0x7a 0x10 0x62 0x5d 0x6f 0x87 0x94 0xd0 0x6b 0xb7 Again: 0x6f 0x87 0x94 0xd0 0x6b 0xb7 0xc8 0x2c 0xb3 0x75 0xc3 0xd3 0x39 0x76 Coins: THHTHTTTHTHHHHHHTHHTTHTHTTHHHTTHHHHTTTHHHHTTHHHTTHTTHHTTHTHHHHHTT 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 --> rolling dice used 33 random numbers Cards: 3s 9s Kc 7d 3c 5h 9d 6c 7c 8d Ah Kh Qs 7s 8h Th 8c 6s Tc 7h Jh 2s 5s Jc Qc 2d As 3d Js 6h 6d 3h Qh Ac Td 5d Jd Kd Ks 9h 2h Ts 2c 4s 5c Qd 9c 4c 4d Ad 4h 8s pcg-cpp-0.98.1/test-high/pcg-test-noadvance.cpp000066400000000000000000000123071250047755200212360ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This file is based on the demo program for the C generation schemes. * It shows some basic generation tasks. */ #include #include #include #include #include #include #include #include #include #include // for random_device #include "pcg_random.hpp" // This code can be compiled with the preprocessor symbol RNG set to the // PCG generator you'd like to test. #ifndef RNG #define RNG pcg32 #define TWO_ARG_INIT 1 #endif #define STRINGIFY_IMPL(x) #x #define STRINGIFY(x) STRINGIFY_IMPL(x) using namespace std; using pcg_extras::operator<<; #if !PCG_EMULATED_128BIT_MATH || !AWKWARD_128BIT_CODE int main(int argc, char** argv) { // Read command-line options int rounds = 5; bool nondeterministic_seed = false; ++argv; --argc; if (argc > 0 && strcmp(argv[0], "-r") == 0) { nondeterministic_seed = true; ++argv; --argc; } if (argc > 0) { rounds = atoi(argv[0]); } /* Many of the generators can be initialized with two arguments; the second * one specifies the stream. */ #if TWO_ARG_INIT RNG rng(42u, 54u); #else RNG rng(42u); #endif if (nondeterministic_seed) { // Seed with external entropy from std::random_device (a handy // utility provided by pcg_extras). rng.seed(pcg_extras::seed_seq_from()); } constexpr auto bits = sizeof(RNG::result_type) * CHAR_BIT; constexpr int how_many_nums = bits <= 8 ? 14 : bits <= 16 ? 10 : 6; constexpr int wrap_nums_at = bits > 64 ? 2 : bits > 32 ? 3 : how_many_nums; cout << STRINGIFY(RNG) << ":\n" // << " - aka: " << pcg_extras::printable_typename() // ^-- we skip this line because the output is long, scary, ugly, and // and varies depending on the platform << " - result: " << bits << "-bit unsigned int\n" << " - period: 2^" << RNG::period_pow2(); if (RNG::streams_pow2() > 0) cout << " (* 2^" << RNG::streams_pow2() << " streams)"; cout << "\n - size: " << sizeof(RNG) << " bytes\n\n"; for (int round = 1; round <= rounds; ++round) { printf("Round %d:\n", round); /* Make some N-bit numbers */ cout << setw(4) << setfill(' ') << bits << "bit:"; for (int i = 0; i < how_many_nums; ++i) { if (i > 0 && i % wrap_nums_at == 0) cout << "\n\t"; cout << " 0x" << hex << setfill('0') << setw(sizeof(RNG::result_type)*2) << rng(); } cout << endl; /* Toss some coins */ cout << " Coins: "; for (int i = 0; i < 65; ++i) cout << (rng(2) ? "H" : "T"); cout << endl; /* Roll some dice */ printf(" Rolls:"); for (int i = 0; i < 33; ++i) cout << " " << (uint32_t(rng(6)) + 1); cout << endl; /* Deal some cards using pcg_extras::shuffle, which follows * the algorithm for shuffling that most programmers would expect. * (It's unspecified how std::shuffle works.) */ enum { SUITS = 4, NUMBERS = 13, CARDS = 52 }; char cards[CARDS]; iota(begin(cards), end(cards), 0); pcg_extras::shuffle(begin(cards), end(cards), rng); /* Output the shuffled deck */ printf(" Cards:"); static const signed char number[] = {'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'}; static const signed char suit[] = {'h', 'c', 'd', 's'}; int i = 0; for (auto card : cards) { ++i; cout << " " << number[card / SUITS] << suit[card % SUITS]; if (i % 22 == 0) cout << "\n\t"; } cout << "\n" << endl; } return 0; } #else // i.e. PCG_EMULATED_128BIT_MATH && AWKWARD_128BIT_CODE int main() { // It's not that it *can't* be done, it just requires either C++14-style // constexpr or some things not to be declared const. cout << "Sorry, " STRINGIFY(RNG) " not supported with emulated 128-bit math" << endl; } #endif pcg-cpp-0.98.1/test-high/pcg-test.cpp000066400000000000000000000132141250047755200173000ustar00rootroot00000000000000/* * PCG Random Number Generation for C++ * * Copyright 2014 Melissa O'Neill * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * For additional information about the PCG random number generation scheme, * including its license and other licensing options, visit * * http://www.pcg-random.org */ /* * This file is based on the demo program for the C generation schemes. * It shows some basic generation tasks. */ #include #include #include #include #include #include #include #include #include #include // for random_device #include "pcg_random.hpp" // This code can be compiled with the preprocessor symbol RNG set to the // PCG generator you'd like to test. #ifndef RNG #define RNG pcg32 #define TWO_ARG_INIT 1 #endif #define STRINGIFY_IMPL(x) #x #define STRINGIFY(x) STRINGIFY_IMPL(x) using namespace std; using pcg_extras::operator<<; #if !PCG_EMULATED_128BIT_MATH || !AWKWARD_128BIT_CODE int main(int argc, char** argv) { // Read command-line options int rounds = 5; bool nondeterministic_seed = false; ++argv; --argc; if (argc > 0 && strcmp(argv[0], "-r") == 0) { nondeterministic_seed = true; ++argv; --argc; } if (argc > 0) { rounds = atoi(argv[0]); } /* Many of the generators can be initialized with two arguments; the second * one specifies the stream. */ #if TWO_ARG_INIT RNG rng(42u, 54u); #else RNG rng(42u); #endif if (nondeterministic_seed) { // Seed with external entropy from std::random_device (a handy // utility provided by pcg_extras). rng.seed(pcg_extras::seed_seq_from()); } constexpr auto bits = sizeof(RNG::result_type) * CHAR_BIT; constexpr int how_many_nums = bits <= 8 ? 14 : bits <= 16 ? 10 : 6; constexpr int wrap_nums_at = bits > 64 ? 2 : bits > 32 ? 3 : how_many_nums; cout << STRINGIFY(RNG) << ":\n" // << " - aka: " << pcg_extras::printable_typename() // ^-- we skip this line because the output is long, scary, ugly, and // and varies depending on the platform << " - result: " << bits << "-bit unsigned int\n" << " - period: 2^" << RNG::period_pow2(); if (RNG::streams_pow2() > 0) cout << " (* 2^" << RNG::streams_pow2() << " streams)"; cout << "\n - size: " << sizeof(RNG) << " bytes\n\n"; for (int round = 1; round <= rounds; ++round) { printf("Round %d:\n", round); /* Make some N-bit numbers */ cout << setw(4) << setfill(' ') << bits << "bit:"; for (int i = 0; i < how_many_nums; ++i) { if (i > 0 && i % wrap_nums_at == 0) cout << "\n\t"; cout << " 0x" << hex << setfill('0') << setw(sizeof(RNG::result_type)*2) << rng(); } cout << endl; cout << " Again:"; rng.backstep(6); for (int i = 0; i < how_many_nums; ++i) { if (i > 0 && i % wrap_nums_at == 0) cout << "\n\t"; cout << " 0x" << hex << setfill('0') << setw(sizeof(RNG::result_type)*2) << rng(); } cout << dec << endl; /* Toss some coins */ cout << " Coins: "; for (int i = 0; i < 65; ++i) cout << (rng(2) ? "H" : "T"); cout << endl; RNG rng_copy{rng}; /* Roll some dice */ printf(" Rolls:"); for (int i = 0; i < 33; ++i) cout << " " << (uint32_t(rng(6)) + 1); cout << "\n --> rolling dice used " << (rng - rng_copy) << " random numbers" << endl; /* Deal some cards using pcg_extras::shuffle, which follows * the algorithm for shuffling that most programmers would expect. * (It's unspecified how std::shuffle works.) */ enum { SUITS = 4, NUMBERS = 13, CARDS = 52 }; char cards[CARDS]; iota(begin(cards), end(cards), 0); pcg_extras::shuffle(begin(cards), end(cards), rng); /* Output the shuffled deck */ printf(" Cards:"); static const signed char number[] = {'A', '2', '3', '4', '5', '6', '7', '8', '9', 'T', 'J', 'Q', 'K'}; static const signed char suit[] = {'h', 'c', 'd', 's'}; int i = 0; for (auto card : cards) { ++i; cout << " " << number[card / SUITS] << suit[card % SUITS]; if (i % 22 == 0) cout << "\n\t"; } cout << "\n" << endl; } return 0; } #else // i.e. PCG_EMULATED_128BIT_MATH && AWKWARD_128BIT_CODE int main() { // It's not that it *can't* be done, it just requires either C++14-style // constexpr or some things not to be declared const. cout << "Sorry, " STRINGIFY(RNG) " not supported with emulated 128-bit math" << endl; } #endif pcg-cpp-0.98.1/test-high/run-tests.sh000077500000000000000000000072001250047755200173470ustar00rootroot00000000000000#!/bin/sh # # PCG Random Number Generation for C. # # Copyright 2014 Melissa O'Neill # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # For additional information about the PCG random number generation scheme, # including its license and other licensing options, visit # # http://www.pcg-random.org # echo Performing a quick sanity check... mkdir -p actual rm -f actual/* ./check-pcg32 > actual/check-pcg32.out ./check-pcg32_oneseq > actual/check-pcg32_oneseq.out ./check-pcg32 > /dev/null ./check-pcg32_fast > actual/check-pcg32_fast.out ./check-pcg64 > actual/check-pcg64.out ./check-pcg64_oneseq > actual/check-pcg64_oneseq.out ./check-pcg64_unique > /dev/null ./check-pcg64_fast > actual/check-pcg64_fast.out ./check-pcg8_once_insecure > actual/check-pcg8_once_insecure.out ./check-pcg16_once_insecure > actual/check-pcg16_once_insecure.out ./check-pcg32_once_insecure > actual/check-pcg32_once_insecure.out ./check-pcg64_once_insecure > actual/check-pcg64_once_insecure.out ./check-pcg128_once_insecure > actual/check-pcg128_once_insecure.out ./check-pcg8_oneseq_once_insecure > actual/check-pcg8_oneseq_once_insecure.out ./check-pcg16_oneseq_once_insecure > actual/check-pcg16_oneseq_once_insecure.out ./check-pcg32_oneseq_once_insecure > actual/check-pcg32_oneseq_once_insecure.out ./check-pcg64_oneseq_once_insecure > actual/check-pcg64_oneseq_once_insecure.out ./check-pcg128_oneseq_once_insecure > actual/check-pcg128_oneseq_once_insecure.out ./check-pcg32_k2 > actual/check-pcg32_k2.out ./check-pcg32_k2_fast > actual/check-pcg32_k2_fast.out ./check-pcg32_k64 > actual/check-pcg32_k64.out ./check-pcg32_k64_oneseq > actual/check-pcg32_k64_oneseq.out ./check-pcg32_k64_fast > actual/check-pcg32_k64_fast.out ./check-pcg32_c64 > actual/check-pcg32_c64.out ./check-pcg32_c64_oneseq > actual/check-pcg32_c64_oneseq.out ./check-pcg32_c64_fast > actual/check-pcg32_c64_fast.out ./check-pcg64_k32 > actual/check-pcg64_k32.out ./check-pcg64_k32_oneseq > actual/check-pcg64_k32_oneseq.out ./check-pcg64_k32_fast > actual/check-pcg64_k32_fast.out ./check-pcg64_c32 > actual/check-pcg64_c32.out ./check-pcg64_c32_oneseq > actual/check-pcg64_c32_oneseq.out ./check-pcg64_c32_fast > actual/check-pcg64_c32_fast.out ./check-pcg32_k1024 > actual/check-pcg32_k1024.out ./check-pcg32_k1024_fast > actual/check-pcg32_k1024_fast.out ./check-pcg32_c1024 > actual/check-pcg32_c1024.out ./check-pcg32_c1024_fast > actual/check-pcg32_c1024_fast.out ./check-pcg64_k1024 > actual/check-pcg64_k1024.out ./check-pcg64_k1024_fast > actual/check-pcg64_k1024_fast.out ./check-pcg64_c1024 > actual/check-pcg64_c1024.out ./check-pcg64_c1024_fast > actual/check-pcg64_c1024_fast.out ./check-pcg32_k16384 > actual/check-pcg32_k16384.out ./check-pcg32_k16384_fast > actual/check-pcg32_k16384_fast.out find actual -type f -size -80c -delete if diff -ru -x .gitignore expected actual then echo All tests succeeded. else echo '' if diff -x "*-pcg64_[ck]*.out" \ -x "*-pcg128_[ck]*.out" -ru expected actual > /dev/null then echo All tests except tests awkward tests with 128-bit math succceed. else echo ERROR: Some tests failed. fi fi