ranlux48_base.pass.cpp 653 B

12345678910111213141516171819202122232425
  1. //===----------------------------------------------------------------------===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. // <random>
  9. // typedef subtract_with_carry_engine<uint_fast64_t, 48, 5, 12> ranlux48_base;
  10. #include <random>
  11. #include <cassert>
  12. #include "test_macros.h"
  13. int main(int, char**)
  14. {
  15. std::ranlux48_base e;
  16. e.discard(9999);
  17. assert(e() == 61839128582725ull);
  18. return 0;
  19. }