You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the usage question you have. Please include as many useful details as possible.
I'm pretty sure of this but wanted a sanity test. Also, should literal(quiet_NAN) == literal(signaling_NAN)? My intuition is "no".
Or...more concretely...should these test cases pass?
// This currently fails
EXPECT_EQ(literal(std::numeric_limits<double>::quiet_NaN()),
literal(std::numeric_limits<double>::quiet_NaN()));
// These currently pass
EXPECT_NE(literal(std::numeric_limits<double>::quiet_NaN()),
literal(std::numeric_limits<double>::signaling_NaN()));
EXPECT_NE(literal(std::numeric_limits<double>::quiet_NaN()),
literal(std::numeric_limits<float>::quiet_NaN()));
If the answer is "yes, those two expressions are equivalent" then I can fix it in #15180 . I already have a fix but wanted to confirm my understanding.
Component(s)
C++
The text was updated successfully, but these errors were encountered:
Actually, I can't find a good way to test if a NaN is a quiet nan or a signalling NaN so now I'm tempted to say literal(quiet_NaN) == literal(signal_NaN) as well.
I think that we don't need to support signalling nans. Quiet nans may be produced by floating point expressions with invalid arguments, but signalling nans can only be produced explicitly- which is not functionality I think we'd find valuable. For our purposes, I don't think we need to check for signalling nans.
I do think that literal(nan) == literal(nan) should be true- as you say those two expressions are equivalent. I think just to disambiguate the situation the unit test should also assert that equal(literal(nan), literal(nan)) evaluates to false and clarify why that difference exists with a comment
Describe the usage question you have. Please include as many useful details as possible.
I'm pretty sure of this but wanted a sanity test. Also, should
literal(quiet_NAN) == literal(signaling_NAN)
? My intuition is "no".Or...more concretely...should these test cases pass?
If the answer is "yes, those two expressions are equivalent" then I can fix it in #15180 . I already have a fix but wanted to confirm my understanding.
Component(s)
C++
The text was updated successfully, but these errors were encountered: