From 2bad89390052399e4c850a2793691f3371122880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20BRANSTETT?= Date: Thu, 18 Nov 2021 11:48:52 +0100 Subject: [PATCH] Add similar note as LLVM does for minNum and maxNum functions --- library/core/src/num/f32.rs | 6 ++++++ library/core/src/num/f64.rs | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index 4571df917f385..4b4711b2cba6d 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -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; @@ -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; diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs index 0ae32c5ea9507..a1ca09e78f275 100644 --- a/library/core/src/num/f64.rs +++ b/library/core/src/num/f64.rs @@ -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; @@ -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;