diff options
| author | Syndamia <kamen@syndamia.com> | 2026-05-23 09:56:17 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2026-05-23 09:56:17 +0300 |
| commit | 7e0b603b78adf4c1704b757da05d085e03afe5f6 (patch) | |
| tree | 558a05e8ca9c0c7cd2bd27df9d9ed0404f4c66d6 /BigInt.h | |
| parent | 72f791227cf3f0e835e62ff22953c005a40882c6 (diff) | |
| download | foollib-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.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 */ |
