Skip to content

Commit 2e04a22

Browse files
committed
link to NaN bit pattern spec
1 parent c307821 commit 2e04a22

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

library/core/src/num/f128.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -459,8 +459,8 @@ impl f128 {
459459
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
460460
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
461461
/// conserved over arithmetic operations, the result of `is_sign_positive` on
462-
/// a NaN might produce an unexpected or non-portable result. See [explanation
463-
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
462+
/// a NaN might produce an unexpected or non-portable result. See the [specification
463+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
464464
/// need fully portable behavior and are okay with `-0.0` being considered positive.
465465
///
466466
/// ```
@@ -485,8 +485,8 @@ impl f128 {
485485
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
486486
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
487487
/// conserved over arithmetic operations, the result of `is_sign_negative` on
488-
/// a NaN might produce an unexpected or non-portable result. See [explanation
489-
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
488+
/// a NaN might produce an unexpected or non-portable result. See the [specification
489+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
490490
/// need fully portable behavior and are okay with `+0.0` being considered negative.
491491
///
492492
/// ```
@@ -756,7 +756,7 @@ impl f128 {
756756
/// Note that this follows the semantics specified in IEEE 754-2019.
757757
///
758758
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
759-
/// operand is conserved; see [explanation of NaN as a special value](f128) for more info.
759+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
760760
#[inline]
761761
#[unstable(feature = "f128", issue = "116909")]
762762
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]
@@ -797,7 +797,7 @@ impl f128 {
797797
/// Note that this follows the semantics specified in IEEE 754-2019.
798798
///
799799
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
800-
/// operand is conserved; see [explanation of NaN as a special value](f128) for more info.
800+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
801801
#[inline]
802802
#[unstable(feature = "f128", issue = "116909")]
803803
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]

library/core/src/num/f16.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,8 @@ impl f16 {
469469
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
470470
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
471471
/// conserved over arithmetic operations, the result of `is_sign_positive` on
472-
/// a NaN might produce an unexpected or non-portable result. See [explanation
473-
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
472+
/// a NaN might produce an unexpected or non-portable result. See the [specification
473+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
474474
/// need fully portable behavior and are okay with `-0.0` being considered positive.
475475
///
476476
/// ```
@@ -498,8 +498,8 @@ impl f16 {
498498
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
499499
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
500500
/// conserved over arithmetic operations, the result of `is_sign_negative` on
501-
/// a NaN might produce an unexpected or non-portable result. See [explanation
502-
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
501+
/// a NaN might produce an unexpected or non-portable result. See the [specification
502+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
503503
/// need fully portable behavior and are okay with `+0.0` being considered negative.
504504
///
505505
/// ```
@@ -768,7 +768,7 @@ impl f16 {
768768
/// Note that this follows the semantics specified in IEEE 754-2019.
769769
///
770770
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
771-
/// operand is conserved; see [explanation of NaN as a special value](f16) for more info.
771+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
772772
#[inline]
773773
#[unstable(feature = "f16", issue = "116909")]
774774
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]
@@ -808,7 +808,7 @@ impl f16 {
808808
/// Note that this follows the semantics specified in IEEE 754-2019.
809809
///
810810
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
811-
/// operand is conserved; see [explanation of NaN as a special value](f16) for more info.
811+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
812812
#[inline]
813813
#[unstable(feature = "f16", issue = "116909")]
814814
// #[unstable(feature = "float_minimum_maximum", issue = "91079")]

library/core/src/num/f32.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,8 @@ impl f32 {
700700
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
701701
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
702702
/// conserved over arithmetic operations, the result of `is_sign_positive` on
703-
/// a NaN might produce an unexpected or non-portable result. See [explanation
704-
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
703+
/// a NaN might produce an unexpected or non-portable result. See the [specification
704+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
705705
/// need fully portable behavior and are okay with `-0.0` being considered positive.
706706
///
707707
/// ```
@@ -725,8 +725,8 @@ impl f32 {
725725
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
726726
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
727727
/// conserved over arithmetic operations, the result of `is_sign_negative` on
728-
/// a NaN might produce an unexpected or non-portable result. See [explanation
729-
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
728+
/// a NaN might produce an unexpected or non-portable result. See the [specification
729+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
730730
/// need fully portable behavior and are okay with `+0.0` being considered negative.
731731
///
732732
/// ```
@@ -956,7 +956,7 @@ impl f32 {
956956
/// Note that this follows the semantics specified in IEEE 754-2019.
957957
///
958958
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
959-
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
959+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
960960
#[must_use = "this returns the result of the comparison, without modifying either input"]
961961
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
962962
#[inline]
@@ -991,7 +991,7 @@ impl f32 {
991991
/// Note that this follows the semantics specified in IEEE 754-2019.
992992
///
993993
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
994-
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
994+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
995995
#[must_use = "this returns the result of the comparison, without modifying either input"]
996996
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
997997
#[inline]

library/core/src/num/f64.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,8 @@ impl f64 {
695695
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
696696
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
697697
/// conserved over arithmetic operations, the result of `is_sign_positive` on
698-
/// a NaN might produce an unexpected or non-portable result. See [explanation
699-
/// of NaN as a special value](f32) for more info. Use `self >= 0.0` if you
698+
/// a NaN might produce an unexpected or non-portable result. See the [specification
699+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self >= 0.0` if you
700700
/// need fully portable behavior and are okay with `-0.0` being considered positive.
701701
///
702702
/// ```
@@ -729,8 +729,8 @@ impl f64 {
729729
/// Note that IEEE 754 doesn't assign any meaning to the sign bit in case of
730730
/// a NaN, and as Rust doesn't guarantee that the bit pattern of NaNs are
731731
/// conserved over arithmetic operations, the result of `is_sign_negative` on
732-
/// a NaN might produce an unexpected or non-portable result. See [explanation
733-
/// of NaN as a special value](f32) for more info. Use `self <= 0.0` if you
732+
/// a NaN might produce an unexpected or non-portable result. See the [specification
733+
/// of NaN bit patterns](f32#nan-bit-patterns) for more info. Use `self <= 0.0` if you
734734
/// need fully portable behavior and are okay with `+0.0` being considered negative.
735735
///
736736
/// ```
@@ -970,7 +970,7 @@ impl f64 {
970970
/// Note that this follows the semantics specified in IEEE 754-2019.
971971
///
972972
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
973-
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
973+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
974974
#[must_use = "this returns the result of the comparison, without modifying either input"]
975975
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
976976
#[inline]
@@ -1005,7 +1005,7 @@ impl f64 {
10051005
/// Note that this follows the semantics specified in IEEE 754-2019.
10061006
///
10071007
/// Also note that "propagation" of NaNs here doesn't necessarily mean that the bitpattern of a NaN
1008-
/// operand is conserved; see [explanation of NaN as a special value](f32) for more info.
1008+
/// operand is conserved; see the [specification of NaN bit patterns](f32#nan-bit-patterns) for more info.
10091009
#[must_use = "this returns the result of the comparison, without modifying either input"]
10101010
#[unstable(feature = "float_minimum_maximum", issue = "91079")]
10111011
#[inline]

0 commit comments

Comments
 (0)