-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[libc][math] Fix range and comments in exhaustive hypotf_test #131769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-libc Author: Tejas Vipin (meltq) Changes
Full diff: https://github.com/llvm/llvm-project/pull/131769.diff 1 Files Affected:
diff --git a/libc/test/src/math/exhaustive/hypotf_test.cpp b/libc/test/src/math/exhaustive/hypotf_test.cpp
index 04da55d4d3a9f..601ec9f749462 100644
--- a/libc/test/src/math/exhaustive/hypotf_test.cpp
+++ b/libc/test/src/math/exhaustive/hypotf_test.cpp
@@ -53,7 +53,7 @@ using LlvmLibcHypotfExhaustiveTest = LlvmLibcExhaustiveMathTest<HypotfChecker>;
// Range of the first input: [2^23, 2^24);
static constexpr uint32_t START = (23U + 127U) << 23;
-static constexpr uint32_t STOP = ((23U + 127U) << 23) + 1;
+static constexpr uint32_t STOP = (24U + 127U) << 23;
TEST_F(LlvmLibcHypotfExhaustiveTest, PositiveRange) {
test_full_range_all_roundings(START, STOP);
|
@overmighty @lntue Requesting review. |
@overmighty @lntue ping. |
I think I intentionally test it including next exponent. Feel free to update the comment instead. |
@lntue updated. Also updated PR title and desc to reflect this. |
@lntue updated. |
((23U + 127U) << 23) + 1
evaluates to(2^23)+1
as opposed to2^24
, so should instead be(24U + 127U) << 23
. Additionally, range for both inputs is inclusive of STOP. The comments have been updated reflecting these changes.