23 :
data{ static_cast<uint32_t>(
a), static_cast<uint32_t>(
a >> 32), 0, 0 }
26 constexpr uint128_t(
const uint32_t
a,
const uint32_t
b,
const uint32_t c,
const uint32_t d)
35 static constexpr uint128_t from_uint64(
const uint64_t
a)
37 return {
static_cast<uint32_t
>(
a),
static_cast<uint32_t
>(
a >> 32), 0, 0 };
40 constexpr explicit operator uint64_t() {
return (
static_cast<uint64_t
>(
data[1]) << 32) +
data[0]; }
45 explicit constexpr operator bool()
const {
return static_cast<bool>(
data[0]); };
47 template <std::
integral T>
explicit constexpr operator T()
const {
return static_cast<T
>(
data[0]); };
49 [[nodiscard]]
constexpr bool get_bit(uint64_t bit_index)
const;
50 [[nodiscard]]
constexpr uint64_t
get_msb()
const;
52 [[nodiscard]]
constexpr uint128_t slice(uint64_t start, uint64_t end)
const;
73 constexpr bool operator!()
const;
75 constexpr bool operator>(
const uint128_t& other)
const;
76 constexpr bool operator<(
const uint128_t& other)
const;
77 constexpr bool operator>=(
const uint128_t& other)
const;
78 constexpr bool operator<=(
const uint128_t& other)
const;
80 static constexpr size_t length() {
return 128; }
84 *
this = *
this + other;
89 *
this = *
this - other;
94 *
this = *
this * other;
99 *
this = *
this / other;
104 *
this = *
this % other;
121 *
this = *
this & other;
126 *
this = *
this ^ other;
131 *
this = *
this | other;
137 *
this = *
this >> other;
142 *
this = *
this << other;
153 [[nodiscard]]
static constexpr uint32_t addc_discard_hi(uint32_t
a, uint32_t
b, uint32_t carry_in);
154 [[nodiscard]]
static constexpr uint32_t sbb_discard_hi(uint32_t
a, uint32_t
b, uint32_t borrow_in);
157 [[nodiscard]]
static constexpr uint32_t mac_discard_hi(uint32_t
a, uint32_t
b, uint32_t c, uint32_t carry_in);
166 std::ios_base::fmtflags f(os.flags());
202using numeric::uint128_t;
211 std::ios_base::fmtflags f(
os.flags());
const std::vector< FF > data
uint8_t const size_t length
bool operator==(ecdsa_signature const &lhs, ecdsa_signature const &rhs)
void read(B &it, uint256_t &value)
std::ostream & operator<<(std::ostream &os, uint256_t const &a)
constexpr T get_msb(const T in)
void write(B &it, uint256_t const &value)
Univariate< Fr, domain_end, domain_start, skip_count > operator*(const Fr &ff, const Univariate< Fr, domain_end, domain_start, skip_count > &uv)
C slice(C const &container, size_t start)
Univariate< Fr, domain_end, domain_start, skip_count > operator-(const Fr &ff, const Univariate< Fr, domain_end, domain_start, skip_count > &uv)
void read(auto &it, msgpack_concepts::HasMsgPack auto &obj)
Automatically derived read for any object that defines .msgpack() (implicitly defined by MSGPACK_FIEL...
void write(auto &buf, const msgpack_concepts::HasMsgPack auto &obj)
Automatically derived write for any object that defines .msgpack() (implicitly defined by MSGPACK_FIE...
STerm operator&(const bb::fr &lhs, const STerm &rhs)
STerm operator|(const bb::fr &lhs, const STerm &rhs)
void operator!=(const bb::fr &lhs, const STerm &rhs)
STerm operator^(const bb::fr &lhs, const STerm &rhs)
STerm operator/(const bb::fr &lhs, const STerm &rhs)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
std::ostream & operator<<(std::ostream &os, const T &obj)
Automatically derived stream operator for any object that defines .msgpack() (implicitly defined by M...
TUPLET_INLINE constexpr auto operator+(type_list< Ls... >, type_list< Rs... >)
Convinience + operator for catenating type lists.
unsigned __int128 uint128_t