From 77043e249cf49fd533a1ffd6f53c0b6d6fcaaba8 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Thu, 26 May 2022 20:54:30 -0400 Subject: Make N be the smallest power of 2 larger than 3*K+1 --- src/int_tools.h | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/int_tools.h (limited to 'src/int_tools.h') diff --git a/src/int_tools.h b/src/int_tools.h new file mode 100644 index 0000000..ab008f6 --- /dev/null +++ b/src/int_tools.h @@ -0,0 +1,10 @@ +#ifndef INTTOOLS_H +#define INTTOOLS_H + +// return smallest power of 2 that is larger than x +int smallest_pow2(int x); + +// integer power +int ipow(int x, int n); + +#endif -- cgit v1.2.3-54-g00ecf