Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions libc/test/src/math/smoke/rsqrtf16_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "hdr/errno_macros.h"
#include "src/__support/FPUtil/cast.h"
#include "src/__support/macros/properties/architectures.h"
#include "src/math/rsqrtf16.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
Expand All @@ -19,7 +20,12 @@ TEST_F(LlvmLibcRsqrtf16Test, SpecialNumbers) {
EXPECT_FP_EQ(aNaN, LIBC_NAMESPACE::rsqrtf16(aNaN));
EXPECT_MATH_ERRNO(0);

// TODO: investigate why the exception is not raised on aarch64 post-build CI.
#ifdef LIBC_TARGET_ARCH_IS_AARCH64
EXPECT_FP_EQ(aNaN, LIBC_NAMESPACE::rsqrtf16(sNaN));
#else
EXPECT_FP_IS_NAN_WITH_EXCEPTION(LIBC_NAMESPACE::rsqrtf16(sNaN), FE_INVALID);
#endif // LIBC_TARGET_ARCH_IS_AARCH64
EXPECT_MATH_ERRNO(0);

EXPECT_FP_EQ(inf, LIBC_NAMESPACE::rsqrtf16(zero));
Expand Down
Loading