Skip to content

Commit e66b783

Browse files
authored
chore: make some documents clearer (#993)
1 parent 572c035 commit e66b783

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/int/add.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ impl<const LIMBS: usize> Int<LIMBS> {
2121

2222
// Step 2. determine whether overflow happened.
2323
// Note:
24-
// - overflow can only happen when the inputs have the same sign, and then
25-
// - overflow occurs if and only if the result has the opposite sign of both inputs.
24+
// - overflow can only happen when the inputs have the same sign, and
25+
// - overflow occurs if and only if the result has the opposite sign from both inputs.
2626
//
2727
// We can thus express the overflow flag as: (self.msb == rhs.msb) & (self.msb != res.msb)
2828
let self_msb = self.is_negative();

src/int/sign.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use num_traits::ConstZero;
33

44
impl<const LIMBS: usize> Int<LIMBS> {
55
/// Returns the word of most significant [`Limb`].
6-
/// For the generative case where the number of limbs is zero,
6+
/// For the degenerate case where the number of limbs is zero,
77
/// zeroed word is returned (which is semantically correct).
88
/// This method leaks the limb length of the value, which is also OK.
99
const fn most_significant_word(&self) -> Word {

src/int/sub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ impl<const LIMBS: usize> Int<LIMBS> {
1616

1717
// Step 2. check whether underflow happened.
1818
// Note:
19-
// - underflow can only happen when the inputs have opposing signs, and then
19+
// - underflow can only happen when the inputs have opposing signs, and
2020
// - underflow occurs if and only if the result and the lhs have opposing signs.
2121
//
2222
// We can thus express the overflow flag as: (self.msb != rhs.msb) & (self.msb != res.msb)

0 commit comments

Comments
 (0)