[libc-commits] [libc] [libc][math][c++23] Add {canonicalize, iscanonical, fdim, copysign, issignaling}bf16 math functions (PR #155567)

Krishna Pandey via libc-commits libc-commits at lists.llvm.org
Wed Aug 27 00:31:43 PDT 2025


https://github.com/krishna2803 created https://github.com/llvm/llvm-project/pull/155567

This PR adds the following basic math functions for BFloat16 type along with the tests:
- canonicalizebf16
- iscanonicalbf16
- fdimbf16
- copysignbf16
- issignalingbf16

>From 64121d4437c4f167afe91ca7cabc2a1719687d2c Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:05:28 +0530
Subject: [PATCH 1/7] feat: implement
 {canonicalize,iscanonical,fdim,copysign,issignaling}bf16 math functions

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/src/math/canonicalizebf16.h           | 21 +++++++++++++++++++++
 libc/src/math/copysignbf16.h               | 21 +++++++++++++++++++++
 libc/src/math/fdimbf16.h                   | 21 +++++++++++++++++++++
 libc/src/math/generic/canonicalizebf16.cpp | 21 +++++++++++++++++++++
 libc/src/math/generic/copysignbf16.cpp     | 21 +++++++++++++++++++++
 libc/src/math/generic/fdimbf16.cpp         | 21 +++++++++++++++++++++
 libc/src/math/generic/iscanonicalbf16.cpp  | 22 ++++++++++++++++++++++
 libc/src/math/generic/issignalingbf16.cpp  | 21 +++++++++++++++++++++
 libc/src/math/iscanonicalbf16.h            | 21 +++++++++++++++++++++
 libc/src/math/issignalingbf16.h            | 21 +++++++++++++++++++++
 10 files changed, 211 insertions(+)
 create mode 100644 libc/src/math/canonicalizebf16.h
 create mode 100644 libc/src/math/copysignbf16.h
 create mode 100644 libc/src/math/fdimbf16.h
 create mode 100644 libc/src/math/generic/canonicalizebf16.cpp
 create mode 100644 libc/src/math/generic/copysignbf16.cpp
 create mode 100644 libc/src/math/generic/fdimbf16.cpp
 create mode 100644 libc/src/math/generic/iscanonicalbf16.cpp
 create mode 100644 libc/src/math/generic/issignalingbf16.cpp
 create mode 100644 libc/src/math/iscanonicalbf16.h
 create mode 100644 libc/src/math/issignalingbf16.h

diff --git a/libc/src/math/canonicalizebf16.h b/libc/src/math/canonicalizebf16.h
new file mode 100644
index 0000000000000..858fa32969868
--- /dev/null
+++ b/libc/src/math/canonicalizebf16.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for canonicalizebf16 --------------*- 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_CANONICALIZEBF16_H
+#define LLVM_LIBC_SRC_MATH_CANONICALIZEBF16_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int canonicalizebf16(bfloat16 *cx, const bfloat16 *x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_CANONICALIZEBF16_H
diff --git a/libc/src/math/copysignbf16.h b/libc/src/math/copysignbf16.h
new file mode 100644
index 0000000000000..6369616d6f569
--- /dev/null
+++ b/libc/src/math/copysignbf16.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for copysignbf16 ------------------*- 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_COPYSIGNBF16_H
+#define LLVM_LIBC_SRC_MATH_COPYSIGNBF16_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+bfloat16 copysignbf16(bfloat16 x, bfloat16 y);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_COPYSIGNBF16_H
diff --git a/libc/src/math/fdimbf16.h b/libc/src/math/fdimbf16.h
new file mode 100644
index 0000000000000..75bec34b70db2
--- /dev/null
+++ b/libc/src/math/fdimbf16.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for fdimbf16 ----------------------*- 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_FDIMBF16_H
+#define LLVM_LIBC_SRC_MATH_FDIMBF16_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+bfloat16 fdimbf16(bfloat16 x, bfloat16 y);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_FDIMBF16_H
diff --git a/libc/src/math/generic/canonicalizebf16.cpp b/libc/src/math/generic/canonicalizebf16.cpp
new file mode 100644
index 0000000000000..9cc379060c3de
--- /dev/null
+++ b/libc/src/math/generic/canonicalizebf16.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of canonicalizebf16 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/canonicalizebf16.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, canonicalizebf16, (bfloat16 * cx, const bfloat16 *x)) {
+  return fputil::canonicalize(*cx, *x);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/copysignbf16.cpp b/libc/src/math/generic/copysignbf16.cpp
new file mode 100644
index 0000000000000..48ade2b26981c
--- /dev/null
+++ b/libc/src/math/generic/copysignbf16.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of copysignbf16 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/copysignbf16.h"
+#include "src/__support/FPUtil/ManipulationFunctions.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(bfloat16, copysignbf16, (bfloat16 x, bfloat16 y)) {
+  return fputil::copysign(x, y);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/fdimbf16.cpp b/libc/src/math/generic/fdimbf16.cpp
new file mode 100644
index 0000000000000..0f54055b763e1
--- /dev/null
+++ b/libc/src/math/generic/fdimbf16.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of fdimbf16 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/fdimbf16.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(bfloat16, fdimbf16, (bfloat16 x, bfloat16 y)) {
+  return fputil::fdim(x, y);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/iscanonicalbf16.cpp b/libc/src/math/generic/iscanonicalbf16.cpp
new file mode 100644
index 0000000000000..34c11bfcb83d5
--- /dev/null
+++ b/libc/src/math/generic/iscanonicalbf16.cpp
@@ -0,0 +1,22 @@
+//===-- Implementation of iscanonicalbf16 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/iscanonicalbf16.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, iscanonicalbf16, (bfloat16 x)) {
+  bfloat16 tmp;
+  return fputil::canonicalize(tmp, x) == 0;
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/issignalingbf16.cpp b/libc/src/math/generic/issignalingbf16.cpp
new file mode 100644
index 0000000000000..3bb17efaa0ffe
--- /dev/null
+++ b/libc/src/math/generic/issignalingbf16.cpp
@@ -0,0 +1,21 @@
+//===-- Implementation of issignalingbf16 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/issignalingbf16.h"
+#include "src/__support/FPUtil/BasicOperations.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/common.h"
+#include "src/__support/macros/config.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+LLVM_LIBC_FUNCTION(int, issignalingbf16, (bfloat16 x)) {
+  return fputil::issignaling_impl(x);
+}
+
+} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/iscanonicalbf16.h b/libc/src/math/iscanonicalbf16.h
new file mode 100644
index 0000000000000..f4f975ed9b24e
--- /dev/null
+++ b/libc/src/math/iscanonicalbf16.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for iscanonicalbf16 ---------------*- 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_ISCANONICALBF16_H
+#define LLVM_LIBC_SRC_MATH_ISCANONICALBF16_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int iscanonicalbf16(bfloat16 x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISCANONICALBF16_H
diff --git a/libc/src/math/issignalingbf16.h b/libc/src/math/issignalingbf16.h
new file mode 100644
index 0000000000000..afbe70fddf1c0
--- /dev/null
+++ b/libc/src/math/issignalingbf16.h
@@ -0,0 +1,21 @@
+//===-- Implementation header for issignalingbf16 ---------------*- 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_ISSIGNALINGBF16_H
+#define LLVM_LIBC_SRC_MATH_ISSIGNALINGBF16_H
+
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+int issignalingbf16(bfloat16 x);
+
+} // namespace LIBC_NAMESPACE_DECL
+
+#endif // LLVM_LIBC_SRC_MATH_ISSIGNALINGBF16_H

