Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/core/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ impl f128 {
q
}

/// Calculates the least nonnegative remainder of `self (mod rhs)`.
/// Calculates the least nonnegative remainder of `self / rhs`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After doing the division (which this syntax suggests), there is no possibility of finding the remainder anymore, but perhaps you meant something like the following:

Suggested change
/// Calculates the least nonnegative remainder of `self / rhs`.
/// Calculates the least nonnegative remainder of `self` when divided by `rhs`.

///
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
/// most cases. However, due to a floating point round-off error it can
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ impl f16 {
q
}

/// Calculates the least nonnegative remainder of `self (mod rhs)`.
/// Calculates the least nonnegative remainder of `self / rhs`.
///
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
/// most cases. However, due to a floating point round-off error it can
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/num/int_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3124,7 +3124,7 @@ macro_rules! int_impl {
}


/// Calculates the least nonnegative remainder of `self (mod rhs)`.
/// Calculates the least nonnegative remainder of `self / rhs`.
///
/// This is done as if by the Euclidean division algorithm -- given
/// `r = self.rem_euclid(rhs)`, the result satisfies
Expand Down
2 changes: 1 addition & 1 deletion library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3399,7 +3399,7 @@ macro_rules! uint_impl {
}


/// Calculates the least remainder of `self (mod rhs)`.
/// Calculates the least remainder of `self / rhs`.
///
/// Since, for the positive integers, all common
/// definitions of division are equal, this
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl f32 {
core::f32::math::div_euclid(self, rhs)
}

/// Calculates the least nonnegative remainder of `self (mod rhs)`.
/// Calculates the least nonnegative remainder of `self / rhs`.
///
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
/// most cases. However, due to a floating point round-off error it can
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ impl f64 {
core::f64::math::div_euclid(self, rhs)
}

/// Calculates the least nonnegative remainder of `self (mod rhs)`.
/// Calculates the least nonnegative remainder of `self / rhs`.
///
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
/// most cases. However, due to a floating point round-off error it can
Expand Down
Loading