]> git.lizzy.rs Git - rust.git/commit
Improve floating point documentation:
authorPyry Kontio <pyry.kontio@drasa.eu>
Wed, 30 Mar 2022 15:58:43 +0000 (00:58 +0900)
committerPyry Kontio <pyry.kontio@drasa.eu>
Wed, 30 Mar 2022 17:10:13 +0000 (02:10 +0900)
commit35611872210094bfa7d9eaacc83badb218ed045e
tree94546ea036aa3db9bdaf97481dcf904861ec3855
parent3e7514670db841a7f0d7656f3b13b1c8b2c11599
Improve floating point documentation:

- Refine the "NaN as a special value" top level explanation of f32
- Refine `const NAN` docstring.
- Refine `fn is_sign_positive` and `fn is_sign_negative` docstrings.
- Refine `fn min` and `fn max` docstrings.
- Refine `fn trunc` docstrings.
- Refine `fn powi` docstrings.
- Refine `fn copysign` docstrings.
- Reword `NaN` and `NAN` as plain "NaN", unless they refer to the specific `const NAN`.
- Reword "a number" to `self` in function docstrings to clarify.
- Remove "Returns NAN if the number is NAN" as this is told to be the default behavior in the top explanation.
- Remove "propagating NaNs", as full propagation (preservation of payloads) is not guaranteed.
library/core/src/num/f32.rs
library/core/src/num/f64.rs
library/core/src/primitive_docs.rs
library/std/src/f32.rs
library/std/src/f64.rs
library/std/src/primitive_docs.rs