diff options
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 |