Skip to content

Commit

Permalink
link to NaN bit pattern spec
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Aug 26, 2024
1 parent c307821 commit 2e04a22
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions library/core/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ impl f128 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_positive` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
/// need fully portable behavior and are okay with `-0.0` being considered positive.
///
/// ```
Expand All @@ -485,8 +485,8 @@ impl f128 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_negative` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
/// need fully portable behavior and are okay with `+0.0` being considered negative.
///
/// ```
Expand Down Expand Up @@ -756,7 +756,7 @@ impl f128 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f128) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[inline]
#[unstable(feature = "f128", issue = "116909")]
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]
Expand Down Expand Up @@ -797,7 +797,7 @@ impl f128 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f128) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[inline]
#[unstable(feature = "f128", issue = "116909")]
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ impl f16 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_positive` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
/// need fully portable behavior and are okay with `-0.0` being considered positive.
///
/// ```
Expand Down Expand Up @@ -498,8 +498,8 @@ impl f16 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_negative` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
/// need fully portable behavior and are okay with `+0.0` being considered negative.
///
/// ```
Expand Down Expand Up @@ -768,7 +768,7 @@ impl f16 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f16) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[inline]
#[unstable(feature = "f16", issue = "116909")]
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]
Expand Down Expand Up @@ -808,7 +808,7 @@ impl f16 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f16) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[inline]
#[unstable(feature = "f16", issue = "116909")]
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ impl f32 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_positive` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
/// need fully portable behavior and are okay with `-0.0` being considered positive.
///
/// ```
Expand All @@ -725,8 +725,8 @@ impl f32 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_negative` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
/// need fully portable behavior and are okay with `+0.0` being considered negative.
///
/// ```
Expand Down Expand Up @@ -956,7 +956,7 @@ impl f32 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
#[inline]
Expand Down Expand Up @@ -991,7 +991,7 @@ impl f32 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
#[inline]
Expand Down
12 changes: 6 additions & 6 deletions library/core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,8 @@ impl f64 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_positive` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
/// need fully portable behavior and are okay with `-0.0` being considered positive.
///
/// ```
Expand Down Expand Up @@ -729,8 +729,8 @@ impl f64 {
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
/// conserved over arithmetic operations, the result of `is_sign_negative` on
/// a NaN might produce an unexpected or non-portable result. See [explanation
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
/// a NaN might produce an unexpected or non-portable result. See the [specification
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
/// need fully portable behavior and are okay with `+0.0` being considered negative.
///
/// ```
Expand Down Expand Up @@ -970,7 +970,7 @@ impl f64 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
#[inline]
Expand Down Expand Up @@ -1005,7 +1005,7 @@ impl f64 {
/// Note that this follows the semantics specified in IEEE 754-2019.
///
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
#[must_use = "this returns the result of the comparison, without modifying either input"]
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
#[inline]
Expand Down

0 comments on commit 2e04a22

Please sign in to comment.