/* * Copyright (C) 2020-2021 Sebastiano Vigna * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 3 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . * */ #include /* The current state of the generator. */ uint64_t x = 1; uint64_t c = 0; static uint64_t inline next(void) { const __uint128_t t = 0xfffb81b5b27b3320 * (__uint128_t)x + c; x = 0x5dc261281592a489 * (uint64_t)t; c = (t + 0xe735ee47 * (__uint128_t)x) >> 64; return x; } #include "harness.c"