Start of core:math/bigint

We have:
- `init` to create a new `Int`
- `init(from_integer)` to create a new `Int` and set it to `from_integer`.
- `set(Int, from_integer)` to set an `Int` to `from_integer`
- `add(dest, a, b)` to add `a` and `b` into `dest`.
- `sub(dest, a, b)` to subtract `b` from `a` and put the result in `dest`.

And a few helper functions, like:
- `is_zero`, `is_negative`, ...
- `grow`, `shrink`, `clear`, `zero`
This commit is contained in:
Jeroen van Rijn
2021-08-11 20:59:50 +02:00
parent 7afc367275
commit 18dda6ff9d
6 changed files with 693 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
@echo off
odin run . -vet