diff options
Diffstat (limited to 'intmath.c')
-rw-r--r-- | intmath.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -14,6 +14,15 @@ int int_pown(unsigned int base, unsigned int exp) { return res; } +unsigned long long ull_pown(unsigned int base, unsigned int exp) { + unsigned long long res = 1; + while (exp > 0) { + res *= base; + exp--; + } + return res; +} + int int_pow10(unsigned int exp) { return int_pown(10, exp); } |