Skip to content

Commit 3f10e6c

Browse files
committedAug 15, 2022
Say that the identity holds only for all finite numbers (aka not NaN)
1 parent a1e2510 commit 3f10e6c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎library/core/src/num/f32.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ impl f32 {
688688
/// - if `self` is [`MAX`] or [`INFINITY`], this returns [`INFINITY`];
689689
/// - otherwise the unique least value greater than `self` is returned.
690690
///
691-
/// The identity `x.next_up() == -(-x).next_down()` holds for all `x`. When `x`
691+
/// The identity `x.next_up() == -(-x).next_down()` holds for all non-NaN `x`. When `x`
692692
/// is finite `x == x.next_up().next_down()` also holds.
693693
///
694694
/// ```rust
@@ -738,7 +738,7 @@ impl f32 {
738738
/// - if `self` is [`MIN`] or [`NEG_INFINITY`], this returns [`NEG_INFINITY`];
739739
/// - otherwise the unique greatest value less than `self` is returned.
740740
///
741-
/// The identity `x.next_down() == -(-x).next_up()` holds for all `x`. When `x`
741+
/// The identity `x.next_down() == -(-x).next_up()` holds for all non-NaN `x`. When `x`
742742
/// is finite `x == x.next_down().next_up()` also holds.
743743
///
744744
/// ```rust

‎library/core/src/num/f64.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ impl f64 {
698698
/// - if `self` is [`MAX`] or [`INFINITY`], this returns [`INFINITY`];
699699
/// - otherwise the unique least value greater than `self` is returned.
700700
///
701-
/// The identity `x.next_up() == -(-x).next_down()` holds for all `x`. When `x`
701+
/// The identity `x.next_up() == -(-x).next_down()` holds for all non-NaN `x`. When `x`
702702
/// is finite `x == x.next_up().next_down()` also holds.
703703
///
704704
/// ```rust
@@ -748,7 +748,7 @@ impl f64 {
748748
/// - if `self` is [`MIN`] or [`NEG_INFINITY`], this returns [`NEG_INFINITY`];
749749
/// - otherwise the unique greatest value less than `self` is returned.
750750
///
751-
/// The identity `x.next_down() == -(-x).next_up()` holds for all `x`. When `x`
751+
/// The identity `x.next_down() == -(-x).next_up()` holds for all non-NaN `x`. When `x`
752752
/// is finite `x == x.next_down().next_up()` also holds.
753753
///
754754
/// ```rust

0 commit comments

Comments
 (0)
Please sign in to comment.