mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 17:37:34 +00:00
LibCrypto+LibJS: Better bigint bitwise_or binop
Similar to the bitwise_and change, but we have to be careful to sign-extend two's complement numbers only up to the highest set bit in the positive number.
This commit is contained in:
parent
1f98639396
commit
013799a4dd
8 changed files with 77 additions and 23 deletions
|
@ -82,12 +82,14 @@ public:
|
|||
void clamp_to_trimmed_length();
|
||||
void resize_with_leading_zeros(size_t num_words);
|
||||
|
||||
size_t one_based_index_of_highest_set_bit() const;
|
||||
|
||||
UnsignedBigInteger plus(const UnsignedBigInteger& other) const;
|
||||
UnsignedBigInteger minus(const UnsignedBigInteger& other) const;
|
||||
UnsignedBigInteger bitwise_or(const UnsignedBigInteger& other) const;
|
||||
UnsignedBigInteger bitwise_and(const UnsignedBigInteger& other) const;
|
||||
UnsignedBigInteger bitwise_xor(const UnsignedBigInteger& other) const;
|
||||
UnsignedBigInteger bitwise_not_fill_to_size(size_t) const;
|
||||
UnsignedBigInteger bitwise_not_fill_to_one_based_index(size_t) const;
|
||||
UnsignedBigInteger shift_left(size_t num_bits) const;
|
||||
UnsignedBigInteger multiplied_by(const UnsignedBigInteger& other) const;
|
||||
UnsignedDivisionResult divided_by(const UnsignedBigInteger& divisor) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue