compiles with tests, milestones: chain add, chain sub

This commit is contained in:
2026-07-30 11:29:22 -06:00
parent dfd4b7e98f
commit 22b86a602f
7 changed files with 481 additions and 13 deletions
+15 -1
View File
@@ -15,7 +15,7 @@ namespace bigmath {
private:
u8 digits[128];
u8 digits[64];
public:
@@ -23,6 +23,8 @@ namespace bigmath {
segment(u64 n);
segment(const segment& s);
~segment();
public:
@@ -31,10 +33,22 @@ namespace bigmath {
void set(u8 i, u8 n);
u8 add(const segment& s, u8 carry);
u8 sub(const segment& s, u8 borrow);
i8 compare(const segment& s) const;
bool isZero() const noexcept;
public:
const u8* bytes() const;
const u8* begin() const;
const u8* end() const;
operator std::string() const;
};