This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright 2024 Igor Burago. Released under the ISC License. | |
#include <math.h> // for rank_partition() | |
#include <stddef.h> // ptrdiff_t | |
#include <stdint.h> | |
#include <string.h> // memcpy(), memmove(), memset() | |
// Built-in u128 is not strictly required, but it makes the Mcg64 RNG simpler. | |
typedef unsigned __int128 uint128_t; |