Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 65265dd

Browse files
committed
Various minor/cosmetic improvements to code
[git filter-repo] original commit: rust-lang/rust@ee89c08
1 parent ef3dc66 commit 65265dd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

ieee.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ impl<S: Semantics> Float for IeeeFloat<S> {
926926

927927
// In case MSB resides at the left-hand side of radix point, shift the
928928
// mantissa right by some amount to make sure the MSB reside right before
929-
// the radix point (i.e. "MSB . rest-significant-bits").
929+
// the radix point (i.e., "MSB . rest-significant-bits").
930930
if omsb > S::PRECISION {
931931
let bits = omsb - S::PRECISION;
932932
loss = sig::shift_right(&mut wide_sig, &mut self.exp, bits).combine(loss);
@@ -2674,7 +2674,7 @@ mod sig {
26742674

26752675
// In case MSB resides at the left-hand side of radix point, shift the
26762676
// mantissa right by some amount to make sure the MSB reside right before
2677-
// the radix point (i.e. "MSB . rest-significant-bits").
2677+
// the radix point (i.e., "MSB . rest-significant-bits").
26782678
//
26792679
// Note that the result is not normalized when "omsb < precision". So, the
26802680
// caller needs to call IeeeFloat::normalize() if normalized value is

lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
//! Comments have been preserved where possible, only slightly adapted.
2727
//!
2828
//! Instead of keeping a pointer to a configuration struct and inspecting it
29-
//! dynamically on every operation, types (e.g. `ieee::Double`), traits
30-
//! (e.g. `ieee::Semantics`) and associated constants are employed for
29+
//! dynamically on every operation, types (e.g., `ieee::Double`), traits
30+
//! (e.g., `ieee::Semantics`) and associated constants are employed for
3131
//! increased type safety and performance.
3232
//!
3333
//! On-heap bigints are replaced everywhere (except in decimal conversion),
@@ -179,7 +179,7 @@ pub struct ParseError(pub &'static str);
179179
/// implemented operations. Currently implemented operations are add, subtract,
180180
/// multiply, divide, fused-multiply-add, conversion-to-float,
181181
/// conversion-to-integer and conversion-from-integer. New rounding modes
182-
/// (e.g. away from zero) can be added with three or four lines of code.
182+
/// (e.g., away from zero) can be added with three or four lines of code.
183183
///
184184
/// Four formats are built-in: IEEE single precision, double precision,
185185
/// quadruple precision, and x87 80-bit extended double (when operating with
@@ -589,7 +589,7 @@ pub trait Float
589589
pub trait FloatConvert<T: Float>: Float {
590590
/// Convert a value of one floating point type to another.
591591
/// The return value corresponds to the IEEE754 exceptions. *loses_info
592-
/// records whether the transformation lost information, i.e. whether
592+
/// records whether the transformation lost information, i.e., whether
593593
/// converting the result back to the original type will produce the
594594
/// original value (this is almost the same as return value==Status::OK,
595595
/// but there are edge cases where this is not so).

ppc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ where
288288
// \ /
289289
// Normal
290290
//
291-
// e.g. NaN * NaN = NaN
291+
// e.g., NaN * NaN = NaN
292292
// Zero * Inf = NaN
293293
// Normal * Zero = Zero
294294
// Normal * Inf = Inf

0 commit comments

Comments
 (0)