Skip to content

Commit

Permalink
Rephrase -0.0 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
workingjubilee committed Mar 23, 2021
1 parent 6fdb8d8 commit e8dfbac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/std/src/primitive_docs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -807,10 +807,10 @@ mod prim_tuple {}
///
/// Additionally, `f32` can represent some special values:
///
/// - `-0`: this value exists due to how floats are encoded. -0 == 0 is true, but for other
/// operations they are not equal and the difference can be useful to certain algorithms.
/// For example, operations on negative numbers that underflow to 0 will usually generate -0
/// instead of +0.
/// - -0.0: IEEE 754 floating point numbers have a bit that indicates their sign, so -0.0 is a
/// possible value. For comparison `-0.0 == +0.0` is true but floating point operations can
/// carry the sign bit through arithmetic operations. This means `-1.0 * 0.0` produces -0.0 and
/// a negative number rounded to a value smaller than a float can represent also produces -0.0.
/// - [∞](#associatedconstant.INFINITY) and
/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
/// like `1.0 / 0.0`.
Expand Down

0 comments on commit e8dfbac

Please sign in to comment.