[libc-commits] [libc] [llvm] [libc][math] Implement half precision lgamma function (PR #192834)
via libc-commits
libc-commits at lists.llvm.org
Fri Jul 17 08:40:52 PDT 2026
================
@@ -0,0 +1,42 @@
+//===-- Unittests for lgammaf16 -------------------------------------------===//
+//
+// 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/lgammaf16.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+#include "utils/MPFRWrapper/MPFRUtils.h"
+
+using LlvmLibcLgammaf16Test = LIBC_NAMESPACE::testing::FPTest<float16>;
+
+namespace mpfr = LIBC_NAMESPACE::testing::mpfr;
+
+// Range: ]0, +Inf[
+static constexpr uint16_t POS_START = 0x0001U;
+static constexpr uint16_t POS_STOP = 0x7bffU;
----------------
lntue wrote:
@AnonMiraj How long does it take to finish this test?
https://github.com/llvm/llvm-project/pull/192834
More information about the libc-commits
mailing list