Skip to content

Commit

Permalink
Add similar note as LLVM does for minNum and maxNum functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Urgau committed Nov 20, 2021
1 parent a8ee0e9 commit 2bad893
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions library/core/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,9 @@ impl f32 {

/// Returns the maximum of the two numbers.
///
/// Follows the IEEE-754 2008 semantics for maxNum, except for handling of signaling NaNs.
/// This match’s the behavior of libm’s fmin.
///
/// ```
/// let x = 1.0f32;
/// let y = 2.0f32;
Expand All @@ -689,6 +692,9 @@ impl f32 {

/// Returns the minimum of the two numbers.
///
/// Follows the IEEE-754 2008 semantics for minNum, except for handling of signaling NaNs.
/// This match’s the behavior of libm’s fmin.
///
/// ```
/// let x = 1.0f32;
/// let y = 2.0f32;
Expand Down
6 changes: 6 additions & 0 deletions library/core/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,9 @@ impl f64 {

/// Returns the maximum of the two numbers.
///
/// Follows the IEEE-754 2008 semantics for maxNum, except for handling of signaling NaNs.
/// This match’s the behavior of libm’s fmin.
///
/// ```
/// let x = 1.0_f64;
/// let y = 2.0_f64;
Expand All @@ -705,6 +708,9 @@ impl f64 {

/// Returns the minimum of the two numbers.
///
/// Follows the IEEE-754 2008 semantics for minNum, except for handling of signaling NaNs.
/// This match’s the behavior of libm’s fmin.
///
/// ```
/// let x = 1.0_f64;
/// let y = 2.0_f64;
Expand Down

0 comments on commit 2bad893

Please sign in to comment.