Commit graph

14 commits

Author SHA1 Message Date
f4f620436c abacus: bignum: add sqrt 2021-08-22 13:58:43 +02:00
5bc3963317 abacus: bignum: add exponentiation 2021-08-22 13:55:12 +02:00
4e3d53ecd4 abacus: bignum: add division & modulo
Like the C language, the `%` operator is rather the remainder, such that
`(a/b)*b + (a%b) = a`.

I still call it modulo though...
2021-08-22 13:55:12 +02:00
2489ce19b2 abacus: bignum: put sign checks in helper methods
Make them public because they can be useful in consumers of the library.
2021-08-21 01:31:49 +02:00
4a4b9f361c abacus: bignum: add multiplication 2021-08-21 01:31:48 +02:00
d40c109fb7 abacus: bignum: add input operator 2021-08-21 01:31:48 +02:00
fe01661613 abacus: bignum: add addition & substraction 2021-08-21 01:31:39 +02:00
6f7e1102db abacus: bignum: add default constructor 2021-08-20 22:20:45 +02:00
ad5092ea8d abacus: bignum: add output operator 2021-08-20 22:20:45 +02:00
0a5fb471e4 abacus: bignum: add unary operators 2021-08-20 22:20:45 +02:00
2600eb2ba7 abacus: bignum: add order comparisons 2021-08-20 22:20:45 +02:00
17bd51d197 abacus: bignum: add equality comparisons 2021-08-20 22:20:45 +02:00
2cff603a48 abacus: bignum: add is_canonicalized predicate
Useful when debugging.
2021-08-20 22:20:45 +02:00
12c8b6b114 abacus: add initial bignum library 2021-08-20 22:20:45 +02:00