aboutsummaryrefslogtreecommitdiff
path: root/BigInt.h
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2026-05-23 09:56:17 +0300
committerSyndamia <kamen@syndamia.com>2026-05-23 09:56:17 +0300
commit7e0b603b78adf4c1704b757da05d085e03afe5f6 (patch)
tree558a05e8ca9c0c7cd2bd27df9d9ed0404f4c66d6 /BigInt.h
parent72f791227cf3f0e835e62ff22953c005a40882c6 (diff)
downloadfoollib-7e0b603b78adf4c1704b757da05d085e03afe5f6.tar
foollib-7e0b603b78adf4c1704b757da05d085e03afe5f6.tar.gz
foollib-7e0b603b78adf4c1704b757da05d085e03afe5f6.zip
feat(BigInt): Implement bit shifts and add math in example
Diffstat (limited to 'BigInt.h')
-rw-r--r--BigInt.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/BigInt.h b/BigInt.h
index 2324143..913e249 100644
--- a/BigInt.h
+++ b/BigInt.h
@@ -9,6 +9,7 @@ typedef void* BigInt;
BigInt B_new(MemoryManager *mm, int value);
BigInt B_newstr(MemoryManager *mm, const char* str);
+BigInt B_newbytes(MemoryManager *mm, usize bytes);
BigInt B_dup(MemoryManager *mm, BigInt bigint);
BigInt B_newsum(MemoryManager *mm, BigInt a, BigInt b);
@@ -22,6 +23,8 @@ Result B_free(BigInt *bigint);
Result B_sum(BigInt *a, BigInt b);
Result B_sub(BigInt *a, BigInt b);
+Result B_rshift(BigInt *x, usize shift);
+Result B_lshift(BigInt *x, usize shift);
/* Get */