Rollup merge of #84256 - tspiteri:pretty-minus-zero, r=workingjubilee
doc: use U+2212 for minus sign in floating-point -0.0 remarks Also remove plus sign in `-0.0 == +0.0` to make it a valid expression.
This commit is contained in:
commit
fb78dc05e4
1 changed files with 4 additions and 4 deletions
|
@ -807,10 +807,10 @@ mod prim_tuple {}
|
|||
///
|
||||
/// Additionally, `f32` can represent some special values:
|
||||
///
|
||||
/// - -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.
|
||||
/// - −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, but floating point operations can carry
|
||||
/// the sign bit through arithmetic operations. This means −0.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`.
|
||||
|
|
Loading…
Reference in a new issue