>From ff3915c7c47cb3e461cae99034d53229814f0c88 Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:05:57 +0530
Subject: [PATCH 2/7] chore: update CMakeLists

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/src/math/CMakeLists.txt         |  5 ++
 libc/src/math/generic/CMakeLists.txt | 72 ++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+)

diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index 95e5ae781490f..e6a2f868e46b5 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -78,12 +78,14 @@ add_math_entrypoint_object(canonicalizef)
 add_math_entrypoint_object(canonicalizel)
 add_math_entrypoint_object(canonicalizef16)
 add_math_entrypoint_object(canonicalizef128)
+add_math_entrypoint_object(canonicalizebf16)
 
 add_math_entrypoint_object(iscanonical)
 add_math_entrypoint_object(iscanonicalf)
 add_math_entrypoint_object(iscanonicall)
 add_math_entrypoint_object(iscanonicalf16)
 add_math_entrypoint_object(iscanonicalf128)
+add_math_entrypoint_object(iscanonicalbf16)
 
 add_math_entrypoint_object(cbrt)
 add_math_entrypoint_object(cbrtf)
@@ -100,6 +102,7 @@ add_math_entrypoint_object(copysignf)
 add_math_entrypoint_object(copysignl)
 add_math_entrypoint_object(copysignf16)
 add_math_entrypoint_object(copysignf128)
