From 3fe8ee352845741d97a76e2ed6a390cb1481d755 Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Sat, 16 Nov 2024 21:43:46 +0100 Subject: minor changes --- test/util.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/util.h') diff --git a/test/util.h b/test/util.h index 0c14ff8..e0d9b57 100644 --- a/test/util.h +++ b/test/util.h @@ -10,6 +10,14 @@ namespace INT {constexpr int INF = 0x3FFF'FFFF;} namespace LL {constexpr ll INF = 0x3FFF'FFFF'FFFF'FFFFll;} namespace LD {constexpr ld INF = numeric_limits::infinity();} +template +T _lg_check(T n) { + assert(n > 0); + return __lg(n); +} + +#define __lg _lg_check + namespace details { template bool isPrime(T x) { -- cgit v1.2.3