[libc-commits] [libc] [libc][math] Adds entrypoint and tests for nearbyintf128, scalbnf128 (PR #88443)
Michael Flanders via libc-commits
libc-commits at lists.llvm.org
Fri Apr 12 08:43:39 PDT 2024
https://github.com/Flandini updated https://github.com/llvm/llvm-project/pull/88443
>From 4edc439f287648af221adef0778a9fe6f71c3952 Mon Sep 17 00:00:00 2001
From: Michael Flanders <mkf727 at cs.washington.edu>
Date: Wed, 10 Apr 2024 22:46:51 +0000
Subject: [PATCH 1/3] Adds entrypoint and tests for nearbyintf128,scalbnf128
---
libc/config/linux/aarch64/entrypoints.txt | 2 +
libc/config/linux/riscv/entrypoints.txt | 2 +
libc/config/linux/x86_64/entrypoints.txt | 2 +
libc/docs/math/index.rst | 4 +-
libc/spec/stdc.td | 2 +
libc/src/math/CMakeLists.txt | 2 +
libc/src/math/generic/CMakeLists.txt | 31 +++++-
libc/src/math/generic/nearbyintf128.cpp | 19 ++++
libc/src/math/generic/scalbnf128.cpp | 25 +++++
libc/src/math/nearbyintf128.h | 20 ++++
libc/src/math/scalbnf128.h | 20 ++++
libc/test/src/math/CMakeLists.txt | 67 ++++++++++++
libc/test/src/math/NearbyIntTest.h | 107 +++++++++++++++++++
libc/test/src/math/nearbyint_test.cpp | 13 +++
libc/test/src/math/nearbyintf128_test.cpp | 13 +++
libc/test/src/math/nearbyintf_test.cpp | 13 +++
libc/test/src/math/nearbyintl_test.cpp | 13 +++
libc/test/src/math/scalbnf128_test.cpp | 13 +++
libc/test/src/math/smoke/CMakeLists.txt | 14 +++
libc/test/src/math/smoke/scalbnf128_test.cpp | 13 +++
20 files changed, 390 insertions(+), 5 deletions(-)
create mode 100644 libc/src/math/generic/nearbyintf128.cpp
create mode 100644 libc/src/math/generic/scalbnf128.cpp
create mode 100644 libc/src/math/nearbyintf128.h
create mode 100644 libc/src/math/scalbnf128.h
create mode 100644 libc/test/src/math/NearbyIntTest.h
create mode 100644 libc/test/src/math/nearbyint_test.cpp
create mode 100644 libc/test/src/math/nearbyintf128_test.cpp
create mode 100644 libc/test/src/math/nearbyintf_test.cpp
create mode 100644 libc/test/src/math/nearbyintl_test.cpp
create mode 100644 libc/test/src/math/scalbnf128_test.cpp
create mode 100644 libc/test/src/math/smoke/scalbnf128_test.cpp
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index f5f5c437685a21..0420d826ae6308 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -512,11 +512,13 @@ if(LIBC_TYPES_HAS_FLOAT128)
libc.src.math.lroundf128
libc.src.math.modff128
libc.src.math.nanf128
+ libc.src.math.nearbyintf128
libc.src.math.nextafterf128
libc.src.math.nextdownf128
libc.src.math.nextupf128
libc.src.math.rintf128
libc.src.math.roundf128
+ libc.src.math.scalbnf128
libc.src.math.sqrtf128
libc.src.math.truncf128
)
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 71289789158f4b..59233022a0f8e0 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -520,11 +520,13 @@ if(LIBC_TYPES_HAS_FLOAT128)
libc.src.math.lroundf128
libc.src.math.modff128
libc.src.math.nanf128
+ libc.src.math.nearbyintf128
libc.src.math.nextafterf128
libc.src.math.nextdownf128
libc.src.math.nextupf128
libc.src.math.rintf128
libc.src.math.roundf128
+ libc.src.math.scalbnf128
libc.src.math.sqrtf128
libc.src.math.truncf128
)
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 6bb53cb76220fc..45413b138b22f7 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -555,12 +555,14 @@ if(LIBC_TYPES_HAS_FLOAT128)
libc.src.math.lroundf128
libc.src.math.modff128
libc.src.math.nanf128
+ libc.src.math.nearbyintf128
libc.src.math.nextafterf128
libc.src.math.nextdownf128
libc.src.math.nextupf128
libc.src.math.rintf128
libc.src.math.roundevenf128
libc.src.math.roundf128
+ libc.src.math.scalbnf128
libc.src.math.sqrtf128
libc.src.math.truncf128
libc.src.math.ufromfpf128
diff --git a/libc/docs/math/index.rst b/libc/docs/math/index.rst
index 7a7b6c9c8db5de..28503e1d13ab5a 100644
--- a/libc/docs/math/index.rst
+++ b/libc/docs/math/index.rst
@@ -188,7 +188,7 @@ Basic Operations
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| nan | |check| | |check| | |check| | | |check| | 7.12.11.2 | F.10.8.2 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
-| nearbyint | |check| | |check| | |check| | | | 7.12.9.3 | F.10.6.3 |
+| nearbyint | |check| | |check| | |check| | | |check| | 7.12.9.3 | F.10.6.3 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| nextafter | |check| | |check| | |check| | | |check| | 7.12.11.3 | F.10.8.3 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
@@ -208,7 +208,7 @@ Basic Operations
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| roundeven | |check| | |check| | |check| | | |check| | 7.12.9.8 | F.10.6.8 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
-| scalbn | |check| | |check| | |check| | | | 7.12.6.19 | F.10.3.19 |
+| scalbn | |check| | |check| | |check| | | |check| | 7.12.6.19 | F.10.3.19 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
| trunc | |check| | |check| | |check| | | |check| | 7.12.9.9 | F.10.6.9 |
+------------------+------------------+-----------------+------------------------+----------------------+------------------------+------------------------+----------------------------+
diff --git a/libc/spec/stdc.td b/libc/spec/stdc.td
index 63d0449867114d..2670ea53c5f18b 100644
--- a/libc/spec/stdc.td
+++ b/libc/spec/stdc.td
@@ -599,6 +599,7 @@ def StdC : StandardSpec<"stdc"> {
FunctionSpec<"nearbyint", RetValSpec<DoubleType>, [ArgSpec<DoubleType>]>,
FunctionSpec<"nearbyintf", RetValSpec<FloatType>, [ArgSpec<FloatType>]>,
FunctionSpec<"nearbyintl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>]>,
+ GuardedFunctionSpec<"nearbyintf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>], "LIBC_TYPES_HAS_FLOAT128">,
FunctionSpec<"nextafterf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<FloatType>]>,
FunctionSpec<"nextafter", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<DoubleType>]>,
@@ -642,6 +643,7 @@ def StdC : StandardSpec<"stdc"> {
FunctionSpec<"scalbn", RetValSpec<DoubleType>, [ArgSpec<DoubleType>, ArgSpec<IntType>]>,
FunctionSpec<"scalbnf", RetValSpec<FloatType>, [ArgSpec<FloatType>, ArgSpec<IntType>]>,
FunctionSpec<"scalbnl", RetValSpec<LongDoubleType>, [ArgSpec<LongDoubleType>, ArgSpec<IntType>]>,
+ GuardedFunctionSpec<"scalbnf128", RetValSpec<Float128Type>, [ArgSpec<Float128Type>, ArgSpec<IntType>], "LIBC_TYPES_HAS_FLOAT128">,
FunctionSpec<"nanf", RetValSpec<FloatType>, [ArgSpec<ConstCharPtr>]>,
FunctionSpec<"nan", RetValSpec<DoubleType>, [ArgSpec<ConstCharPtr>]>,
diff --git a/libc/src/math/CMakeLists.txt b/libc/src/math/CMakeLists.txt
index e8f699fabe3655..c34c58575441d3 100644
--- a/libc/src/math/CMakeLists.txt
+++ b/libc/src/math/CMakeLists.txt
@@ -252,6 +252,7 @@ add_math_entrypoint_object(nanf128)
add_math_entrypoint_object(nearbyint)
add_math_entrypoint_object(nearbyintf)
add_math_entrypoint_object(nearbyintl)
+add_math_entrypoint_object(nearbyintf128)
add_math_entrypoint_object(nextafter)
add_math_entrypoint_object(nextafterf)
@@ -301,6 +302,7 @@ add_math_entrypoint_object(roundevenf128)
add_math_entrypoint_object(scalbn)
add_math_entrypoint_object(scalbnf)
add_math_entrypoint_object(scalbnl)
+add_math_entrypoint_object(scalbnf128)
add_math_entrypoint_object(sincos)
add_math_entrypoint_object(sincosf)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 574e000b82a8fc..fbc5aa479b47b5 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -704,7 +704,7 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.FPUtil.nearest_integer_operations
COMPILE_OPTIONS
- -O2
+ -O3
)
add_entrypoint_object(
@@ -716,7 +716,7 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.FPUtil.nearest_integer_operations
COMPILE_OPTIONS
- -O2
+ -O3
)
add_entrypoint_object(
@@ -728,7 +728,20 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.FPUtil.nearest_integer_operations
COMPILE_OPTIONS
- -O2
+ -O3
+)
+
+add_entrypoint_object(
+ nearbyintf128
+ SRCS
+ nearbyintf128.cpp
+ HDRS
+ ../nearbyintf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+ COMPILE_OPTIONS
+ -O3
)
add_object_library(
@@ -2949,6 +2962,18 @@ add_entrypoint_object(
-O3
)
+add_entrypoint_object(
+ scalbnf128
+ SRCS
+ scalbnf128.cpp
+ HDRS
+ ../scalbnf128.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
add_entrypoint_object(
fmaf
SRCS
diff --git a/libc/src/math/generic/nearbyintf128.cpp b/libc/src/math/generic/nearbyintf128.cpp
new file mode 100644
index 00000000000000..fca3587f5b58ad
--- /dev/null
+++ b/libc/src/math/generic/nearbyintf128.cpp
@@ -0,0 +1,19 @@
+//===-- Implementation of nearbyintf128 function --------------------------===//
+//
+// 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/nearbyintf128.h"
+#include "src/__support/FPUtil/NearestIntegerOperations.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float128, nearbyintf128, (float128 x)) {
+ return fputil::round_using_current_rounding_mode(x);
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/generic/scalbnf128.cpp b/libc/src/math/generic/scalbnf128.cpp
new file mode 100644
index 00000000000000..8713973ad05442
--- /dev/null
+++ b/libc/src/math/generic/scalbnf128.cpp
@@ -0,0 +1,25 @@
+//===-- Implementation of scalbnf128 function -----------------------------===//
+//
+// 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/scalbnf128.h"
+#include "src/__support/FPUtil/ManipulationFunctions.h"
+#include "src/__support/common.h"
+
+namespace LIBC_NAMESPACE {
+
+LLVM_LIBC_FUNCTION(float128, scalbnf128, (float128 x, int n)) {
+#if !defined(__FLT_RADIX__)
+#error __FLT_RADIX__ undefined.
+#elif __FLT_RADIX__ != 2
+#error __FLT_RADIX__!=2, unimplemented.
+#else
+ return fputil::ldexp(x, n);
+#endif
+}
+
+} // namespace LIBC_NAMESPACE
diff --git a/libc/src/math/nearbyintf128.h b/libc/src/math/nearbyintf128.h
new file mode 100644
index 00000000000000..d12754a4810092
--- /dev/null
+++ b/libc/src/math/nearbyintf128.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for nearbyintf128 -----------------*- 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_MATH_NEARBYINTF128_H
+#define LLVM_LIBC_SRC_MATH_NEARBYINTF128_H
+
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE {
+
+float128 nearbyintf128(float128 x);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_NEARBYINTF128_H
diff --git a/libc/src/math/scalbnf128.h b/libc/src/math/scalbnf128.h
new file mode 100644
index 00000000000000..bd3b560fb7cc42
--- /dev/null
+++ b/libc/src/math/scalbnf128.h
@@ -0,0 +1,20 @@
+//===-- Implementation header for scalbnf128 --------------------*- 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_MATH_SCALBNF128_H
+#define LLVM_LIBC_SRC_MATH_SCALBNF128_H
+
+#include "src/__support/macros/properties/types.h"
+
+namespace LIBC_NAMESPACE {
+
+float128 scalbnf128(float128 x, int n);
+
+} // namespace LIBC_NAMESPACE
+
+#endif // LLVM_LIBC_SRC_MATH_SCALBNF128_H
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 55119868bdaa19..77f8e206e010af 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -1203,6 +1203,58 @@ add_fp_unittest(
libc.src.__support.FPUtil.fp_bits
)
+add_fp_unittest(
+ nearbyint_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nearbyint_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.include.math
+ libc.src.math.nearbyint
+)
+
+add_fp_unittest(
+ nearbyintf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nearbyintf_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.include.math
+ libc.src.math.nearbyintf
+)
+
+add_fp_unittest(
+ nearbyintl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nearbyintl_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.include.math
+ libc.src.math.nearbyintl
+)
+
+add_fp_unittest(
+ nearbyintf128_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nearbyintf128_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.include.math
+ libc.src.math.nearbyintf128
+)
+
add_fp_unittest(
nextafter_test
SUITE
@@ -1650,6 +1702,21 @@ add_fp_unittest(
libc.src.__support.FPUtil.normal_float
)
+add_fp_unittest(
+ scalbnf128_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ scalbnf128_test.cpp
+ HDRS
+ ScalbnTest.h
+ DEPENDS
+ libc.src.math.scalbnf128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
add_fp_unittest(
erff_test
NEED_MPFR
diff --git a/libc/test/src/math/NearbyIntTest.h b/libc/test/src/math/NearbyIntTest.h
new file mode 100644
index 00000000000000..497d8d8dd430b3
--- /dev/null
+++ b/libc/test/src/math/NearbyIntTest.h
@@ -0,0 +1,107 @@
+//===-- Utility class to test different flavors of nearbyint ----*- 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_SRC_MATH_NEARBYINTTEST_H
+#define LLVM_LIBC_TEST_SRC_MATH_NEARBYINTTEST_H
+
+#include "src/__support/FPUtil/FEnvImpl.h"
+#include "src/__support/FPUtil/FPBits.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+#include <fenv.h>
+
+static constexpr int ROUNDING_MODES[4] = {FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO,
+ FE_TONEAREST};
+
+template <typename T>
+class NearbyIntTestTemplate : public LIBC_NAMESPACE::testing::Test {
+
+ DECLARE_SPECIAL_CONSTANTS(T)
+
+public:
+ typedef T (*NearbyIntFunc)(T);
+
+ void testNaN(NearbyIntFunc func) {
+ ASSERT_FP_EQ(func(aNaN), aNaN);
+ }
+
+ void testInfinities(NearbyIntFunc func) {
+ ASSERT_FP_EQ(func(inf), inf);
+ ASSERT_FP_EQ(func(neg_inf), neg_inf);
+ }
+
+ void testZeroes(NearbyIntFunc func) {
+ ASSERT_FP_EQ(func(zero), zero);
+ ASSERT_FP_EQ(func(neg_zero), neg_zero);
+ }
+
+ void testIntegers(NearbyIntFunc func) {
+ for (int mode : ROUNDING_MODES) {
+ LIBC_NAMESPACE::fputil::set_round(mode);
+
+ ASSERT_FP_EQ(func(T(1.0)), T(1.0));
+ ASSERT_FP_EQ(func(T(-1.0)), T(-1.0));
+
+ ASSERT_FP_EQ(func(T(1234.0)), T(1234.0));
+ ASSERT_FP_EQ(func(T(-1234.0)), T(-1234.0));
+
+ ASSERT_FP_EQ(func(T(10.0)), T(10.0));
+ ASSERT_FP_EQ(func(T(-10.0)), T(-10.0));
+
+ FPBits ints_start(T(0));
+ ints_start.set_biased_exponent(FPBits::SIG_LEN + FPBits::EXP_BIAS);
+ T expected = ints_start.get_val();
+ ASSERT_FP_EQ(func(expected), expected);
+ }
+ }
+
+ void testSubnormalToNearest(NearbyIntFunc func) {
+ ASSERT_FP_EQ(func(min_denormal), zero);
+ ASSERT_FP_EQ(func(-min_denormal), neg_zero);
+ }
+
+ void testSubnormalToZero(NearbyIntFunc func) {
+ LIBC_NAMESPACE::fputil::set_round(FE_TOWARDZERO);
+ ASSERT_FP_EQ(func(min_denormal), zero);
+ ASSERT_FP_EQ(func(-min_denormal), neg_zero);
+ }
+
+ void testSubnormalToPosInf(NearbyIntFunc func) {
+ LIBC_NAMESPACE::fputil::set_round(FE_UPWARD);
+ ASSERT_FP_EQ(func(min_denormal), FPBits::one().get_val());
+ ASSERT_FP_EQ(func(-min_denormal), neg_zero);
+ }
+
+ void testSubnormalToNegInf(NearbyIntFunc func) {
+ LIBC_NAMESPACE::fputil::set_round(FE_DOWNWARD);
+ FPBits negative_one = FPBits::one(Sign::NEG);
+ ASSERT_FP_EQ(func(min_denormal), zero);
+ ASSERT_FP_EQ(func(-min_denormal), negative_one.get_val());
+ }
+};
+
+#define LIST_NEARBYINT_TESTS(T, func) \
+ using LlvmLibcNearbyIntTest = NearbyIntTestTemplate<T>; \
+ TEST_F(LlvmLibcNearbyIntTest, TestNaN) { testNaN(&func); } \
+ TEST_F(LlvmLibcNearbyIntTest, TestInfinities) { testInfinities(&func); } \
+ TEST_F(LlvmLibcNearbyIntTest, TestZeroes) { testZeroes(&func); } \
+ TEST_F(LlvmLibcNearbyIntTest, TestIntegers) { testIntegers(&func); } \
+ TEST_F(LlvmLibcNearbyIntTest, TestSubnormalToNearest) { \
+ testSubnormalToNearest(&func); \
+ } \
+ TEST_F(LlvmLibcNearbyIntTest, TestSubnormalToZero) { \
+ testSubnormalToZero(&func); \
+ } \
+ TEST_F(LlvmLibcNearbyIntTest, TestSubnormalToPosInf) { \
+ testSubnormalToPosInf(&func); \
+ } \
+ TEST_F(LlvmLibcNearbyIntTest, TestSubnormalToNegInf) { \
+ testSubnormalToNegInf(&func); \
+ }
+
+#endif // LLVM_LIBC_TEST_SRC_MATH_NEARBYINTTEST_H
diff --git a/libc/test/src/math/nearbyint_test.cpp b/libc/test/src/math/nearbyint_test.cpp
new file mode 100644
index 00000000000000..11a5c3372e73ea
--- /dev/null
+++ b/libc/test/src/math/nearbyint_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for nearbyint -------------------------------------------===//
+//
+// 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 "NearbyIntTest.h"
+
+#include "src/math/nearbyint.h"
+
+LIST_NEARBYINT_TESTS(double, LIBC_NAMESPACE::nearbyint)
diff --git a/libc/test/src/math/nearbyintf128_test.cpp b/libc/test/src/math/nearbyintf128_test.cpp
new file mode 100644
index 00000000000000..74c29652e9cd5e
--- /dev/null
+++ b/libc/test/src/math/nearbyintf128_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for nearbyintf128 ---------------------------------------===//
+//
+// 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 "NearbyIntTest.h"
+
+#include "src/math/nearbyintf128.h"
+
+LIST_NEARBYINT_TESTS(float128, LIBC_NAMESPACE::nearbyintf128)
\ No newline at end of file
diff --git a/libc/test/src/math/nearbyintf_test.cpp b/libc/test/src/math/nearbyintf_test.cpp
new file mode 100644
index 00000000000000..fd26153cfffb94
--- /dev/null
+++ b/libc/test/src/math/nearbyintf_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for nearbyintf ------------------------------------------===//
+//
+// 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 "NearbyIntTest.h"
+
+#include "src/math/nearbyintf.h"
+
+LIST_NEARBYINT_TESTS(float, LIBC_NAMESPACE::nearbyintf)
diff --git a/libc/test/src/math/nearbyintl_test.cpp b/libc/test/src/math/nearbyintl_test.cpp
new file mode 100644
index 00000000000000..a6d81a1439e17c
--- /dev/null
+++ b/libc/test/src/math/nearbyintl_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for nearbyintl ------------------------------------------===//
+//
+// 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 "NearbyIntTest.h"
+
+#include "src/math/nearbyintl.h"
+
+LIST_NEARBYINT_TESTS(long double, LIBC_NAMESPACE::nearbyintl)
diff --git a/libc/test/src/math/scalbnf128_test.cpp b/libc/test/src/math/scalbnf128_test.cpp
new file mode 100644
index 00000000000000..dc259de211489e
--- /dev/null
+++ b/libc/test/src/math/scalbnf128_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for scalbnf128 ------------------------------------------===//
+//
+// 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 "ScalbnTest.h"
+
+#include "src/math/scalbnf128.h"
+
+LIST_SCALBN_TESTS(float128, LIBC_NAMESPACE::scalbnf128)
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 22c59c97f6c7fd..33bcdb4c903b49 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -2770,6 +2770,20 @@ add_fp_unittest(
libc.src.__support.FPUtil.normal_float
)
+add_fp_unittest(
+ scalbnf128_test
+ SUITE
+ libc-math-smoke-tests
+ SRCS
+ scalbnf128_test.cpp
+ HDRS
+ ScalbnTest.h
+ DEPENDS
+ libc.src.math.scalbnf128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
add_fp_unittest(
erff_test
SUITE
diff --git a/libc/test/src/math/smoke/scalbnf128_test.cpp b/libc/test/src/math/smoke/scalbnf128_test.cpp
new file mode 100644
index 00000000000000..dc259de211489e
--- /dev/null
+++ b/libc/test/src/math/smoke/scalbnf128_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for scalbnf128 ------------------------------------------===//
+//
+// 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 "ScalbnTest.h"
+
+#include "src/math/scalbnf128.h"
+
+LIST_SCALBN_TESTS(float128, LIBC_NAMESPACE::scalbnf128)
>From 0a4d68029d694254d9dd8934d667bedde2fbd0ac Mon Sep 17 00:00:00 2001
From: Michael Flanders <flanders.michaelk at gmail.com>
Date: Thu, 11 Apr 2024 14:38:55 -0700
Subject: [PATCH 2/3] fix formatting in tests
---
libc/test/src/math/NearbyIntTest.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/libc/test/src/math/NearbyIntTest.h b/libc/test/src/math/NearbyIntTest.h
index 497d8d8dd430b3..6ab05982d5e58b 100644
--- a/libc/test/src/math/NearbyIntTest.h
+++ b/libc/test/src/math/NearbyIntTest.h
@@ -26,9 +26,7 @@ class NearbyIntTestTemplate : public LIBC_NAMESPACE::testing::Test {
public:
typedef T (*NearbyIntFunc)(T);
- void testNaN(NearbyIntFunc func) {
- ASSERT_FP_EQ(func(aNaN), aNaN);
- }
+ void testNaN(NearbyIntFunc func) { ASSERT_FP_EQ(func(aNaN), aNaN); }
void testInfinities(NearbyIntFunc func) {
ASSERT_FP_EQ(func(inf), inf);
>From 36c032e2eacbff44b3b712bf70d6eab8f4655858 Mon Sep 17 00:00:00 2001
From: Michael Flanders <flanders.michaelk at gmail.com>
Date: Fri, 12 Apr 2024 08:43:23 -0700
Subject: [PATCH 3/3] fixups from PR review
---
libc/src/math/generic/#CMakeLists.txt# | 3000 +++++++++++++++++
libc/src/math/generic/.#CMakeLists.txt | 1 +
libc/src/math/generic/CMakeLists.txt | 1 +
libc/test/src/math/#CMakeLists.txt# | 1710 ++++++++++
libc/test/src/math/CMakeLists.txt | 52 -
libc/test/src/math/smoke/CMakeLists.txt | 52 +
.../test/src/math/{ => smoke}/NearbyIntTest.h | 2 +-
.../src/math/{ => smoke}/nearbyint_test.cpp | 0
.../math/{ => smoke}/nearbyintf128_test.cpp | 2 +-
.../src/math/{ => smoke}/nearbyintf_test.cpp | 0
.../src/math/{ => smoke}/nearbyintl_test.cpp | 0
11 files changed, 4766 insertions(+), 54 deletions(-)
create mode 100644 libc/src/math/generic/#CMakeLists.txt#
create mode 120000 libc/src/math/generic/.#CMakeLists.txt
create mode 100644 libc/test/src/math/#CMakeLists.txt#
rename libc/test/src/math/{ => smoke}/NearbyIntTest.h (99%)
rename libc/test/src/math/{ => smoke}/nearbyint_test.cpp (100%)
rename libc/test/src/math/{ => smoke}/nearbyintf128_test.cpp (87%)
rename libc/test/src/math/{ => smoke}/nearbyintf_test.cpp (100%)
rename libc/test/src/math/{ => smoke}/nearbyintl_test.cpp (100%)
diff --git a/libc/src/math/generic/#CMakeLists.txt# b/libc/src/math/generic/#CMakeLists.txt#
new file mode 100644
index 00000000000000..1405e83a3f35a8
--- /dev/null
+++ b/libc/src/math/generic/#CMakeLists.txt#
@@ -0,0 +1,3000 @@
+add_entrypoint_object(
+ canonicalize
+ SRCS
+ canonicalize.cpp
+ HDRS
+ ../canonicalize.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ canonicalizef
+ SRCS
+ canonicalizef.cpp
+ HDRS
+ ../canonicalizef.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ canonicalizef128
+ SRCS
+ canonicalizef128.cpp
+ HDRS
+ ../canonicalizef128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ canonicalizel
+ SRCS
+ canonicalizel.cpp
+ HDRS
+ ../canonicalizel.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ ceil
+ SRCS
+ ceil.cpp
+ HDRS
+ ../ceil.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ ceilf
+ SRCS
+ ceilf.cpp
+ HDRS
+ ../ceilf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ ceill
+ SRCS
+ ceill.cpp
+ HDRS
+ ../ceill.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ ceilf128
+ SRCS
+ ceilf128.cpp
+ HDRS
+ ../ceilf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_header_library(
+ range_reduction
+ HDRS
+ range_reduction.h
+ range_reduction_fma.h
+ DEPENDS
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.common
+)
+
+add_header_library(
+ sincosf_utils
+ HDRS
+ sincosf_utils.h
+ DEPENDS
+ .range_reduction
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.common
+)
+
+add_entrypoint_object(
+ cosf
+ SRCS
+ cosf.cpp
+ HDRS
+ ../cosf.h
+ DEPENDS
+ .sincosf_utils
+ libc.src.errno.errno
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ sinf
+ SRCS
+ sinf.cpp
+ HDRS
+ ../sinf.h
+ DEPENDS
+ .range_reduction
+ .sincosf_utils
+ libc.src.errno.errno
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ sincosf
+ SRCS
+ sincosf.cpp
+ HDRS
+ ../sincosf.h
+ DEPENDS
+ .range_reduction
+ .sincosf_utils
+ libc.src.errno.errno
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ tanf
+ SRCS
+ tanf.cpp
+ HDRS
+ ../tanf.h
+ DEPENDS
+ .range_reduction
+ .sincosf_utils
+ libc.src.errno.errno
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fabs
+ SRCS
+ fabs.cpp
+ HDRS
+ ../fabs.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fabsf
+ SRCS
+ fabsf.cpp
+ HDRS
+ ../fabsf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fabsl
+ SRCS
+ fabsl.cpp
+ HDRS
+ ../fabsl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fabsf128
+ SRCS
+ fabsf128.cpp
+ HDRS
+ ../fabsf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ trunc
+ SRCS
+ trunc.cpp
+ HDRS
+ ../trunc.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ truncf
+ SRCS
+ truncf.cpp
+ HDRS
+ ../truncf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ truncl
+ SRCS
+ truncl.cpp
+ HDRS
+ ../truncl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ truncf128
+ SRCS
+ truncf128.cpp
+ HDRS
+ ../truncf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ floor
+ SRCS
+ floor.cpp
+ HDRS
+ ../floor.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ floorf
+ SRCS
+ floorf.cpp
+ HDRS
+ ../floorf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ floorl
+ SRCS
+ floorl.cpp
+ HDRS
+ ../floorl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ floorf128
+ SRCS
+ floorf128.cpp
+ HDRS
+ ../floorf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ round
+ SRCS
+ round.cpp
+ HDRS
+ ../round.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundf
+ SRCS
+ roundf.cpp
+ HDRS
+ ../roundf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundl
+ SRCS
+ roundl.cpp
+ HDRS
+ ../roundl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundf128
+ SRCS
+ roundf128.cpp
+ HDRS
+ ../roundf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundeven
+ SRCS
+ roundeven.cpp
+ HDRS
+ ../roundeven.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundevenf
+ SRCS
+ roundevenf.cpp
+ HDRS
+ ../roundevenf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundevenl
+ SRCS
+ roundevenl.cpp
+ HDRS
+ ../roundevenl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ roundevenf128
+ SRCS
+ roundevenf128.cpp
+ HDRS
+ ../roundevenf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lround
+ SRCS
+ lround.cpp
+ HDRS
+ ../lround.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lroundf
+ SRCS
+ lroundf.cpp
+ HDRS
+ ../lroundf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lroundl
+ SRCS
+ lroundl.cpp
+ HDRS
+ ../lroundl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lroundf128
+ SRCS
+ lroundf128.cpp
+ HDRS
+ ../lroundf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llround
+ SRCS
+ llround.cpp
+ HDRS
+ ../llround.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llroundf
+ SRCS
+ llroundf.cpp
+ HDRS
+ ../llroundf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llroundl
+ SRCS
+ llroundl.cpp
+ HDRS
+ ../llroundl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llroundf128
+ SRCS
+ llroundf128.cpp
+ HDRS
+ ../llroundf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ rint
+ SRCS
+ rint.cpp
+ HDRS
+ ../rint.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ rintf
+ SRCS
+ rintf.cpp
+ HDRS
+ ../rintf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ rintl
+ SRCS
+ rintl.cpp
+ HDRS
+ ../rintl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ rintf128
+ SRCS
+ rintf128.cpp
+ HDRS
+ ../rintf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lrint
+ SRCS
+ lrint.cpp
+ HDRS
+ ../lrint.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lrintf
+ SRCS
+ lrintf.cpp
+ HDRS
+ ../lrintf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lrintl
+ SRCS
+ lrintl.cpp
+ HDRS
+ ../lrintl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ lrintf128
+ SRCS
+ lrintf128.cpp
+ HDRS
+ ../lrintf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llrint
+ SRCS
+ llrint.cpp
+ HDRS
+ ../llrint.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llrintf
+ SRCS
+ llrintf.cpp
+ HDRS
+ ../llrintf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llrintl
+ SRCS
+ llrintl.cpp
+ HDRS
+ ../llrintl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ llrintf128
+ SRCS
+ llrintf128.cpp
+ HDRS
+ ../llrintf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_entrypoint_object(
+ nearbyint
+ SRCS
+ nearbyint.cpp
+ HDRS
+ ../nearbyint.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nearbyintf
+ SRCS
+ nearbyintf.cpp
+ HDRS
+ ../nearbyintf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nearbyintl
+ SRCS
+ nearbyintl.cpp
+ HDRS
+ ../nearbyintl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer_operations
+ COMPILE_OPTIOfNS
+ -O3
+)
+
+add_entrypoint_object(
+ nearbyintf128
+ SRCS
+ nearbyintf128.cpp
+ HDRS
+ ../nearbyintf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_object_library(
+ exp_utils
+ HDRS
+ exp_utils.h
+ SRCS
+ exp_utils.cpp
+)
+
+add_entrypoint_object(
+ erff
+ SRCS
+ erff.cpp
+ HDRS
+ ../erff.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ exp
+ SRCS
+ exp.cpp
+ HDRS
+ ../exp.h
+ DEPENDS
+ .common_constants
+ .explogxf
+ libc.include.errno
+ libc.src.__support.CPP.bit
+ libc.src.__support.CPP.optional
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.FPUtil.triple_double
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ expf
+ SRCS
+ expf.cpp
+ HDRS
+ ../expf.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ libc.include.errno
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ exp2
+ SRCS
+ exp2.cpp
+ HDRS
+ ../exp2.h
+ DEPENDS
+ .common_constants
+ .explogxf
+ libc.include.errno
+ libc.src.__support.CPP.bit
+ libc.src.__support.CPP.optional
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.FPUtil.triple_double
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_header_library(
+ exp2f_impl
+ HDRS
+ exp2f_impl.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ libc.src.__support.common
+ libc.include.errno
+ libc.src.errno.errno
+)
+
+add_entrypoint_object(
+ exp2f
+ SRCS
+ exp2f.cpp
+ HDRS
+ ../exp2f.h
+ DEPENDS
+ .exp2f_impl
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ exp2m1f
+ SRCS
+ exp2m1f.cpp
+ HDRS
+ ../exp2m1f.h
+ DEPENDS
+ .explogxf
+ libc.src.errno.errno
+ libc.src.__support.common
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ libc.src.__support.macros.properties.cpu_features
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ exp10
+ SRCS
+ exp10.cpp
+ HDRS
+ ../exp10.h
+ DEPENDS
+ .common_constants
+ .explogxf
+ libc.include.errno
+ libc.src.__support.CPP.bit
+ libc.src.__support.CPP.optional
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.FPUtil.triple_double
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_header_library(
+ exp10f_impl
+ HDRS
+ exp10f_impl.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ libc.src.__support.common
+ libc.include.errno
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ exp10f
+ SRCS
+ exp10f.cpp
+ HDRS
+ ../exp10f.h
+ DEPENDS
+ .exp10f_impl
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ expm1
+ SRCS
+ expm1.cpp
+ HDRS
+ ../expm1.h
+ DEPENDS
+ .common_constants
+ .explogxf
+ libc.include.errno
+ libc.src.__support.CPP.bit
+ libc.src.__support.CPP.optional
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.FPUtil.triple_double
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ expm1f
+ SRCS
+ expm1f.cpp
+ HDRS
+ ../expm1f.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ libc.include.errno
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ powf
+ SRCS
+ powf.cpp
+ HDRS
+ ../powf.h
+ DEPENDS
+ .common_constants
+ .exp10f_impl
+ .exp2f_impl
+ .explogxf
+ libc.include.errno
+ libc.src.__support.CPP.bit
+ libc.src.__support.CPP.optional
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.FPUtil.sqrt
+ libc.src.__support.FPUtil.triple_double
+ libc.src.__support.macros.optimization
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ copysign
+ SRCS
+ copysign.cpp
+ HDRS
+ ../copysign.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ copysignf
+ SRCS
+ copysignf.cpp
+ HDRS
+ ../copysignf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ copysignl
+ SRCS
+ copysignl.cpp
+ HDRS
+ ../copysignl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ copysignf128
+ SRCS
+ copysignf128.cpp
+ HDRS
+ ../copysignf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ frexp
+ SRCS
+ frexp.cpp
+ HDRS
+ ../frexp.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ frexpf
+ SRCS
+ frexpf.cpp
+ HDRS
+ ../frexpf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ frexpl
+ SRCS
+ frexpl.cpp
+ HDRS
+ ../frexpl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ frexpf128
+ SRCS
+ frexpf128.cpp
+ HDRS
+ ../frexpf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ilogb
+ SRCS
+ ilogb.cpp
+ HDRS
+ ../ilogb.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ilogbf
+ SRCS
+ ilogbf.cpp
+ HDRS
+ ../ilogbf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ilogbl
+ SRCS
+ ilogbl.cpp
+ HDRS
+ ../ilogbl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ilogbf128
+ SRCS
+ ilogbf128.cpp
+ HDRS
+ ../ilogbf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ llogb
+ SRCS
+ llogb.cpp
+ HDRS
+ ../llogb.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ llogbf
+ SRCS
+ llogbf.cpp
+ HDRS
+ ../llogbf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ llogbl
+ SRCS
+ llogbl.cpp
+ HDRS
+ ../llogbl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ llogbf128
+ SRCS
+ llogbf128.cpp
+ HDRS
+ ../llogbf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ldexp
+ SRCS
+ ldexp.cpp
+ HDRS
+ ../ldexp.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ldexpf
+ SRCS
+ ldexpf.cpp
+ HDRS
+ ../ldexpf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ldexpl
+ SRCS
+ ldexpl.cpp
+ HDRS
+ ../ldexpl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ ldexpf128
+ SRCS
+ ldexpf128.cpp
+ HDRS
+ ../ldexpf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_object_library(
+ common_constants
+ HDRS
+ common_constants.h
+ SRCS
+ common_constants.cpp
+ DEPENDS
+ libc.src.__support.number_pair
+ libc.src.__support.FPUtil.triple_double
+)
+
+add_header_library(
+ log_range_reduction
+ HDRS
+ log_range_reduction.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.uint128
+ libc.src.__support.FPUtil.dyadic_float
+)
+
+add_entrypoint_object(
+ log10
+ SRCS
+ log10.cpp
+ HDRS
+ ../log10.h
+ DEPENDS
+ .common_constants
+ .log_range_reduction
+ libc.src.__support.FPUtil.double_double
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ log10f
+ SRCS
+ log10f.cpp
+ HDRS
+ ../log10f.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.polyeval
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ log1p
+ SRCS
+ log1p.cpp
+ HDRS
+ ../log1p.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.double_double
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ log1pf
+ SRCS
+ log1pf.cpp
+ HDRS
+ ../log1pf.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ log2
+ SRCS
+ log2.cpp
+ HDRS
+ ../log2.h
+ DEPENDS
+ .common_constants
+ .log_range_reduction
+ libc.src.__support.FPUtil.double_double
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ log2f
+ SRCS
+ log2f.cpp
+ HDRS
+ ../log2f.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fma
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ log
+ SRCS
+ log.cpp
+ HDRS
+ ../log.h
+ DEPENDS
+ .common_constants
+ .log_range_reduction
+ libc.src.__support.FPUtil.double_double
+ libc.src.__support.FPUtil.dyadic_float
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.integer_literals
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ logf
+ SRCS
+ logf.cpp
+ HDRS
+ ../logf.h
+ DEPENDS
+ .common_constants
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ logb
+ SRCS
+ logb.cpp
+ HDRS
+ ../logb.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ logbf
+ SRCS
+ logbf.cpp
+ HDRS
+ ../logbf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ logbl
+ SRCS
+ logbl.cpp
+ HDRS
+ ../logbl.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ logbf128
+ SRCS
+ logbf128.cpp
+ HDRS
+ ../logbf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_entrypoint_object(
+ modf
+ SRCS
+ modf.cpp
+ HDRS
+ ../modf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ modff
+ SRCS
+ modff.cpp
+ HDRS
+ ../modff.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ modfl
+ SRCS
+ modfl.cpp
+ HDRS
+ ../modfl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ modff128
+ SRCS
+ modff128.cpp
+ HDRS
+ ../modff128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmin
+ SRCS
+ fmin.cpp
+ HDRS
+ ../fmin.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminf
+ SRCS
+ fminf.cpp
+ HDRS
+ ../fminf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminl
+ SRCS
+ fminl.cpp
+ HDRS
+ ../fminl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminf128
+ SRCS
+ fminf128.cpp
+ HDRS
+ ../fminf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmax
+ SRCS
+ fmax.cpp
+ HDRS
+ ../fmax.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaxf
+ SRCS
+ fmaxf.cpp
+ HDRS
+ ../fmaxf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaxl
+ SRCS
+ fmaxl.cpp
+ HDRS
+ ../fmaxl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaxf128
+ SRCS
+ fmaxf128.cpp
+ HDRS
+ ../fmaxf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmaximum
+ SRCS
+ fmaximum.cpp
+ HDRS
+ ../fmaximum.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximumf
+ SRCS
+ fmaximumf.cpp
+ HDRS
+ ../fmaximumf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximuml
+ SRCS
+ fmaximuml.cpp
+ HDRS
+ ../fmaximuml.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximumf128
+ SRCS
+ fmaximumf128.cpp
+ HDRS
+ ../fmaximumf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmaximum_num
+ SRCS
+ fmaximum_num.cpp
+ HDRS
+ ../fmaximum_num.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_numf
+ SRCS
+ fmaximum_numf.cpp
+ HDRS
+ ../fmaximum_numf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_numl
+ SRCS
+ fmaximum_numl.cpp
+ HDRS
+ ../fmaximum_numl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_numf128
+ SRCS
+ fmaximum_numf128.cpp
+ HDRS
+ ../fmaximum_numf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmaximum_mag
+ SRCS
+ fmaximum_mag.cpp
+ HDRS
+ ../fmaximum_mag.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_magf
+ SRCS
+ fmaximum_magf.cpp
+ HDRS
+ ../fmaximum_magf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_magl
+ SRCS
+ fmaximum_magl.cpp
+ HDRS
+ ../fmaximum_magl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_magf128
+ SRCS
+ fmaximum_magf128.cpp
+ HDRS
+ ../fmaximum_magf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+
+add_entrypoint_object(
+ fmaximum_mag_num
+ SRCS
+ fmaximum_mag_num.cpp
+ HDRS
+ ../fmaximum_mag_num.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_mag_numf
+ SRCS
+ fmaximum_mag_numf.cpp
+ HDRS
+ ../fmaximum_mag_numf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_mag_numl
+ SRCS
+ fmaximum_mag_numl.cpp
+ HDRS
+ ../fmaximum_mag_numl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fmaximum_mag_numf128
+ SRCS
+ fmaximum_mag_numf128.cpp
+ HDRS
+ ../fmaximum_mag_numf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fminimum
+ SRCS
+ fminimum.cpp
+ HDRS
+ ../fminimum.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimumf
+ SRCS
+ fminimumf.cpp
+ HDRS
+ ../fminimumf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimuml
+ SRCS
+ fminimuml.cpp
+ HDRS
+ ../fminimuml.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimumf128
+ SRCS
+ fminimumf128.cpp
+ HDRS
+ ../fminimumf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fminimum_num
+ SRCS
+ fminimum_num.cpp
+ HDRS
+ ../fminimum_num.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_numf
+ SRCS
+ fminimum_numf.cpp
+ HDRS
+ ../fminimum_numf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_numl
+ SRCS
+ fminimum_numl.cpp
+ HDRS
+ ../fminimum_numl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_numf128
+ SRCS
+ fminimum_numf128.cpp
+ HDRS
+ ../fminimum_numf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fminimum_mag
+ SRCS
+ fminimum_mag.cpp
+ HDRS
+ ../fminimum_mag.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_magf
+ SRCS
+ fminimum_magf.cpp
+ HDRS
+ ../fminimum_magf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_magl
+ SRCS
+ fminimum_magl.cpp
+ HDRS
+ ../fminimum_magl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_magf128
+ SRCS
+ fminimum_magf128.cpp
+ HDRS
+ ../fminimum_magf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+
+add_entrypoint_object(
+ fminimum_mag_num
+ SRCS
+ fminimum_mag_num.cpp
+ HDRS
+ ../fminimum_mag_num.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_mag_numf
+ SRCS
+ fminimum_mag_numf.cpp
+ HDRS
+ ../fminimum_mag_numf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_mag_numl
+ SRCS
+ fminimum_mag_numl.cpp
+ HDRS
+ ../fminimum_mag_numl.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ fminimum_mag_numf128
+ SRCS
+ fminimum_mag_numf128.cpp
+ HDRS
+ ../fminimum_mag_numf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ sqrt
+ SRCS
+ sqrt.cpp
+ HDRS
+ ../sqrt.h
+ DEPENDS
+ libc.src.__support.FPUtil.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+
+add_entrypoint_object(
+ sqrtf
+ SRCS
+ sqrtf.cpp
+ HDRS
+ ../sqrtf.h
+ DEPENDS
+ libc.src.__support.FPUtil.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ sqrtl
+ SRCS
+ sqrtl.cpp
+ HDRS
+ ../sqrtl.h
+ DEPENDS
+ libc.src.__support.FPUtil.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ sqrtf128
+ SRCS
+ sqrtf128.cpp
+ HDRS
+ ../sqrtf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.sqrt
+ COMPILE_OPTIONS
+ -O3
+ )
+
+add_entrypoint_object(
+ remquof
+ SRCS
+ remquof.cpp
+ HDRS
+ ../remquof.h
+ DEPENDS
+ libc.src.__support.FPUtil.division_and_remainder_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remquo
+ SRCS
+ remquo.cpp
+ HDRS
+ ../remquo.h
+ DEPENDS
+ libc.src.__support.FPUtil.division_and_remainder_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remquol
+ SRCS
+ remquol.cpp
+ HDRS
+ ../remquol.h
+ DEPENDS
+ libc.src.__support.FPUtil.division_and_remainder_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remainderf
+ SRCS
+ remainderf.cpp
+ HDRS
+ ../remainderf.h
+ DEPENDS
+ libc.src.__support.FPUtil.division_and_remainder_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remainder
+ SRCS
+ remainder.cpp
+ HDRS
+ ../remainder.h
+ DEPENDS
+ libc.src.__support.FPUtil.division_and_remainder_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ remainderl
+ SRCS
+ remainderl.cpp
+ HDRS
+ ../remainderl.h
+ DEPENDS
+ libc.src.__support.FPUtil.division_and_remainder_operations
+ COMPILE_OPTIONS
+ -O2
+)
+
+add_entrypoint_object(
+ hypotf
+ SRCS
+ hypotf.cpp
+ HDRS
+ ../hypotf.h
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fdim
+ SRCS
+ fdim.cpp
+ HDRS
+ ../fdim.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ fdimf
+ SRCS
+ fdimf.cpp
+ HDRS
+ ../fdimf.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ fdiml
+ SRCS
+ fdiml.cpp
+ HDRS
+ ../fdiml.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ fdimf128
+ SRCS
+ fdimf128.cpp
+ HDRS
+ ../fdimf128.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_entrypoint_object(
+ hypot
+ SRCS
+ hypot.cpp
+ HDRS
+ ../hypot.h
+ DEPENDS
+ libc.src.__support.FPUtil.hypot
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nan
+ SRCS
+ nan.cpp
+ HDRS
+ ../nan.h
+ DEPENDS
+ libc.src.__support.str_to_float
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nanf
+ SRCS
+ nanf.cpp
+ HDRS
+ ../nanf.h
+ DEPENDS
+ libc.src.__support.str_to_float
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nanl
+ SRCS
+ nanl.cpp
+ HDRS
+ ../nanl.h
+ DEPENDS
+ libc.src.__support.str_to_float
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nanf128
+ SRCS
+ nanf128.cpp
+ HDRS
+ ../nanf128.h
+ DEPENDS
+ libc.src.__support.str_to_float
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextafter
+ SRCS
+ nextafter.cpp
+ HDRS
+ ../nextafter.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextafterf
+ SRCS
+ nextafterf.cpp
+ HDRS
+ ../nextafterf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextafterl
+ SRCS
+ nextafterl.cpp
+ HDRS
+ ../nextafterl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextafterf128
+ SRCS
+ nextafterf128.cpp
+ HDRS
+ ../nextafterf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nexttoward
+ SRCS
+ nexttoward.cpp
+ HDRS
+ ../nexttoward.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nexttowardf
+ SRCS
+ nexttowardf.cpp
+ HDRS
+ ../nexttowardf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nexttowardl
+ SRCS
+ nexttowardl.cpp
+ HDRS
+ ../nexttowardl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextdown
+ SRCS
+ nextdown.cpp
+ HDRS
+ ../nextdown.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextdownl
+ SRCS
+ nextdownl.cpp
+ HDRS
+ ../nextdownl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextdownf
+ SRCS
+ nextdownf.cpp
+ HDRS
+ ../nextdownf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextdownf128
+ SRCS
+ nextdownf128.cpp
+ HDRS
+ ../nextdownf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextup
+ SRCS
+ nextup.cpp
+ HDRS
+ ../nextup.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextupl
+ SRCS
+ nextupl.cpp
+ HDRS
+ ../nextupl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextupf
+ SRCS
+ nextupf.cpp
+ HDRS
+ ../nextupf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ nextupf128
+ SRCS
+ nextupf128.cpp
+ HDRS
+ ../nextupf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmod
+ SRCS
+ fmod.cpp
+ HDRS
+ ../fmod.h
+ DEPENDS
+ libc.src.__support.FPUtil.generic.fmod
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmodf
+ SRCS
+ fmodf.cpp
+ HDRS
+ ../fmodf.h
+ DEPENDS
+ libc.src.__support.FPUtil.generic.fmod
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmodl
+ SRCS
+ fmodl.cpp
+ HDRS
+ ../fmodl.h
+ DEPENDS
+ libc.src.__support.FPUtil.generic.fmod
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmodf128
+ SRCS
+ fmodf128.cpp
+ HDRS
+ ../fmodf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.generic.fmod
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfp
+ SRCS
+ fromfp.cpp
+ HDRS
+ ../fromfp.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpf
+ SRCS
+ fromfpf.cpp
+ HDRS
+ ../fromfpf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpl
+ SRCS
+ fromfpl.cpp
+ HDRS
+ ../fromfpl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpf128
+ SRCS
+ fromfpf128.cpp
+ HDRS
+ ../fromfpf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpx
+ SRCS
+ fromfpx.cpp
+ HDRS
+ ../fromfpx.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpxf
+ SRCS
+ fromfpxf.cpp
+ HDRS
+ ../fromfpxf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpxl
+ SRCS
+ fromfpxl.cpp
+ HDRS
+ ../fromfpxl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fromfpxf128
+ SRCS
+ fromfpxf128.cpp
+ HDRS
+ ../fromfpxf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfp
+ SRCS
+ ufromfp.cpp
+ HDRS
+ ../ufromfp.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpf
+ SRCS
+ ufromfpf.cpp
+ HDRS
+ ../ufromfpf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpl
+ SRCS
+ ufromfpl.cpp
+ HDRS
+ ../ufromfpl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpf128
+ SRCS
+ ufromfpf128.cpp
+ HDRS
+ ../ufromfpf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpx
+ SRCS
+ ufromfpx.cpp
+ HDRS
+ ../ufromfpx.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpxf
+ SRCS
+ ufromfpxf.cpp
+ HDRS
+ ../ufromfpxf.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpxl
+ SRCS
+ ufromfpxl.cpp
+ HDRS
+ ../ufromfpxl.h
+ DEPENDS
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ ufromfpxf128
+ SRCS
+ ufromfpxf128.cpp
+ HDRS
+ ../ufromfpxf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.nearest_integer
+ COMPILE_OPTIONS
+ -O3
+)
+
+#TODO: Add errno include to the hyperbolic functions.
+add_object_library(
+ explogxf
+ HDRS
+ explogxf.h
+ SRCS
+ explogxf.cpp
+ DEPENDS
+ .common_constants
+ libc.src.__support.CPP.bit
+ libc.src.__support.CPP.optional
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.common
+ libc.include.errno
+ libc.src.errno.errno
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ coshf
+ SRCS
+ coshf.cpp
+ HDRS
+ ../coshf.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ sinhf
+ SRCS
+ sinhf.cpp
+ HDRS
+ ../sinhf.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ tanhf
+ SRCS
+ tanhf.cpp
+ HDRS
+ ../tanhf.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ acoshf
+ SRCS
+ acoshf.cpp
+ HDRS
+ ../acoshf.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.sqrt
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ asinhf
+ SRCS
+ asinhf.cpp
+ HDRS
+ ../asinhf.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.sqrt
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ atanhf
+ SRCS
+ atanhf.cpp
+ HDRS
+ ../atanhf.h
+ DEPENDS
+ .explogxf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_object_library(
+ inv_trigf_utils
+ HDRS
+ inv_trigf_utils.h
+ SRCS
+ inv_trigf_utils.cpp
+ DEPENDS
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.common
+)
+
+add_entrypoint_object(
+ asinf
+ SRCS
+ asinf.cpp
+ HDRS
+ ../asinf.h
+ DEPENDS
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.sqrt
+ libc.src.__support.macros.optimization
+ .inv_trigf_utils
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ acosf
+ SRCS
+ acosf.cpp
+ HDRS
+ ../acosf.h
+ DEPENDS
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.sqrt
+ libc.src.__support.macros.optimization
+ .inv_trigf_utils
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ atanf
+ SRCS
+ atanf.cpp
+ HDRS
+ ../atanf.h
+ DEPENDS
+ .inv_trigf_utils
+ libc.src.__support.FPUtil.except_value_utils
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ atan2f
+ SRCS
+ atan2f.cpp
+ HDRS
+ ../atan2f.h
+ COMPILE_OPTIONS
+ -O3
+ DEPENDS
+ .inv_trigf_utils
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.multiply_add
+ libc.src.__support.FPUtil.nearest_integer
+ libc.src.__support.FPUtil.polyeval
+ libc.src.__support.FPUtil.rounding_mode
+ libc.src.__support.macros.optimization
+)
+
+add_entrypoint_object(
+ scalbn
+ SRCS
+ scalbn.cpp
+ HDRS
+ ../scalbn.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ scalbnf
+ SRCS
+ scalbnf.cpp
+ HDRS
+ ../scalbnf.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ scalbnl
+ SRCS
+ scalbnl.cpp
+ HDRS
+ ../scalbnl.h
+ DEPENDS
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ scalbnf128
+ SRCS
+ scalbnf128.cpp
+ HDRS
+ ../scalbnf128.h
+ DEPENDS
+ libc.src.__support.macros.properties.types
+ libc.src.__support.FPUtil.manipulation_functions
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fmaf
+ SRCS
+ fmaf.cpp
+ HDRS
+ ../fmaf.h
+ DEPENDS
+ libc.src.__support.FPUtil.fma
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_entrypoint_object(
+ fma
+ SRCS
+ fma.cpp
+ HDRS
+ ../fma.h
+ DEPENDS
+ libc.src.__support.FPUtil.fma
+ COMPILE_OPTIONS
+ -O3
+)
diff --git a/libc/src/math/generic/.#CMakeLists.txt b/libc/src/math/generic/.#CMakeLists.txt
new file mode 120000
index 00000000000000..a98b8123b58577
--- /dev/null
+++ b/libc/src/math/generic/.#CMakeLists.txt
@@ -0,0 +1 @@
+seclab at seclab-linux.3014:1712839919
\ No newline at end of file
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index fbc5aa479b47b5..daaf505008ca11 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -2969,6 +2969,7 @@ add_entrypoint_object(
HDRS
../scalbnf128.h
DEPENDS
+ libc.src.__support.macros.properties.types
libc.src.__support.FPUtil.manipulation_functions
COMPILE_OPTIONS
-O3
diff --git a/libc/test/src/math/#CMakeLists.txt# b/libc/test/src/math/#CMakeLists.txt#
new file mode 100644
index 00000000000000..102188c332e408
--- /dev/null
+++ b/libc/test/src/math/#CMakeLists.txt#
@@ -0,0 +1,1710 @@
+add_custom_target(libc-math-unittests)
+
+add_fp_unittest(
+ cosf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ cosf_test.cpp
+ HDRS
+ sdcomp26094.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.cosf
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ cos_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ cos_test.cpp
+ DEPENDS
+ libc.src.math.cos
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sinf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sinf_test.cpp
+ HDRS
+ sdcomp26094.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.sinf
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sin_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sin_test.cpp
+ DEPENDS
+ libc.src.math.sin
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sincosf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sincosf_test.cpp
+ HDRS
+ sdcomp26094.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.sincosf
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ tanf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ tanf_test.cpp
+ HDRS
+ sdcomp26094.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.tanf
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fabs_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ fabs_test.cpp
+ HDRS
+ FAbsTest.h
+ DEPENDS
+ libc.src.math.fabs
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fabsf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ fabsf_test.cpp
+ HDRS
+ FAbsTest.h
+ DEPENDS
+ libc.src.math.fabsf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fabsl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ fabsl_test.cpp
+ HDRS
+ FAbsTest.h
+ DEPENDS
+ libc.src.math.fabsl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ trunc_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ trunc_test.cpp
+ HDRS
+ TruncTest.h
+ DEPENDS
+ libc.src.math.trunc
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ truncf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ truncf_test.cpp
+ HDRS
+ TruncTest.h
+ DEPENDS
+ libc.src.math.truncf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ truncl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ truncl_test.cpp
+ HDRS
+ TruncTest.h
+ DEPENDS
+ libc.src.math.truncl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ ceil_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ ceil_test.cpp
+ HDRS
+ CeilTest.h
+ DEPENDS
+ libc.src.math.ceil
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ ceilf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ ceilf_test.cpp
+ HDRS
+ CeilTest.h
+ DEPENDS
+ libc.src.math.ceilf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ ceill_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ ceill_test.cpp
+ HDRS
+ CeilTest.h
+ DEPENDS
+ libc.src.math.ceill
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ floor_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ floor_test.cpp
+ HDRS
+ FloorTest.h
+ DEPENDS
+ libc.src.math.floor
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ floorf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ floorf_test.cpp
+ HDRS
+ FloorTest.h
+ DEPENDS
+ libc.src.math.floorf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ floorl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ floorl_test.cpp
+ HDRS
+ FloorTest.h
+ DEPENDS
+ libc.src.math.floorl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ round_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ round_test.cpp
+ HDRS
+ RoundTest.h
+ DEPENDS
+ libc.src.math.round
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ roundf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ roundf_test.cpp
+ HDRS
+ RoundTest.h
+ DEPENDS
+ libc.src.math.roundf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ roundl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ roundl_test.cpp
+ HDRS
+ RoundTest.h
+ DEPENDS
+ libc.src.math.roundl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ roundeven_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ roundeven_test.cpp
+ HDRS
+ RoundEvenTest.h
+ DEPENDS
+ libc.src.math.roundeven
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ roundevenf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ roundevenf_test.cpp
+ HDRS
+ RoundEvenTest.h
+ DEPENDS
+ libc.src.math.roundevenf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ roundevenl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ roundevenl_test.cpp
+ HDRS
+ RoundEvenTest.h
+ DEPENDS
+ libc.src.math.roundevenl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ lround_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ lround_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.fenv.feclearexcept
+ libc.src.fenv.feraiseexcept
+ libc.src.fenv.fetestexcept
+ libc.src.math.lround
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ lroundf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ lroundf_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.fenv.feclearexcept
+ libc.src.fenv.feraiseexcept
+ libc.src.fenv.fetestexcept
+ libc.src.math.lroundf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ lroundl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ lroundl_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.fenv.feclearexcept
+ libc.src.fenv.feraiseexcept
+ libc.src.fenv.fetestexcept
+ libc.src.math.lroundl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ llround_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ llround_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.fenv.feclearexcept
+ libc.src.fenv.feraiseexcept
+ libc.src.fenv.fetestexcept
+ libc.src.math.llround
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ llroundf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ llroundf_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.fenv.feclearexcept
+ libc.src.fenv.feraiseexcept
+ libc.src.fenv.fetestexcept
+ libc.src.math.llroundf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ llroundl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ llroundl_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.fenv.feclearexcept
+ libc.src.fenv.feraiseexcept
+ libc.src.fenv.fetestexcept
+ libc.src.math.llroundl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ rint_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ rint_test.cpp
+ HDRS
+ RIntTest.h
+ DEPENDS
+ libc.src.math.rint
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ rintf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ rintf_test.cpp
+ HDRS
+ RIntTest.h
+ DEPENDS
+ libc.src.math.rintf
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ rintl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ rintl_test.cpp
+ HDRS
+ RIntTest.h
+ DEPENDS
+ libc.src.math.rintl
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ lrint_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ lrint_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.math.lrint
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ lrintf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ lrintf_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.math.lrintf
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ lrintl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ lrintl_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.math.lrintl
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ llrint_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ llrint_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.math.llrint
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ llrintf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ llrintf_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.math.llrintf
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ llrintl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ llrintl_test.cpp
+ HDRS
+ RoundToIntegerTest.h
+ DEPENDS
+ libc.src.math.llrintl
+ libc.src.__support.FPUtil.fenv_impl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ expf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ expf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.expf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ exp_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ exp_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.exp
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ exp2f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ exp2f_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.exp2f
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ exp2_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ exp2_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.exp2
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ exp2m1f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ exp2m1f_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.exp2m1f
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ exp10f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ exp10f_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.exp10f
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ exp10_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ exp10_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.exp10
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ copysign_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ copysign_test.cpp
+ HDRS
+ CopySignTest.h
+ DEPENDS
+ libc.src.math.copysign
+ libc.src.__support.FPUtil.fp_bits
+ # FIXME: Currently fails on the GPU build.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ copysignf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ copysignf_test.cpp
+ HDRS
+ CopySignTest.h
+ DEPENDS
+ libc.src.math.copysignf
+ libc.src.__support.FPUtil.fp_bits
+ # FIXME: Currently fails on the GPU build.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ copysignl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ copysignl_test.cpp
+ HDRS
+ CopySignTest.h
+ DEPENDS
+ libc.src.math.copysignl
+ libc.src.__support.FPUtil.fp_bits
+ # FIXME: Currently fails on the GPU build.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ frexp_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ frexp_test.cpp
+ HDRS
+ FrexpTest.h
+ DEPENDS
+ libc.src.math.frexp
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_fp_unittest(
+ frexpf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ frexpf_test.cpp
+ HDRS
+ FrexpTest.h
+ DEPENDS
+ libc.src.math.frexpf
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_fp_unittest(
+ frexpl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ frexpl_test.cpp
+ HDRS
+ FrexpTest.h
+ DEPENDS
+ libc.src.math.frexpl
+ libc.src.__support.FPUtil.basic_operations
+)
+
+add_fp_unittest(
+ ilogb_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ ilogb_test.cpp
+ HDRS
+ ILogbTest.h
+ DEPENDS
+ libc.src.math.ilogb
+ libc.src.__support.CPP.limits
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_fp_unittest(
+ ilogbf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ ilogbf_test.cpp
+ HDRS
+ ILogbTest.h
+ DEPENDS
+ libc.src.math.ilogbf
+ libc.src.__support.CPP.limits
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_fp_unittest(
+ ilogbl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ ilogbl_test.cpp
+ HDRS
+ ILogbTest.h
+ DEPENDS
+ libc.src.math.ilogbl
+ libc.src.__support.CPP.limits
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_fp_unittest(
+ ldexp_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ ldexp_test.cpp
+ HDRS
+ LdExpTest.h
+ DEPENDS
+ libc.src.math.ldexp
+ libc.src.__support.CPP.limits
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ ldexpf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ ldexpf_test.cpp
+ HDRS
+ LdExpTest.h
+ DEPENDS
+ libc.src.math.ldexpf
+ libc.src.__support.CPP.limits
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ ldexpl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ ldexpl_test.cpp
+ HDRS
+ LdExpTest.h
+ DEPENDS
+ libc.src.math.ldexpl
+ libc.src.__support.CPP.limits
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ logb_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ logb_test.cpp
+ DEPENDS
+ libc.src.math.logb
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_fp_unittest(
+ logbf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ logbf_test.cpp
+ DEPENDS
+ libc.src.math.logbf
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_fp_unittest(
+ logbl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ logbl_test.cpp
+ HDRS
+ LogbTest.h
+ DEPENDS
+ libc.src.math.logbl
+ libc.src.__support.FPUtil.manipulation_functions
+)
+
+add_fp_unittest(
+ modf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ modf_test.cpp
+ HDRS
+ ModfTest.h
+ DEPENDS
+ libc.src.math.modf
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.nearest_integer_operations
+ # Requires C++ limits.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ modff_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ modff_test.cpp
+ HDRS
+ ModfTest.h
+ DEPENDS
+ libc.src.math.modff
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.nearest_integer_operations
+ # Requires C++ limits.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ modfl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ modfl_test.cpp
+ HDRS
+ ModfTest.h
+ DEPENDS
+ libc.src.math.modfl
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.nearest_integer_operations
+)
+
+add_fp_unittest(
+ fdimf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fdimf_test.cpp
+ HDRS
+ FDimTest.h
+ DEPENDS
+ libc.src.math.fdimf
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fdim_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fdim_test.cpp
+ HDRS
+ FDimTest.h
+ DEPENDS
+ libc.src.math.fdim
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fdiml_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fdiml_test.cpp
+ HDRS
+ FDimTest.h
+ DEPENDS
+ libc.src.math.fdiml
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fminf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fminf_test.cpp
+ HDRS
+ FMinTest.h
+ DEPENDS
+ libc.src.math.fminf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fmin_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmin_test.cpp
+ HDRS
+ FMinTest.h
+ DEPENDS
+ libc.src.math.fmin
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fminl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fminl_test.cpp
+ HDRS
+ FMinTest.h
+ DEPENDS
+ libc.src.math.fminl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fmaxf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmaxf_test.cpp
+ HDRS
+ FMaxTest.h
+ DEPENDS
+ libc.src.math.fmaxf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fmax_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmax_test.cpp
+ HDRS
+ FMaxTest.h
+ DEPENDS
+ libc.src.math.fmax
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fmaxl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmaxl_test.cpp
+ HDRS
+ FMaxTest.h
+ DEPENDS
+ libc.src.math.fmaxl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sqrtf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sqrtf_test.cpp
+ DEPENDS
+ libc.src.math.sqrtf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sqrt_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sqrt_test.cpp
+ DEPENDS
+ libc.src.math.sqrt
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sqrtl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sqrtl_test.cpp
+ DEPENDS
+ libc.src.math.sqrtl
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ generic_sqrtf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ generic_sqrtf_test.cpp
+ DEPENDS
+ libc.src.math.sqrtf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.generic.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_fp_unittest(
+ generic_sqrt_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ generic_sqrt_test.cpp
+ DEPENDS
+ libc.src.math.sqrt
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.generic.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_fp_unittest(
+ generic_sqrtl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ generic_sqrtl_test.cpp
+ DEPENDS
+ libc.src.math.sqrtl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.generic.sqrt
+ COMPILE_OPTIONS
+ -O3
+)
+
+add_fp_unittest(
+ remquof_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ remquof_test.cpp
+ HDRS
+ RemQuoTest.h
+ DEPENDS
+ libc.src.math.remquof
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ remquo_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ remquo_test.cpp
+ HDRS
+ RemQuoTest.h
+ DEPENDS
+ libc.src.math.remquo
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ remquol_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ remquol_test.cpp
+ HDRS
+ RemQuoTest.h
+ DEPENDS
+ libc.src.math.remquol
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ hypotf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ hypotf_test.cpp
+ DEPENDS
+ libc.src.math.hypotf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ hypot_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ hypot_test.cpp
+ DEPENDS
+ libc.src.math.hypot
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ nextafter_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nextafter_test.cpp
+ HDRS
+ NextAfterTest.h
+ DEPENDS
+ libc.src.math.nextafter
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ nextafterf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nextafterf_test.cpp
+ HDRS
+ NextAfterTest.h
+ DEPENDS
+ libc.src.math.nextafterf
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ nextafterl_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nextafterl_test.cpp
+ HDRS
+ NextAfterTest.h
+ DEPENDS
+ libc.src.math.nextafterl
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ nextafterf128_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ nextafterf128_test.cpp
+ HDRS
+ NextAfterTest.h
+ DEPENDS
+ libc.src.math.nextafterf128
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.fp_bits
+)
+
+# TODO(lntue): The current implementation of fputil::general::fma<float> is only
+# correctly rounded for the default rounding mode round-to-nearest tie-to-even.
+add_fp_unittest(
+ fmaf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmaf_test.cpp
+ DEPENDS
+ libc.src.math.fmaf
+ libc.src.stdlib.rand
+ libc.src.stdlib.srand
+ libc.src.__support.FPUtil.fp_bits
+ FLAGS
+ FMA_OPT__ONLY
+)
+
+add_fp_unittest(
+ fma_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ fma_test.cpp
+ DEPENDS
+ libc.src.math.fma
+ libc.src.stdlib.rand
+ libc.src.stdlib.srand
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ tan_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ tan_test.cpp
+ DEPENDS
+ libc.src.math.tan
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ expm1f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ expm1f_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.expm1f
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ expm1_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ expm1_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.expm1
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ log_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ logf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ logf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.logf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+log2_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log2_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log2
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ log2f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log2f_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log2f
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ log10_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log10_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log10
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ log10f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log10f_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log10f
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+log1p_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log1p_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log1p
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ log1pf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ log1pf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.log1pf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ fmodf_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmodf_test.cpp
+ HDRS
+ FModTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.fmodf
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.nearest_integer_operations
+ # FIXME: Currently fails on the GPU build.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ fmod_test
+ SUITE
+ libc-math-unittests
+ SRCS
+ fmod_test.cpp
+ HDRS
+ FModTest.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.fmod
+ libc.src.__support.FPUtil.basic_operations
+ libc.src.__support.FPUtil.nearest_integer_operations
+ # FIXME: Currently fails on the GPU build.
+ UNIT_TEST_ONLY
+)
+
+add_fp_unittest(
+ explogxf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ HDRS
+ in_float_range_test_helper.h
+ SRCS
+ explogxf_test.cpp
+ DEPENDS
+ libc.src.math.generic.explogxf
+ libc.src.math.fabs
+ libc.src.math.fabsf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ coshf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ coshf_test.cpp
+ HDRS
+ sdcomp26094.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.coshf
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ sinhf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ sinhf_test.cpp
+ HDRS
+ sdcomp26094.h
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.sinhf
+ libc.src.__support.CPP.array
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ tanhf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ tanhf_test.cpp
+ DEPENDS
+ libc.src.math.tanhf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ atanhf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ atanhf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.atanhf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ asinhf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ asinhf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.asinhf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ acoshf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ acoshf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.acoshf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ asinf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ asinf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.asinf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ acosf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ acosf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.acosf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ atanf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ atanf_test.cpp
+ DEPENDS
+ libc.src.errno.errno
+ libc.src.math.atanf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ scalbn_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ scalbn_test.cpp
+ HDRS
+ ScalbnTest.h
+ DEPENDS
+ libc.src.math.scalbn
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ scalbnf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ scalbnf_test.cpp
+ HDRS
+ ScalbnTest.h
+ DEPENDS
+ libc.src.math.scalbnf
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ scalbnl_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ scalbnl_test.cpp
+ HDRS
+ ScalbnTest.h
+ DEPENDS
+ libc.src.math.scalbnl
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ scalbnf128_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ scalbnf128_test.cpp
+ HDRS
+ ScalbnTest.h
+ DEPENDS
+ libc.src.math.scalbnf128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.normal_float
+)
+
+add_fp_unittest(
+ erff_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ erff_test.cpp
+ DEPENDS
+ libc.src.math.erff
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ powf_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ powf_test.cpp
+ DEPENDS
+ libc.src.math.powf
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_fp_unittest(
+ atan2f_test
+ NEED_MPFR
+ SUITE
+ libc-math-unittests
+ SRCS
+ atan2f_test.cpp
+ DEPENDS
+ libc.src.math.atan2f
+ libc.src.__support.FPUtil.fp_bits
+)
+
+add_subdirectory(generic)
+add_subdirectory(smoke)
+
+if(NOT LLVM_LIBC_FULL_BUILD)
+ add_subdirectory(exhaustive)
+ add_subdirectory(performance_testing)
+endif()
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 77f8e206e010af..102188c332e408 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -1203,58 +1203,6 @@ add_fp_unittest(
libc.src.__support.FPUtil.fp_bits
)
-add_fp_unittest(
- nearbyint_test
- SUITE
- libc-math-unittests
- SRCS
- nearbyint_test.cpp
- HDRS
- NearbyIntTest.h
- DEPENDS
- libc.include.math
- libc.src.math.nearbyint
-)
-
-add_fp_unittest(
- nearbyintf_test
- SUITE
- libc-math-unittests
- SRCS
- nearbyintf_test.cpp
- HDRS
- NearbyIntTest.h
- DEPENDS
- libc.include.math
- libc.src.math.nearbyintf
-)
-
-add_fp_unittest(
- nearbyintl_test
- SUITE
- libc-math-unittests
- SRCS
- nearbyintl_test.cpp
- HDRS
- NearbyIntTest.h
- DEPENDS
- libc.include.math
- libc.src.math.nearbyintl
-)
-
-add_fp_unittest(
- nearbyintf128_test
- SUITE
- libc-math-unittests
- SRCS
- nearbyintf128_test.cpp
- HDRS
- NearbyIntTest.h
- DEPENDS
- libc.include.math
- libc.src.math.nearbyintf128
-)
-
add_fp_unittest(
nextafter_test
SUITE
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 33bcdb4c903b49..2c7be35499d968 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -2188,6 +2188,58 @@ add_fp_unittest(
UNIT_TEST_ONLY
)
+add_fp_unittest(
+ nearbyint_test
+ SUITE
+ libc-math-smoke-tests
+ SRCS
+ nearbyint_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.hdr.fenv_macros
+ libc.src.math.nearbyint
+)
+
+add_fp_unittest(
+ nearbyintf_test
+ SUITE
+ libc-math-smoke-tests
+ SRCS
+ nearbyintf_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.hdr.fenv_macros
+ libc.src.math.nearbyintf
+)
+
+add_fp_unittest(
+ nearbyintl_test
+ SUITE
+ libc-math-smoke-tests
+ SRCS
+ nearbyintl_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.hdr.fenv_macros
+ libc.src.math.nearbyintl
+)
+
+add_fp_unittest(
+ nearbyintf128_test
+ SUITE
+ libc-math-smoke-tests
+ SRCS
+ nearbyintf128_test.cpp
+ HDRS
+ NearbyIntTest.h
+ DEPENDS
+ libc.hdr.fenv_macros
+ libc.src.math.nearbyintf128
+)
+
add_fp_unittest(
nextafter_test
SUITE
diff --git a/libc/test/src/math/NearbyIntTest.h b/libc/test/src/math/smoke/NearbyIntTest.h
similarity index 99%
rename from libc/test/src/math/NearbyIntTest.h
rename to libc/test/src/math/smoke/NearbyIntTest.h
index 6ab05982d5e58b..b3bfb099d2e7eb 100644
--- a/libc/test/src/math/NearbyIntTest.h
+++ b/libc/test/src/math/smoke/NearbyIntTest.h
@@ -9,11 +9,11 @@
#ifndef LLVM_LIBC_TEST_SRC_MATH_NEARBYINTTEST_H
#define LLVM_LIBC_TEST_SRC_MATH_NEARBYINTTEST_H
+#include "hdr/fenv_macros.h"
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
-#include <fenv.h>
static constexpr int ROUNDING_MODES[4] = {FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO,
FE_TONEAREST};
diff --git a/libc/test/src/math/nearbyint_test.cpp b/libc/test/src/math/smoke/nearbyint_test.cpp
similarity index 100%
rename from libc/test/src/math/nearbyint_test.cpp
rename to libc/test/src/math/smoke/nearbyint_test.cpp
diff --git a/libc/test/src/math/nearbyintf128_test.cpp b/libc/test/src/math/smoke/nearbyintf128_test.cpp
similarity index 87%
rename from libc/test/src/math/nearbyintf128_test.cpp
rename to libc/test/src/math/smoke/nearbyintf128_test.cpp
index 74c29652e9cd5e..98fbb2858fafa6 100644
--- a/libc/test/src/math/nearbyintf128_test.cpp
+++ b/libc/test/src/math/smoke/nearbyintf128_test.cpp
@@ -10,4 +10,4 @@
#include "src/math/nearbyintf128.h"
-LIST_NEARBYINT_TESTS(float128, LIBC_NAMESPACE::nearbyintf128)
\ No newline at end of file
+LIST_NEARBYINT_TESTS(float128, LIBC_NAMESPACE::nearbyintf128)
diff --git a/libc/test/src/math/nearbyintf_test.cpp b/libc/test/src/math/smoke/nearbyintf_test.cpp
similarity index 100%
rename from libc/test/src/math/nearbyintf_test.cpp
rename to libc/test/src/math/smoke/nearbyintf_test.cpp
diff --git a/libc/test/src/math/nearbyintl_test.cpp b/libc/test/src/math/smoke/nearbyintl_test.cpp
similarity index 100%
rename from libc/test/src/math/nearbyintl_test.cpp
rename to libc/test/src/math/smoke/nearbyintl_test.cpp
More information about the libc-commits
mailing list