diff options
author | Joel Kronqvist <joelkronqvist@proton.me> | 2024-04-07 13:31:07 +0300 |
---|---|---|
committer | Joel Kronqvist <joelkronqvist@proton.me> | 2024-04-07 13:41:46 +0300 |
commit | 4ff6a08d73f0ef1e2fcb7a93a74cc6fa66c24e2b (patch) | |
tree | 40694627aac44a3f1eb52293b830337b81af69fb /intmath.c | |
parent | f975594e55bdc05ee436bc7bdcd6e09aec5357b1 (diff) | |
download | stdu-4ff6a08d73f0ef1e2fcb7a93a74cc6fa66c24e2b.tar.gz stdu-4ff6a08d73f0ef1e2fcb7a93a74cc6fa66c24e2b.zip |
Bigger `bytes_read` & removed redundant code handling impossible signed `bytes_read`
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); } |