Skip to content

Commit 2bad893

Browse files
committed
Add similar note as LLVM does for minNum and maxNum functions
1 parent a8ee0e9 commit 2bad893

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

library/core/src/num/f32.rs

+6
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,9 @@ impl f32 {
673673

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

690693
/// Returns the minimum of the two numbers.
691694
///
695+
/// Follows the IEEE-754 2008 semantics for minNum, except for handling of signaling NaNs.
696+
/// This match’s the behavior of libm’s fmin.
697+
///
692698
/// ```
693699
/// let x = 1.0f32;
694700
/// let y = 2.0f32;

library/core/src/num/f64.rs

+6
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ impl f64 {
689689

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

706709
/// Returns the minimum of the two numbers.
707710
///
711+
/// Follows the IEEE-754 2008 semantics for minNum, except for handling of signaling NaNs.
712+
/// This match’s the behavior of libm’s fmin.
713+
///
708714
/// ```
709715
/// let x = 1.0_f64;
710716
/// let y = 2.0_f64;

0 commit comments

Comments
 (0)