diff --git a/src/bigmath/chain/segment.hpp b/src/bigmath/chain/segment.hpp index 402575d..8c86552 100644 --- a/src/bigmath/chain/segment.hpp +++ b/src/bigmath/chain/segment.hpp @@ -35,12 +35,26 @@ namespace bigmath { void set(u8 i, u8 n); + segment extract(u8 from, u8 to, u8 offset) const; + + void shift_right(u8 places); + + void shift_left(u8 places); + u8 add(const segment& s, u8 carry); u8 sub(const segment& s, u8 borrow); std::array mul_long(const segment& s) const; + std::array mul_karatsuba(const segment& s) const; + + div_result div_long(const segment& s) const; + + segment div_newtonraphson(const segment& s) const; + + segment mod_long(const segment& s) const; + i8 compare(const segment& s) const; bool isZero() const noexcept;