diff options
author | Ian Jauslin <ian@jauslin.org> | 2022-05-26 20:54:30 -0400 |
---|---|---|
committer | Ian Jauslin <ian@jauslin.org> | 2022-05-26 21:06:09 -0400 |
commit | 77043e249cf49fd533a1ffd6f53c0b6d6fcaaba8 (patch) | |
tree | 38ea6e714d44b996ea37a9d32a49effa62d3c6ba /src/int_tools.h | |
parent | 480ce57afa138d0daac4ae750a63ac2ee9e56bd4 (diff) |
Make N be the smallest power of 2 larger than 3*K+1
Diffstat (limited to 'src/int_tools.h')
-rw-r--r-- | src/int_tools.h | 10 |
1 files changed, 10 insertions, 0 deletions
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 |