File tree 2 files changed +10
-8
lines changed
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -978,14 +978,15 @@ mod prim_tuple {}
978
978
/// - [NaN (not a number)](#associatedconstant.NAN): this value results from
979
979
/// calculations like `(-1.0).sqrt()`. NaN has some potentially unexpected
980
980
/// behavior:
981
- /// - It is unequal to any float, including itself!
981
+ /// - It is unequal to any float, including itself! This is the reason `f32`
982
+ /// doesn't implement the `Eq` trait.
982
983
/// - It is also neither smaller nor greater than any float, making it
983
- /// impossible to sort by the default comparison operation. This is the
984
- /// reason `f32` doesn't implement the `Ord` and `Eq` traits .
984
+ /// impossible to sort by the default comparison operation, which is the
985
+ /// reason `f32` doesn't implement the `Ord` trait .
985
986
/// - It is also considered *infectious* as almost all calculations where one
986
987
/// of the operands is NaN will also result in NaN. The explanations on this
987
988
/// page only explicitly document behavior on NaN operands if this default
988
- /// is *not* observed by the operation .
989
+ /// is deviated from .
989
990
/// - Lastly, there are multiple bit patterns that are considered NaN.
990
991
/// Rust does not currently guarantee that the bit patterns of NaN are
991
992
/// preserved over arithmetic operations,
Original file line number Diff line number Diff line change @@ -978,14 +978,15 @@ mod prim_tuple {}
978
978
/// - [NaN (not a number)](#associatedconstant.NAN): this value results from
979
979
/// calculations like `(-1.0).sqrt()`. NaN has some potentially unexpected
980
980
/// behavior:
981
- /// - It is unequal to any float, including itself!
981
+ /// - It is unequal to any float, including itself! This is the reason `f32`
982
+ /// doesn't implement the `Eq` trait.
982
983
/// - It is also neither smaller nor greater than any float, making it
983
- /// impossible to sort by the default comparison operation. This is the
984
- /// reason `f32` doesn't implement the `Ord` and `Eq` traits .
984
+ /// impossible to sort by the default comparison operation, which is the
985
+ /// reason `f32` doesn't implement the `Ord` trait .
985
986
/// - It is also considered *infectious* as almost all calculations where one
986
987
/// of the operands is NaN will also result in NaN. The explanations on this
987
988
/// page only explicitly document behavior on NaN operands if this default
988
- /// is *not* observed by the operation .
989
+ /// is deviated from .
989
990
/// - Lastly, there are multiple bit patterns that are considered NaN.
990
991
/// Rust does not currently guarantee that the bit patterns of NaN are
991
992
/// preserved over arithmetic operations,
You can’t perform that action at this time.
0 commit comments