[libc-commits] [libc] [libc][math] implement `signbit` (PR #97791)

Petr Hosek via libc-commits libc-commits at lists.llvm.org
Tue Jul 9 23:12:16 PDT 2024


================
@@ -0,0 +1,59 @@
+//===-- Utility class to test the isfinite macro [f|l] ----------*- 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_TEST_INCLUDE_MATH_ISFINITE_H
+#define LLVM_LIBC_TEST_INCLUDE_MATH_ISFINITE_H
+
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+#include "include/llvm-libc-macros/math-function-macros.h"
+
+#define PI 3.14159265358979323846
----------------
petrhosek wrote:

This should ideally be defined as `static constexpr T pi = ...` inside the class.

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


More information about the libc-commits mailing list