[libc-commits] [libc] 852a20e - [libc][math] Implement isnanf16 header-only function (#198115)

via libc-commits libc-commits at lists.llvm.org
Sun May 24 08:28:55 PDT 2026


Author: Aayush Shrivastava
Date: 2026-05-24T11:28:50-04:00
New Revision: 852a20e6d1caf3cb54ce31956aa947bcf3f1a77b

URL: https://github.com/llvm/llvm-project/commit/852a20e6d1caf3cb54ce31956aa947bcf3f1a77b
DIFF: https://github.com/llvm/llvm-project/commit/852a20e6d1caf3cb54ce31956aa947bcf3f1a77b.diff

LOG: [libc][math] Implement isnanf16 header-only function (#198115)

Adds `isnanf16` the float16 variant of isnan as part of issue
[#195400](https://github.com/llvm/llvm-project/issues/195400), which
tracks adding missing isnan variants for extended floating-point types.

The implementation follows the same pattern as the existing `isnanf`,
`isnan`, and `isnanl` functions.

---------

Co-authored-by: Victor Campos <github at victorcampos.me>

Added: 
    libc/shared/math/isnanf16.h
    libc/src/__support/math/isnanf16.h
    libc/src/math/generic/isnanf16.cpp
    libc/src/math/isnanf16.h
    libc/test/src/math/smoke/IsNanTest.h
    libc/test/src/math/smoke/isnanf16_test.cpp

Modified: 
    libc/config/baremetal/aarch64/entrypoints.txt
    libc/config/baremetal/arm/entrypoints.txt
    libc/config/baremetal/riscv/entrypoints.txt
    libc/config/darwin/aarch64/entrypoints.txt
    libc/config/gpu/amdgpu/entrypoints.txt
    libc/config/gpu/nvptx/entrypoints.txt
    libc/config/linux/aarch64/entrypoints.txt
    libc/config/linux/riscv/entrypoints.txt
    libc/config/linux/x86_64/entrypoints.txt
    libc/include/math.yaml
    libc/shared/math.h
    libc/src/__support/math/CMakeLists.txt
    libc/src/math/CMakeLists.txt
    libc/src/math/generic/CMakeLists.txt
    libc/test/shared/CMakeLists.txt
    libc/test/shared/shared_math_constexpr_test.cpp
    libc/test/shared/shared_math_test.cpp
    libc/test/src/math/smoke/CMakeLists.txt
    utils/bazel/llvm-project-overlay/libc/BUILD.bazel

Removed: 
    


################################################################################
diff  --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index dcb50135232e2..746bdc0a64ee7 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -653,6 +653,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index fac62bac939cc..a43bbb865bafd 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -665,6 +665,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index a3b96225ff09d..fd5d92321a746 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -661,6 +661,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 914d2b7918da1..01ae40c898734 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -474,6 +474,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index c76900a8371f7..bbd15a131ca24 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -595,6 +595,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 6538732f785f5..ade635e095994 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -597,6 +597,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index a50923fddec54..485c1cbaccf89 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -769,6 +769,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.getpayloadf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 51c769d853a52..a18508ccdc2ec 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -785,6 +785,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 5545790fecd85..034249d900565 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -849,6 +849,7 @@ if(LIBC_TYPES_HAS_FLOAT16)
     libc.src.math.hypotf16
     libc.src.math.ilogbf16
     libc.src.math.iscanonicalf16
+    libc.src.math.isnanf16
     libc.src.math.issignalingf16
     libc.src.math.ldexpf16
     libc.src.math.llogbf16

diff  --git a/libc/include/math.yaml b/libc/include/math.yaml
index 36ff380a1b305..b87044e1f1533 100644
--- a/libc/include/math.yaml
+++ b/libc/include/math.yaml
@@ -1606,6 +1606,13 @@ functions:
     return_type: int
     arguments:
       - type: long double
+  - name: isnanf16
+    standards:
+      - bsd
+    return_type: int
+    arguments:
+      - type: _Float16
+    guard: LIBC_TYPES_HAS_FLOAT16
   - name: ldexp
     standards:
       - stdc

diff  --git a/libc/shared/math.h b/libc/shared/math.h
index 2baeb07294a3b..e75c4b2d229ba 100644
--- a/libc/shared/math.h
+++ b/libc/shared/math.h
@@ -291,6 +291,7 @@
 // TODO: isnan is a macro in <math.h>
 // #include "math/isnan.h"
 #include "math/isnanf.h"
+#include "math/isnanf16.h"
 #include "math/isnanl.h"
 // TODO: issignaling is a macro in <math.h>
 // #include "math/issignaling.h"

diff  --git a/libc/shared/math/isnanf16.h b/libc/shared/math/isnanf16.h
new file mode 100644
index 0000000000000..cac3b1ee13f51
--- /dev/null
+++ b/libc/shared/math/isnanf16.h
@@ -0,0 +1,29 @@
+//===-- Shared isnanf16 function --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SHARED_MATH_ISNANF16_H
+#define LLVM_LIBC_SHARED_MATH_ISNANF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "shared/libc_common.h"
+#include "src/__support/math/isnanf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace shared {
+
+using math::isnanf16;
+
+} // namespace shared
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#endif // LLVM_LIBC_SHARED_MATH_ISNANF16_H

diff  --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 9e3ec26cdc881..b6b397c88a256 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -1704,6 +1704,16 @@ add_header_library(
     libc.src.__support.macros.config
 )
 
+add_header_library(
+  isnanf16
+  HDRS
+    isnanf16.h
+  DEPENDS
+    libc.include.llvm-libc-macros.float16_macros
+    libc.src.__support.FPUtil.fp_bits
+    libc.src.__support.macros.config
+)
+
 add_header_library(
   issignaling
   HDRS

diff  --git a/libc/src/__support/math/isnanf16.h b/libc/src/__support/math/isnanf16.h
new file mode 100644
index 0000000000000..2f18fca5f53b7
--- /dev/null
+++ b/libc/src/__support/math/isnanf16.h
@@ -0,0 +1,31 @@
+//===-- Implementation header for isnanf16 ----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_ISNANF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_ISNANF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace math {
+
+LIBC_INLINE constexpr int isnanf16(float16 x) {
+  return fputil::FPBits<float16>(x).is_nan();
+}
+
+} // namespace math
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LIBC_TYPES_HAS_FLOAT16
+
+#endif // LLVM_LIBC_SRC___SUPPORT_MATH_ISNANF16_H

diff  --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index b53817e2a1729..730c0c06073e1 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -367,6 +367,7 @@ add_math_entrypoint_object(ilogbbf16)
 
 add_math_entrypoint_object(isnan)
 add_math_entrypoint_object(isnanf)
+add_math_entrypoint_object(isnanf16)
 add_math_entrypoint_object(isnanl)
 
 add_math_entrypoint_object(issignaling)

diff  --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 7ccbddba07b8d..4c3eac4c3356c 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -3041,6 +3041,16 @@ add_entrypoint_object(
     libc.src.__support.math.isnanl
 )
 
+add_entrypoint_object(
+  isnanf16
+  SRCS
+    isnanf16.cpp
+  HDRS
+    ../isnanf16.h
+  DEPENDS
+    libc.src.__support.math.isnanf16
+)
+
 add_entrypoint_object(
   nan
   SRCS

diff  --git a/libc/src/math/generic/isnanf16.cpp b/libc/src/math/generic/isnanf16.cpp
new file mode 100644
index 0000000000000..9e372aee43f41
--- /dev/null
+++ b/libc/src/math/generic/isnanf16.cpp
@@ -0,0 +1,16 @@
+//===-- Implementation of isnanf16 function -------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/math/isnanf16.h"
+#include "src/__support/math/isnanf16.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, isnanf16, (float16 x)) { return math::isnanf16(x); }
+
+} // namespace LIBC_NAMESPACE_DECL

diff  --git a/libc/src/math/isnanf16.h b/libc/src/math/isnanf16.h
new file mode 100644
index 0000000000000..7dd2656b2c097
--- /dev/null
+++ b/libc/src/math/isnanf16.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for isnanf16 ----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_MATH_ISNANF16_H
+#define LLVM_LIBC_SRC_MATH_ISNANF16_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int isnanf16(float16 x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISNANF16_H

diff  --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 84a8d4bf79b3d..e86b0a45eb77c 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -286,6 +286,7 @@ add_fp_unittest(
     libc.src.__support.math.iscanonicall
     libc.src.__support.math.isnan
     libc.src.__support.math.isnanf
+    libc.src.__support.math.isnanf16
     libc.src.__support.math.isnanl
     libc.src.__support.math.issignaling
     libc.src.__support.math.issignalingbf16
@@ -658,6 +659,7 @@ add_fp_unittest(
     libc.src.__support.math.iscanonicall
     libc.src.__support.math.isnan
     libc.src.__support.math.isnanf
+    libc.src.__support.math.isnanf16
     libc.src.__support.math.isnanl
     libc.src.__support.math.issignaling
     libc.src.__support.math.issignalingbf16

diff  --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 821042e1dab92..6bf9af057a7d3 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -266,6 +266,7 @@ static_assert(0.0f16 == LIBC_NAMESPACE::shared::nearbyintf16(0.0f16));
 static_assert(0.0f16 == LIBC_NAMESPACE::shared::nextafterf16(0.0f16, 0.0f16));
 static_assert(0.0f16 == LIBC_NAMESPACE::shared::rintf16(0.0f16));
 static_assert(1 == LIBC_NAMESPACE::shared::iscanonicalf16(0.0f16));
+static_assert(0 == LIBC_NAMESPACE::shared::isnanf16(0.0f16));
 static_assert(0.0 == LIBC_NAMESPACE::shared::issignalingf16(0.0f16));
 static_assert(1 == [] {
   const char arg{};

diff  --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index d872a8e0ec759..571861ecbdfae 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -150,6 +150,7 @@ TEST(LlvmLibcSharedMathTest, AllFloat16) {
   EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::nearbyintf16(0.0f16));
   EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::rintf16(0.0f16));
   EXPECT_EQ(1, LIBC_NAMESPACE::shared::iscanonicalf16(0.0f16));
+  EXPECT_EQ(0, LIBC_NAMESPACE::shared::isnanf16(0.0f16));
   EXPECT_EQ(0, LIBC_NAMESPACE::shared::issignalingf16(0.0f16));
   EXPECT_TRUE(FPBits(LIBC_NAMESPACE::shared::nanf16("")).is_nan());
   EXPECT_FP_EQ(0x0p+0f16, LIBC_NAMESPACE::shared::roundf16(0.0f16));

diff  --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 28b85b1a25bbd..bb462afb71b91 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -2132,6 +2132,18 @@ add_fp_unittest(
     libc.src.__support.FPUtil.bfloat16
 )
 
+add_fp_unittest(
+  isnanf16_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    isnanf16_test.cpp
+  HDRS
+    IsNanTest.h
+  DEPENDS
+    libc.src.math.isnanf16
+)
+
 add_fp_unittest(
   llogb_test
   SUITE

diff  --git a/libc/test/src/math/smoke/IsNanTest.h b/libc/test/src/math/smoke/IsNanTest.h
new file mode 100644
index 0000000000000..4f33af86f4c4f
--- /dev/null
+++ b/libc/test/src/math/smoke/IsNanTest.h
@@ -0,0 +1,56 @@
+//===-- Utility class to test 
diff erent flavors of isnan --------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISNANTEST_H
+#define LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISNANTEST_H
+
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+template <typename T>
+class IsNanTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
+
+  DECLARE_SPECIAL_CONSTANTS(T)
+
+public:
+  using IsNanFunc = int (*)(T);
+
+  void testSpecialNumbers(IsNanFunc func) {
+    EXPECT_EQ(func(aNaN), 1);
+    EXPECT_EQ(func(neg_aNaN), 1);
+    EXPECT_EQ(func(sNaN), 1);
+    EXPECT_EQ(func(neg_sNaN), 1);
+    EXPECT_EQ(func(inf), 0);
+    EXPECT_EQ(func(neg_inf), 0);
+    EXPECT_EQ(func(min_normal), 0);
+    EXPECT_EQ(func(max_normal), 0);
+    EXPECT_EQ(func(neg_max_normal), 0);
+    EXPECT_EQ(func(min_denormal), 0);
+    EXPECT_EQ(func(neg_min_denormal), 0);
+    EXPECT_EQ(func(max_denormal), 0);
+    EXPECT_EQ(func(zero), 0);
+    EXPECT_EQ(func(neg_zero), 0);
+  }
+
+  void testRoundedNumbers(IsNanFunc func) {
+    EXPECT_EQ(func(T(1.0)), 0);
+    EXPECT_EQ(func(T(-1.0)), 0);
+    EXPECT_EQ(func(T(10.0)), 0);
+    EXPECT_EQ(func(T(-10.0)), 0);
+    EXPECT_EQ(func(T(1234.0)), 0);
+    EXPECT_EQ(func(T(-1234.0)), 0);
+  }
+};
+
+#define LIST_ISNAN_TESTS(T, func)                                              \
+  using LlvmLibcIsNanTest = IsNanTest<T>;                                      \
+  TEST_F(LlvmLibcIsNanTest, SpecialNumbers) { testSpecialNumbers(&func); }     \
+  TEST_F(LlvmLibcIsNanTest, RoundedNumbers) { testRoundedNumbers(&func); }
+
+#endif // LLVM_LIBC_TEST_SRC_MATH_SMOKE_ISNANTEST_H

diff  --git a/libc/test/src/math/smoke/isnanf16_test.cpp b/libc/test/src/math/smoke/isnanf16_test.cpp
new file mode 100644
index 0000000000000..a398a0b44dd90
--- /dev/null
+++ b/libc/test/src/math/smoke/isnanf16_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for isnanf16 --------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "IsNanTest.h"
+
+#include "src/math/isnanf16.h"
+
+LIST_ISNAN_TESTS(float16, LIBC_NAMESPACE::isnanf16)

diff  --git a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
index 87963e4524b39..cccebe6468fd3 100644
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -5316,6 +5316,16 @@ libc_support_library(
     ],
 )
 
+libc_support_library(
+    name = "__support_math_isnanf16",
+    hdrs = ["src/__support/math/isnanf16.h"],
+    deps = [
+        ":__support_fputil_fp_bits",
+        ":__support_macros_config",
+        ":llvm_libc_macros_float16_macros",
+    ],
+)
+
 libc_support_library(
     name = "__support_math_issignaling",
     hdrs = ["src/__support/math/issignaling.h"],
@@ -9931,6 +9941,13 @@ libc_math_function(
     ],
 )
 
+libc_math_function(
+    name = "isnanf16",
+    additional_deps = [
+        ":__support_math_isnanf16",
+    ],
+)
+
 libc_math_function(
     name = "issignaling",
     additional_deps = [


        


More information about the libc-commits mailing list