[libc-commits] [libc] [llvm] [libc][math][c23] Add asinbf16 math function (PR #184170)

via libc-commits libc-commits at lists.llvm.org
Fri Mar 13 20:50:40 PDT 2026


================
@@ -0,0 +1,97 @@
+//===-- Implementation header for asinbf16 ----------------------*- 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_ASINBF16_H
+#define LLVM_LIBC_SRC___SUPPORT_MATH_ASINBF16_H
+
+#include "src/__support/FPUtil/FEnvImpl.h"
+#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/FPUtil/cast.h"
+#include "src/__support/FPUtil/multiply_add.h"
+#include "src/__support/FPUtil/sqrt.h"
+#include "src/__support/macros/optimization.h"
+#include "src/__support/math/inv_trigf_utils.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+namespace math {
+
+LIBC_INLINE constexpr bfloat16 asinbf16(bfloat16 x) {
----------------
Sukumarsawant wrote:

```/mnt/c/Users/sawan/onedrive/desktop/vm/llvm-project/libc/src/__support/math/asinbf16.h:76:17: note: non-constexpr function 'asin_eval' cannot be used in a constant expression  
   76 |     double xp = inv_trigf_utils_internal::asin_eval(x_sq);
      |                 ^
      ```
      Maybe this was the reason too .

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


More information about the libc-commits mailing list