+add_math_entrypoint_object(copysignbf16)
 
 add_math_entrypoint_object(cos)
 add_math_entrypoint_object(cosf)
@@ -203,6 +206,7 @@ add_math_entrypoint_object(fdimf)
 add_math_entrypoint_object(fdiml)
 add_math_entrypoint_object(fdimf16)
 add_math_entrypoint_object(fdimf128)
+add_math_entrypoint_object(fdimbf16)
 
 add_math_entrypoint_object(fdiv)
 add_math_entrypoint_object(fdivl)
@@ -355,6 +359,7 @@ add_math_entrypoint_object(issignalingf)
 add_math_entrypoint_object(issignalingl)
 add_math_entrypoint_object(issignalingf16)
 add_math_entrypoint_object(issignalingf128)
+add_math_entrypoint_object(issignalingbf16)
 
 add_math_entrypoint_object(llogb)
 add_math_entrypoint_object(llogbf)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index ba71e5f9e1260..70ca5c51990de 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -52,6 +52,20 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.basic_operations
 )
 
+add_entrypoint_object(
+  canonicalizebf16
+  SRCS
+    canonicalizebf16.cpp
+  HDRS
+    ../canonicalizebf16.h
+  DEPENDS
+    libc.src.__support.common
+    libc.src.__support.macros.config
+    libc.src.__support.macros.properties.types
+    libc.src.__support.FPUtil.basic_operations
+    libc.src.__support.FPUtil.bfloat16
+)
+
 add_entrypoint_object(
   iscanonical
   SRCS
@@ -96,6 +110,20 @@ add_entrypoint_object(
     libc.src.__support.macros.properties.types
 )
 
+add_entrypoint_object(
+  iscanonicalbf16
+  SRCS
+    iscanonicalbf16.cpp
+  HDRS
+    ../iscanonicalbf16.h
+  DEPENDS
+    libc.src.__support.common
+    libc.src.__support.macros.config
+    libc.src.__support.macros.properties.types
+    libc.src.__support.FPUtil.basic_operations
+    libc.src.__support.FPUtil.bfloat16
+)
+
 add_entrypoint_object(
   ceil
   SRCS
@@ -1748,6 +1776,22 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.manipulation_functions
 )
 
+add_entrypoint_object(
+  copysignbf16
+  SRCS
+    copysignbf16.cpp
+  HDRS
+    ../copysignbf16.h
+  DEPENDS
+    libc.src.__support.common
+    libc.src.__support.macros.config
+    libc.src.__support.macros.properties.types
+    libc.src.__support.FPUtil.bfloat16
+    libc.src.__support.FPUtil.manipulation_functions
+  FLAGS
+    MISC_MATH_BASIC_OPS_OPT
+)
+
 add_entrypoint_object(
   frexp
   SRCS
@@ -3427,6 +3471,20 @@ add_entrypoint_object(
     libc.src.__support.FPUtil.basic_operations
 )
 
+add_entrypoint_object(
+  fdimbf16
+  SRCS
+    fdimbf16.cpp
+  HDRS
+    ../fdimbf16.h
+  DEPENDS
+    libc.src.__support.common
+    libc.src.__support.macros.config
+    libc.src.__support.macros.properties.types
+    libc.src.__support.FPUtil.basic_operations
+    libc.src.__support.FPUtil.bfloat16
+)
+
 add_entrypoint_object(
   fdiv
   SRCS
@@ -3543,6 +3601,20 @@ add_entrypoint_object(
     libc.src.__support.macros.properties.types
 )
 
+add_entrypoint_object(
+  issignalingbf16
+  SRCS
+    issignalingbf16.cpp
+  HDRS
+    ../issignalingbf16.h
+  DEPENDS
+    libc.src.__support.common
+    libc.src.__support.macros.config
+    libc.src.__support.macros.properties.types
+    libc.src.__support.FPUtil.basic_operations
+    libc.src.__support.FPUtil.bfloat16
+)
+
 add_entrypoint_object(
   isnan
   SRCS

>From cbdfc66f487e4b7bd6be5207874847bf52236ea6 Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:06:13 +0530
Subject: [PATCH 3/7] chore: add smoke tests for
 {canonicalize,iscanonical,fdim,copysign,issignaling}bf16 math functions

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/test/src/math/smoke/CMakeLists.txt       | 72 +++++++++++++++++++
 .../src/math/smoke/canonicalizebf16_test.cpp  | 14 ++++
 .../test/src/math/smoke/copysignbf16_test.cpp | 14 ++++
 libc/test/src/math/smoke/fdimbf16_test.cpp    | 14 ++++
 .../src/math/smoke/iscanonicalbf16_test.cpp   | 14 ++++
 .../src/math/smoke/issignalingbf16_test.cpp   | 14 ++++
 6 files changed, 142 insertions(+)
 create mode 100644 libc/test/src/math/smoke/canonicalizebf16_test.cpp
 create mode 100644 libc/test/src/math/smoke/copysignbf16_test.cpp
 create mode 100644 libc/test/src/math/smoke/fdimbf16_test.cpp
 create mode 100644 libc/test/src/math/smoke/iscanonicalbf16_test.cpp
 create mode 100644 libc/test/src/math/smoke/issignalingbf16_test.cpp

diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index a5f856f05bb8c..0497d5e0c06ed 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -432,6 +432,22 @@ add_fp_unittest(
     libc.src.__support.integer_literals
 )
 
+add_fp_unittest(
+  canonicalizebf16_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    canonicalizebf16_test.cpp
+  HDRS
+    CanonicalizeTest.h
+  DEPENDS
+    libc.src.math.canonicalizebf16
+    libc.src.__support.FPUtil.bfloat16
+    libc.src.__support.FPUtil.fp_bits
+    libc.src.__support.FPUtil.fenv_impl
+    libc.src.__support.integer_literals
+)
+
 add_fp_unittest(
   iscanonical_test
   SUITE
@@ -492,6 +508,19 @@ add_fp_unittest(
     libc.src.math.iscanonicalf128
 )
 
+add_fp_unittest(
+  iscanonicalbf16_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    iscanonicalbf16_test.cpp
+  HDRS
+    IsCanonicalTest.h
+  DEPENDS
+    libc.src.math.iscanonicalbf16
+    libc.src.__support.FPUtil.bfloat16
+)
+
 add_fp_unittest(
   ceil_test
   SUITE
@@ -1559,6 +1588,21 @@ add_fp_unittest(
     libc.src.__support.FPUtil.fp_bits
 )
 
+add_fp_unittest(
+  copysignbf16_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    copysignbf16_test.cpp
+  HDRS
+    CopySignTest.h
+  DEPENDS
+    libc.src.math.copysignbf16
+    libc.src.__support.CPP.algorithm
+    libc.src.__support.FPUtil.bfloat16
+    libc.src.__support.FPUtil.fp_bits
+)
+
 add_fp_unittest(
   frexp_test
   SUITE
@@ -2076,6 +2120,19 @@ add_fp_unittest(
     libc.src.math.issignalingf128
 )
 
+add_fp_unittest(
+  issignalingbf16_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    issignalingbf16_test.cpp
+  HDRS
+    IsSignalingTest.h
+  DEPENDS
+    libc.src.math.issignalingbf16
+    libc.src.__support.FPUtil.bfloat16
+)
+
 add_fp_unittest(
   llogb_test
   SUITE
@@ -2510,6 +2567,21 @@ add_fp_unittest(
     libc.src.__support.FPUtil.fp_bits
 )
 
+add_fp_unittest(
+  fdimbf16_test
+  SUITE
+    libc-math-smoke-tests
+  SRCS
+    fdimbf16_test.cpp
+  HDRS
+    FDimTest.h
+  DEPENDS
+    libc.src.math.fdimbf16
+    libc.src.__support.CPP.algorithm
+    libc.src.__support.FPUtil.bfloat16
+    libc.src.__support.FPUtil.fp_bits
+)
+
 add_fp_unittest(
   fminf_test
   SUITE
diff --git a/libc/test/src/math/smoke/canonicalizebf16_test.cpp b/libc/test/src/math/smoke/canonicalizebf16_test.cpp
new file mode 100644
index 0000000000000..bf955c26ebc4f
--- /dev/null
+++ b/libc/test/src/math/smoke/canonicalizebf16_test.cpp
@@ -0,0 +1,14 @@
+//===-- Unittests for canonicalizebf16 ------------------------------------===//
+//
+// 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 "CanonicalizeTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/canonicalizebf16.h"
+
+LIST_CANONICALIZE_TESTS(bfloat16, LIBC_NAMESPACE::canonicalizebf16)
diff --git a/libc/test/src/math/smoke/copysignbf16_test.cpp b/libc/test/src/math/smoke/copysignbf16_test.cpp
new file mode 100644
index 0000000000000..71a97e37a7491
--- /dev/null
+++ b/libc/test/src/math/smoke/copysignbf16_test.cpp
@@ -0,0 +1,14 @@
+//===-- Unittests for copysignbf16 ----------------------------------------===//
+//
+// 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 "CopySignTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/copysignbf16.h"
+
+LIST_COPYSIGN_TESTS(bfloat16, LIBC_NAMESPACE::copysignbf16)
diff --git a/libc/test/src/math/smoke/fdimbf16_test.cpp b/libc/test/src/math/smoke/fdimbf16_test.cpp
new file mode 100644
index 0000000000000..43e8039053fdf
--- /dev/null
+++ b/libc/test/src/math/smoke/fdimbf16_test.cpp
@@ -0,0 +1,14 @@
+//===-- Unittests for fdimbf16 --------------------------------------------===//
+//
+// 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 "FDimTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fdimbf16.h"
+
+LIST_FDIM_TESTS(bfloat16, LIBC_NAMESPACE::fdimbf16);
diff --git a/libc/test/src/math/smoke/iscanonicalbf16_test.cpp b/libc/test/src/math/smoke/iscanonicalbf16_test.cpp
new file mode 100644
index 0000000000000..3d735882e82a3
--- /dev/null
+++ b/libc/test/src/math/smoke/iscanonicalbf16_test.cpp
@@ -0,0 +1,14 @@
+//===-- Unittests for iscanonicalbf16 -------------------------------------===//
+//
+// 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 "IsCanonicalTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/iscanonicalbf16.h"
+
+LIST_ISCANONICAL_TESTS(bfloat16, LIBC_NAMESPACE::iscanonicalbf16)
diff --git a/libc/test/src/math/smoke/issignalingbf16_test.cpp b/libc/test/src/math/smoke/issignalingbf16_test.cpp
new file mode 100644
index 0000000000000..ed7e5af4aa41f
--- /dev/null
+++ b/libc/test/src/math/smoke/issignalingbf16_test.cpp
@@ -0,0 +1,14 @@
+//===-- Unittests for issignalingbf16 -------------------------------------===//
+//
+// 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 "IsSignalingTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/issignalingbf16.h"
+
+LIST_ISSIGNALING_TESTS(bfloat16, LIBC_NAMESPACE::issignalingbf16)

>From 170f9b2204546869db58a3882afe46430b36a8e0 Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:06:44 +0530
Subject: [PATCH 4/7] fix: add 0 to T cast

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/src/__support/FPUtil/BasicOperations.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/__support/FPUtil/BasicOperations.h b/libc/src/__support/FPUtil/BasicOperations.h
index 2357b053b60b8..ca7be6676630a 100644
--- a/libc/src/__support/FPUtil/BasicOperations.h
+++ b/libc/src/__support/FPUtil/BasicOperations.h
@@ -244,7 +244,7 @@ LIBC_INLINE T fdim(T x, T y) {
     return y;
   }
 
-  return (x > y ? x - y : 0);
+  return (x > y ? x - y : T(0));
 }
 
 // Avoid reusing `issignaling` macro.

>From ceb8818a9f86de8a85bfb8a52e2aac69738f1237 Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:09:38 +0530
Subject: [PATCH 5/7] chore: update entrypoints

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/config/baremetal/aarch64/entrypoints.txt | 5 +++++
 libc/config/baremetal/arm/entrypoints.txt     | 5 +++++
 libc/config/baremetal/riscv/entrypoints.txt   | 5 +++++
 libc/config/darwin/aarch64/entrypoints.txt    | 5 +++++
 libc/config/darwin/x86_64/entrypoints.txt     | 5 +++++
 libc/config/gpu/amdgpu/entrypoints.txt        | 5 +++++
 libc/config/gpu/nvptx/entrypoints.txt         | 5 +++++
 libc/config/linux/aarch64/entrypoints.txt     | 5 +++++
 libc/config/linux/arm/entrypoints.txt         | 5 +++++
 libc/config/linux/riscv/entrypoints.txt       | 5 +++++
 libc/config/linux/x86_64/entrypoints.txt      | 5 +++++
 libc/config/windows/entrypoints.txt           | 5 +++++
 12 files changed, 60 insertions(+)

diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index c2e4c337f199a..ce6d0a7e440a4 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -772,8 +772,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -790,6 +793,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index c4f3a87659b23..d8fffd0da48da 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -775,8 +775,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -793,6 +796,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 380ca57ea8aa9..2a120b2f68c41 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -775,8 +775,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -793,6 +796,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 1f4318fc88389..8945b61f186b3 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -605,8 +605,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -623,6 +626,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index 0cba22016c960..1a5c75fb0c038 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -248,8 +248,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -266,6 +269,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index e08b028865bfc..53fbabc6fce39 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -631,8 +631,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -649,6 +652,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 88c8fc91ebb77..a970618643f5c 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -633,8 +633,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -651,6 +654,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 20924e9047c69..e55c47e1ee4d6 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -860,8 +860,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -878,6 +881,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index f2e8ddfe8e91a..55554e439e71e 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -475,8 +475,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -493,6 +496,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 0ad36a667232a..6bf97c5164ada 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -878,8 +878,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -896,6 +899,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index c060e900472eb..998d4193c353b 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -911,8 +911,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -929,6 +932,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index 9e45b800b10a3..2ca06edfa9a2c 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -321,8 +321,11 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.bf16sub
   libc.src.math.bf16subf
   libc.src.math.bf16subl
+  libc.src.math.canonicalizebf16
   libc.src.math.ceilbf16
+  libc.src.math.copysignbf16
   libc.src.math.fabsbf16
+  libc.src.math.fdimbf16
   libc.src.math.floorbf16
   libc.src.math.fmaxbf16
   libc.src.math.fmaximumbf16
@@ -339,6 +342,8 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.fromfpxbf16
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
+  libc.src.math.iscanonicalbf16
+  libc.src.math.isignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16

>From 99f5872441d8279e77884deddd20ad53903044ed Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:10:12 +0530
Subject: [PATCH 6/7] docs: add
 {canonicalize,iscanonical,fdim,copysign,issignaling}bf16 math functions

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/docs/headers/math/index.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libc/docs/headers/math/index.rst b/libc/docs/headers/math/index.rst
index b329bf031312d..818386aa18f02 100644
--- a/libc/docs/headers/math/index.rst
+++ b/libc/docs/headers/math/index.rst
@@ -109,9 +109,9 @@ Basic Operations
 +==================+==================+=================+========================+======================+========================+========================+========================+============================+
 | ceil             | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.9.1               | F.10.6.1                   |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
-| canonicalize     | |check|          | |check|         | |check|                | |check|              | |check|                |                        | 7.12.11.7              | F.10.8.7                   |
+| canonicalize     | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.11.7              | F.10.8.7                   |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
-| copysign         | |check|          | |check|         | |check|                | |check|              | |check|                |                        | 7.12.11.1              | F.10.8.1                   |
+| copysign         | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.11.1              | F.10.8.1                   |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
 | dadd             | N/A              | N/A             | |check|                | N/A                  | |check|\*              | N/A                    | 7.12.14.1              | F.10.11                    |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
@@ -147,7 +147,7 @@ Basic Operations
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
 | fadd             | N/A              | |check|         | |check|                | N/A                  | |check|                | N/A                    | 7.12.14.1              | F.10.11                    |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
-| fdim             | |check|          | |check|         | |check|                | |check|              | |check|                |                        | 7.12.12.1              | F.10.9.1                   |
+| fdim             | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.12.1              | F.10.9.1                   |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
 | fdiv             | N/A              | |check|         | |check|                | N/A                  | |check|\*              | N/A                    | 7.12.14.4              | F.10.11                    |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
@@ -191,9 +191,9 @@ Basic Operations
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
 | ilogb            | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.6.8               | F.10.3.8                   |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
-| iscanonical      | |check|          | |check|         | |check|                | |check|              | |check|                |                        | 7.12.3.2               | N/A                        |
+| iscanonical      | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.3.2               | N/A                        |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
-| issignaling      | |check|          | |check|         | |check|                | |check|              | |check|                |                        | 7.12.3.8               | N/A                        |
+| issignaling      | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.3.8               | N/A                        |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+
 | ldexp            | |check|          | |check|         | |check|                | |check|              | |check|                | |check|                | 7.12.6.9               | F.10.3.9                   |
 +------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+------------------------+----------------------------+

>From ae981cf345064333ddef7d16524288b0e3e2e2f8 Mon Sep 17 00:00:00 2001
From: Krishna Pandey <kpandey81930 at gmail.com>
Date: Wed, 27 Aug 2025 12:58:32 +0530
Subject: [PATCH 7/7] fix: typo isignalingbf16 -> issignalingbf16

Signed-off-by: Krishna Pandey <kpandey81930 at gmail.com>
---
 libc/config/baremetal/aarch64/entrypoints.txt | 2 +-
 libc/config/baremetal/arm/entrypoints.txt     | 2 +-
 libc/config/baremetal/riscv/entrypoints.txt   | 2 +-
 libc/config/darwin/aarch64/entrypoints.txt    | 2 +-
 libc/config/darwin/x86_64/entrypoints.txt     | 2 +-
 libc/config/gpu/amdgpu/entrypoints.txt        | 2 +-
 libc/config/gpu/nvptx/entrypoints.txt         | 2 +-
 libc/config/linux/aarch64/entrypoints.txt     | 2 +-
 libc/config/linux/arm/entrypoints.txt         | 2 +-
 libc/config/linux/riscv/entrypoints.txt       | 2 +-
 libc/config/linux/x86_64/entrypoints.txt      | 2 +-
 libc/config/windows/entrypoints.txt           | 2 +-
 12 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index ce6d0a7e440a4..27f8cfb4df18f 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -794,7 +794,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index d8fffd0da48da..7de180d65832f 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -797,7 +797,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 2a120b2f68c41..2ba13a1123f7d 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -797,7 +797,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 8945b61f186b3..804f9235e0d60 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -627,7 +627,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index 1a5c75fb0c038..f4830edc0a292 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -270,7 +270,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index 53fbabc6fce39..1843b727de478 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -653,7 +653,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index a970618643f5c..49d322ae32a92 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -655,7 +655,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index e55c47e1ee4d6..8d6d4ca5e10d9 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -882,7 +882,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 55554e439e71e..2752bd0da56d0 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -497,7 +497,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 6bf97c5164ada..e3759dba921d6 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -900,7 +900,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 998d4193c353b..a82faa4d6a141 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -933,7 +933,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index 2ca06edfa9a2c..20f7a187591d4 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -343,7 +343,7 @@ list(APPEND TARGET_LIBM_ENTRYPOINTS
   libc.src.math.getpayloadbf16
   libc.src.math.ilogbbf16
   libc.src.math.iscanonicalbf16
-  libc.src.math.isignalingbf16
+  libc.src.math.issignalingbf16
   libc.src.math.ldexpbf16
   libc.src.math.llogbbf16
   libc.src.math.llrintbf16



More information about the libc-commits mailing list