Skip to content

Commit 8bc31ff

Browse files
committedMay 25, 2020
Fix the same typos again orz
1 parent 6973fd7 commit 8bc31ff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎src/libcore/num/f32.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ impl f32 {
857857
let mut left = self.to_bits() as i32;
858858
let mut right = other.to_bits() as i32;
859859

860-
// In case of negatives, flip all the bits expect the sign
860+
// In case of negatives, flip all the bits except the sign
861861
// to achieve a similar layout as two's complement integers
862862
//
863863
// Why does this work? IEEE 754 floats consist of three fields:
@@ -874,7 +874,7 @@ impl f32 {
874874
// We effectively convert the numbers to "two's complement" form.
875875
//
876876
// To do the flipping, we construct a mask and XOR against it.
877-
// We branchlessly calculate an "all-ones expect for the sign bit"
877+
// We branchlessly calculate an "all-ones except for the sign bit"
878878
// mask from negative-signed values: right shifting sign-extends
879879
// the integer, so we "fill" the mask with sign bits, and then
880880
// convert to unsigned to push one more zero bit.

‎src/libcore/num/f64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ impl f64 {
871871
let mut left = self.to_bits() as i64;
872872
let mut right = other.to_bits() as i64;
873873

874-
// In case of negatives, flip all the bits expect the sign
874+
// In case of negatives, flip all the bits except the sign
875875
// to achieve a similar layout as two's complement integers
876876
//
877877
// Why does this work? IEEE 754 floats consist of three fields:
@@ -888,7 +888,7 @@ impl f64 {
888888
// We effectively convert the numbers to "two's complement" form.
889889
//
890890
// To do the flipping, we construct a mask and XOR against it.
891-
// We branchlessly calculate an "all-ones expect for the sign bit"
891+
// We branchlessly calculate an "all-ones except for the sign bit"
892892
// mask from negative-signed values: right shifting sign-extends
893893
// the integer, so we "fill" the mask with sign bits, and then
894894
// convert to unsigned to push one more zero bit.

0 commit comments

Comments
 (0)
Please sign in to comment.