File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 157157//!
158158//! * `+` - This is intended for numeric types and indicates that the sign
159159//! should always be printed. Positive signs are never printed by
160- //! default, and the negative sign is only printed by default for the
161- //! `Signed` trait. This flag indicates that the correct sign (`+` or `-`)
162- //! should always be printed.
160+ //! default, and the negative sign is only printed by default for signed values.
161+ //! This flag indicates that the correct sign (`+` or `-`) should always be printed.
163162//! * `-` - Currently not used
164163//! * `#` - This flag indicates that the "alternate" form of printing should
165164//! be used. The alternate forms are:
Original file line number Diff line number Diff line change @@ -805,10 +805,12 @@ mod prim_tuple {}
805805/// often discard insignificant digits: `println!("{}", 1.0f32 / 5.0f32)` will
806806/// print `0.2`.
807807///
808- /// Additionally, `f32` can represent a couple of special values:
808+ /// Additionally, `f32` can represent some special values:
809809///
810- /// - `-0`: this is just due to how floats are encoded. It is semantically
811- /// equivalent to `0` and `-0.0 == 0.0` results in `true`.
810+ /// - `-0`: this value exists due to how floats are encoded. -0 == 0 is true, but for other
811+ /// operations they are not equal and the difference can be useful to certain algorithms.
812+ /// For example, operations on negative numbers that underflow to 0 will usually generate -0
813+ /// instead of +0.
812814/// - [∞](#associatedconstant.INFINITY) and
813815/// [−∞](#associatedconstant.NEG_INFINITY): these result from calculations
814816/// like `1.0 / 0.0`.
You can’t perform that action at this time.
0 commit comments