From 4ff6a08d73f0ef1e2fcb7a93a74cc6fa66c24e2b Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sun, 7 Apr 2024 13:31:07 +0300 Subject: Bigger `bytes_read` & removed redundant code handling impossible signed `bytes_read` --- intmath.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'intmath.c') diff --git a/intmath.c b/intmath.c index 5d70860..9e1f3ed 100644 --- a/intmath.c +++ b/intmath.c @@ -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); } -- cgit v1.2.3