[libc-commits] [libc] [libc][math][c23] Add acoshf16 C23 math function. (PR #130588)

via libc-commits libc-commits at lists.llvm.org
Mon Mar 17 11:34:15 PDT 2025


================
@@ -0,0 +1,29 @@
+//===-- Unittests for acoshf16 --------------------------------------------===//
+//
+// 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/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/cast.h"
+#include "src/errno/libc_errno.h"
+#include "src/math/acoshf16.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "utils/MPFRWrapper/MPFRUtils.h"
+#include <stdint.h>
----------------
overmighty wrote:

The `FPBits` used below is actually a `using` that comes from `FPTest`, so we can just rely on FPMatcher.h. cast.h is just unused. We should probably still directly include Test.h since we directly use `TEST_F`.

```suggestion
#include "src/errno/libc_errno.h"
#include "src/math/acoshf16.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
#include "utils/MPFRWrapper/MPFRUtils.h"
#include <stdint.h>
```

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


More information about the libc-commits mailing list