rust/library/core
Manish Goregaokar 1e3b5d6725
Rollup merge of #88523 - kpreid:category, r=yaahc
Expand documentation for `FpCategory`.

I intend these changes to be helpful to readers who are not yet familiar with the quirks of floating-point numbers. Additionally, I felt it was misleading to describe `Nan` as being the result of division by zero, since most divisions by zero (except for 0/0) produce `Infinite` floats, so I moved that remark to the `Infinite` variant with adjustment.

The first sentence of the `Nan` documentation is copied from `f32`; I followed the example of the `f64` documentation by referring to `f32` for general concepts, rather than duplicating the text.

----

I considered making similar changes to the documentation of the `is_*` methods of floats, but decided that that was a much larger and trickier problem; here, each of the variants' descriptions can be expected to be read in context of being mutually exclusive with the others.
2021-10-06 12:33:14 -07:00
..
benches benchmark for str.chars().count() 2021-09-11 00:25:41 +02:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #88523 - kpreid:category, r=yaahc 2021-10-06 12:33:14 -07:00
tests Rollup merge of #89502 - FabianWolff:issue-89493, r=joshtriplett 2021-10-05 12:52:46 -07:00
Cargo.toml