[libc-commits] [libc] [libc][mathvec] Vectorise cosf (PR #224290)
via libc-commits
libc-commits at lists.llvm.org
Tue Sep 29 12:49:40 PDT 2026
================
@@ -17,12 +18,56 @@
#include "hdr/math_macros.h"
-#define EXPECT_SIMD_EQ(REF, RES) \
+namespace LIBC_NAMESPACE_DECL {
+namespace testing {
+
+template <typename T>
+inline bool within_ulp_tolerance(T expected, T actual, uint64_t tolerance) {
+ fputil::FPBits<T> expected_bits(expected), actual_bits(actual);
+
+ // Handle inf and nan cases.
+ if (expected_bits.is_inf() || expected_bits.is_inf())
----------------
DylanFleming-arm wrote:
Oh whoops. I completely did mean that yes, That's my bad :')
I'll fix it now, thanks.
https://github.com/llvm/llvm-project/pull/224290
More information about the libc-commits
mailing list