From 7692c0405784c250f2dcccd97d718748e8a59a65 Mon Sep 17 00:00:00 2001 From: Kittycannon Date: Tue, 18 Aug 2026 00:38:30 -0600 Subject: [PATCH] some other --- src/bigmath/chain/segment.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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;