File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -857,7 +857,7 @@ impl f32 {
857
857
let mut left = self . to_bits ( ) as i32 ;
858
858
let mut right = other. to_bits ( ) as i32 ;
859
859
860
- // In case of negatives, flip all the bits expect the sign
860
+ // In case of negatives, flip all the bits except the sign
861
861
// to achieve a similar layout as two's complement integers
862
862
//
863
863
// Why does this work? IEEE 754 floats consist of three fields:
@@ -874,7 +874,7 @@ impl f32 {
874
874
// We effectively convert the numbers to "two's complement" form.
875
875
//
876
876
// 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"
878
878
// mask from negative-signed values: right shifting sign-extends
879
879
// the integer, so we "fill" the mask with sign bits, and then
880
880
// convert to unsigned to push one more zero bit.
Original file line number Diff line number Diff line change @@ -871,7 +871,7 @@ impl f64 {
871
871
let mut left = self . to_bits ( ) as i64 ;
872
872
let mut right = other. to_bits ( ) as i64 ;
873
873
874
- // In case of negatives, flip all the bits expect the sign
874
+ // In case of negatives, flip all the bits except the sign
875
875
// to achieve a similar layout as two's complement integers
876
876
//
877
877
// Why does this work? IEEE 754 floats consist of three fields:
@@ -888,7 +888,7 @@ impl f64 {
888
888
// We effectively convert the numbers to "two's complement" form.
889
889
//
890
890
// 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"
892
892
// mask from negative-signed values: right shifting sign-extends
893
893
// the integer, so we "fill" the mask with sign bits, and then
894
894
// convert to unsigned to push one more zero bit.
You can’t perform that action at this time.
0 commit comments