[libc-commits] [libc] de19101 - [libc][NFC] Set rounding mode for sincosf exhaustive test.
Tue Ly via libc-commits
libc-commits at lists.llvm.org
Wed Jun 28 17:31:42 PDT 2023
Author: Tue Ly
Date: 2023-06-28T20:30:54-04:00
New Revision: de19101e3302f4423f4946b1a916a4d19260d6ac
URL: https://github.com/llvm/llvm-project/commit/de19101e3302f4423f4946b1a916a4d19260d6ac
DIFF: https://github.com/llvm/llvm-project/commit/de19101e3302f4423f4946b1a916a4d19260d6ac.diff
LOG: [libc][NFC] Set rounding mode for sincosf exhaustive test.
Added:
Modified:
libc/test/src/math/exhaustive/sincosf_test.cpp
Removed:
################################################################################
diff --git a/libc/test/src/math/exhaustive/sincosf_test.cpp b/libc/test/src/math/exhaustive/sincosf_test.cpp
index dfc222821ecb1..19179243047c0 100644
--- a/libc/test/src/math/exhaustive/sincosf_test.cpp
+++ b/libc/test/src/math/exhaustive/sincosf_test.cpp
@@ -18,6 +18,9 @@ struct SincosfChecker : public virtual __llvm_libc::testing::Test {
using UIntType = uint32_t;
uint64_t check(UIntType start, UIntType stop, mpfr::RoundingMode rounding) {
+ mpfr::ForceRoundingMode r(rounding);
+ if (!r.success)
+ return (stop > start);
UIntType bits = start;
uint64_t failed = 0;
do {
More information about the libc-commits
mailing list