[libc-commits] [libc] [llvm] [libc][math][c23] Implement higher math function `cbrtf16` in LLVM libc (PR #132484)

via libc-commits libc-commits at lists.llvm.org
Tue Feb 17 07:46:18 PST 2026


================
@@ -0,0 +1,185 @@
+//===-- Implementation header for cbrtf16 ----------------------*- 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_CBRTF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_CBRTF16_H
+
+#include "include/llvm-libc-macros/float16-macros.h"
+
+#ifdef LIBC_TYPES_HAS_FLOAT16
+
+#include "src/__support/FPUtil/FEnvImpl.h"
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/multiply_add.h"
+#include "src/__support/FPUtil/rounding_mode.h"
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/optimization.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+namespace math {
+
+LIBC_INLINE static constexpr float16 cbrtf16(float16 x) {
----------------
lntue wrote:

remove `static`

https://github.com/llvm/llvm-project/pull/132484


More information about the libc-commits mailing list