about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-10-06 12:33:14 -0700
committerGitHub <noreply@github.com>2021-10-06 12:33:14 -0700
commit1e3b5d6725a84b2060f66e61a59f33ad12aa17f8 (patch)
tree29c33208daf1ff7aa2eaeabfdbc990841a04a52c /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3209582a87f7b8e098bac67f66ed58d8d5840dee (diff)
parent18df8d6e559174700e302369c2fe0d9c7c143e66 (diff)
downloadrust-1e3b5d6725a84b2060f66e61a59f33ad12aa17f8.tar.gz
rust-1e3b5d6725a84b2060f66e61a59f33ad12aa17f8.zip
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions