diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2021-04-19 22:00:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-19 22:00:08 +0200 |
| commit | fb78dc05e4ada40182712c82481acdd50451e632 (patch) | |
| tree | cfbd45d7edd5702f1fcbd96f7214fb9ae0a83214 | |
| parent | e5b5745db14d852df8996d5f5ed53942f396bbd4 (diff) | |
| parent | 4c6477026dbdb80e1deb26f0d815a462a941c4e5 (diff) | |
| download | rust-fb78dc05e4ada40182712c82481acdd50451e632.tar.gz rust-fb78dc05e4ada40182712c82481acdd50451e632.zip | |
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.
| -rw-r--r-- | library/std/src/primitive_docs.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs index 64b22b64f4b..84d072b9860 100644 --- a/library/std/src/primitive_docs.rs +++ b/library/std/src/primitive_docs.rs @@ -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`. |
