]> git.lizzy.rs Git - rust.git/commitdiff
Fix the same typos again orz
authorPyry Kontio <pyry.kontio@drasa.eu>
Mon, 25 May 2020 19:54:50 +0000 (04:54 +0900)
committerPyry Kontio <pyry.kontio@drasa.eu>
Mon, 25 May 2020 20:07:00 +0000 (05:07 +0900)
src/libcore/num/f32.rs
src/libcore/num/f64.rs

index 538cca712ca95ee4cddc5019dd0f42afd3c79742..c54bfb27dfe5c9e734224ad2aca53547b577eb39 100644 (file)
@@ -857,7 +857,7 @@ pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         let mut left = self.to_bits() as i32;
         let mut right = other.to_bits() as i32;
 
-        // In case of negatives, flip all the bits expect the sign
+        // In case of negatives, flip all the bits except the sign
         // to achieve a similar layout as two's complement integers
         //
         // Why does this work? IEEE 754 floats consist of three fields:
@@ -874,7 +874,7 @@ pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         // We effectively convert the numbers to "two's complement" form.
         //
         // To do the flipping, we construct a mask and XOR against it.
-        // We branchlessly calculate an "all-ones expect for the sign bit"
+        // We branchlessly calculate an "all-ones except for the sign bit"
         // mask from negative-signed values: right shifting sign-extends
         // the integer, so we "fill" the mask with sign bits, and then
         // convert to unsigned to push one more zero bit.
index b3ebceb77c2e5e05240930b3549e40d52c19dace..18d5d720a05444b8fc6bf84172f68e8232a48a9c 100644 (file)
@@ -871,7 +871,7 @@ pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         let mut left = self.to_bits() as i64;
         let mut right = other.to_bits() as i64;
 
-        // In case of negatives, flip all the bits expect the sign
+        // In case of negatives, flip all the bits except the sign
         // to achieve a similar layout as two's complement integers
         //
         // Why does this work? IEEE 754 floats consist of three fields:
@@ -888,7 +888,7 @@ pub fn total_cmp(&self, other: &Self) -> crate::cmp::Ordering {
         // We effectively convert the numbers to "two's complement" form.
         //
         // To do the flipping, we construct a mask and XOR against it.
-        // We branchlessly calculate an "all-ones expect for the sign bit"
+        // We branchlessly calculate an "all-ones except for the sign bit"
         // mask from negative-signed values: right shifting sign-extends
         // the integer, so we "fill" the mask with sign bits, and then
         // convert to unsigned to push one more zero bit.