[libc-commits] [libc] [libc] Make ceilf128 use the emulated float128 type (PR #207735)
via libc-commits
libc-commits at lists.llvm.org
Sat Aug 15 10:21:18 PDT 2026
https://github.com/Sukumarsawant updated https://github.com/llvm/llvm-project/pull/207735
>From d71d1ea9be944f2c552d0a45ecca08e36755e040 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Mon, 29 Jun 2026 16:00:33 +0530
Subject: [PATCH 01/41] test: emulated float128 with ceilf128
---
libc/shared/math/ceilf128.h | 9 +++------
libc/src/__support/math/ceilf128.h | 11 ++++-------
libc/src/math/ceilf128.h | 5 ++++-
libc/src/math/generic/ceilf128.cpp | 5 ++++-
libc/test/src/math/ceilf128_test.cpp | 5 ++++-
5 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/libc/shared/math/ceilf128.h b/libc/shared/math/ceilf128.h
index 6171a0d3d8326..25611636e2233 100644
--- a/libc/shared/math/ceilf128.h
+++ b/libc/shared/math/ceilf128.h
@@ -9,12 +9,11 @@
#ifndef LLVM_LIBC_SHARED_MATH_CEILF128_H
#define LLVM_LIBC_SHARED_MATH_CEILF128_H
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
#include "shared/libc_common.h"
#include "src/__support/math/ceilf128.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace shared {
@@ -24,6 +23,4 @@ using math::ceilf128;
} // namespace shared
} // namespace LIBC_NAMESPACE_DECL
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
#endif // LLVM_LIBC_SHARED_MATH_CEILF128_H
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index c7cc343176ee6..f12fc6a11a07c 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -9,21 +9,18 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_CEILF128_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_CEILF128_H
-#include "include/llvm-libc-types/float128.h"
-
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
-
#include "src/__support/FPUtil/NearestIntegerOperations.h"
#include "src/__support/macros/config.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace math {
-LIBC_INLINE constexpr float128 ceilf128(float128 x) { return fputil::ceil(x); }
+LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
#endif // LLVM_LIBC_SRC___SUPPORT_MATH_CEILF128_H
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index 211b8131a9559..40de768feb299 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -11,10 +11,13 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
-float128 ceilf128(float128 x);
+Float128 ceilf128(Float128 x);
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index fd9c206612207..e359ef9cb18b7 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -8,10 +8,13 @@
#include "src/math/ceilf128.h"
#include "src/__support/math/ceilf128.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
+LLVM_LIBC_FUNCTION(Float128, ceilf128, (Float128 x)) {
return math::ceilf128(x);
}
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index f0da8258f79bc..e01221f4ac6cd 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -9,5 +9,8 @@
#include "CeilTest.h"
#include "src/math/ceilf128.h"
+#include "src/__support/FPUtil/float128.h"
-LIST_CEIL_TESTS(float128, LIBC_NAMESPACE::ceilf128)
+using LIBC_NAMESPACE::fputil::Float128;
+
+LIST_CEIL_TESTS(Float128, LIBC_NAMESPACE::ceilf128)
>From 92ad5322ca40287209be8161bc6e42c7cd7962a3 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Mon, 29 Jun 2026 16:15:56 +0530
Subject: [PATCH 02/41] test: float128
---
libc/src/__support/math/ceilf128.h | 3 ---
libc/test/shared/shared_math_test.cpp | 11 ++++++++++-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index f12fc6a11a07c..0361251b664a9 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -11,9 +11,6 @@
#include "src/__support/FPUtil/NearestIntegerOperations.h"
#include "src/__support/macros/config.h"
-#include "src/__support/FPUtil/float128.h"
-
-using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace math {
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 8bf4260c255b5..cb207b5095b59 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -576,6 +576,16 @@ TEST(LlvmLibcSharedMathTest, AllLongDouble) {
#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
+// Emulated float128
+// TODO: style
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
+
+TEST(LlvmLibcSharedMathTest, AllEmuFloat128){
+ EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
+}
+
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
TEST(LlvmLibcSharedMathTest, AllFloat128) {
@@ -621,7 +631,6 @@ TEST(LlvmLibcSharedMathTest, AllFloat128) {
float128(0.0), float128(0.0)));
EXPECT_FP_EQ(bfloat16(2.0), LIBC_NAMESPACE::shared::bf16divf128(
float128(4.0), float128(2.0)));
- EXPECT_FP_EQ(float128(0.0), LIBC_NAMESPACE::shared::ceilf128(float128(0.0)));
EXPECT_FP_EQ(float128(0.0), LIBC_NAMESPACE::shared::copysignf128(
float128(0.0), float128(0.0)));
EXPECT_FP_EQ(float128(0.0),
>From 81230bac928d1434cb39f19b57371d23816a5e44 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Mon, 29 Jun 2026 16:23:17 +0530
Subject: [PATCH 03/41] nit
---
libc/test/shared/CMakeLists.txt | 1019 ++++++++++++++++---------------
1 file changed, 510 insertions(+), 509 deletions(-)
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 49232caf377bc..6e667f4feec71 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -10,515 +10,516 @@ if(LIBC_TEST_SKIP_SHARED_TESTS)
message(STATUS "LIBC_TEST_SKIP_SHARED_MATH_TESTS is set. Skipping libc-shared-tests.")
endif()
else()
- add_fp_unittest(
- shared_math_test
- SUITE
- libc-shared-tests
- SRCS
- shared_math_test.cpp
- DEPENDS
- libc.src.__support.FPUtil.fp_bits
- libc.src.__support.math.acos
- libc.src.__support.math.acosbf16
- libc.src.__support.math.acosf
- libc.src.__support.math.acosf16
- libc.src.__support.math.acoshf
- libc.src.__support.math.acoshf16
- libc.src.__support.math.acospif
- libc.src.__support.math.acospif16
- libc.src.__support.math.asin
- libc.src.__support.math.asinbf16
- libc.src.__support.math.asinf
- libc.src.__support.math.asinf16
- libc.src.__support.math.asinhf
- libc.src.__support.math.asinhf16
- libc.src.__support.math.asinpi
- libc.src.__support.math.asinpif
- libc.src.__support.math.asinpif16
- libc.src.__support.math.atan
- libc.src.__support.math.atan2
- libc.src.__support.math.atan2f
- libc.src.__support.math.atan2f128
- libc.src.__support.math.atan2f16
- libc.src.__support.math.atanbf16
- libc.src.__support.math.atanf
- libc.src.__support.math.atanf16
- libc.src.__support.math.atanhf
- libc.src.__support.math.atanhf16
- libc.src.__support.math.atanpif16
- libc.src.__support.math.bf16add
- libc.src.__support.math.bf16addf
- libc.src.__support.math.bf16addl
- libc.src.__support.math.bf16addf128
- libc.src.__support.math.bf16div
- libc.src.__support.math.bf16divf
- libc.src.__support.math.bf16divf128
- libc.src.__support.math.bf16divl
- libc.src.__support.math.bf16fma
- libc.src.__support.math.bf16fmaf
- libc.src.__support.math.bf16fmaf128
- libc.src.__support.math.bf16fmal
- libc.src.__support.math.bf16mul
- libc.src.__support.math.bf16mulf
- libc.src.__support.math.bf16mulf128
- libc.src.__support.math.bf16mull
- libc.src.__support.math.bf16sub
- libc.src.__support.math.bf16subf
- libc.src.__support.math.bf16subf128
- libc.src.__support.math.bf16subl
- libc.src.__support.math.canonicalize
- libc.src.__support.math.canonicalizebf16
- libc.src.__support.math.canonicalizef
- libc.src.__support.math.canonicalizef128
- libc.src.__support.math.canonicalizef16
- libc.src.__support.math.canonicalizel
- libc.src.__support.math.cbrt
- libc.src.__support.math.cbrtbf16
- libc.src.__support.math.cbrtf
- libc.src.__support.math.cbrtf16
- libc.src.__support.math.ceil
- libc.src.__support.math.ceilbf16
- libc.src.__support.math.ceilf
- libc.src.__support.math.ceilf128
- libc.src.__support.math.ceilf16
- libc.src.__support.math.ceill
- libc.src.__support.math.copysign
- libc.src.__support.math.copysignbf16
- libc.src.__support.math.copysignf
- libc.src.__support.math.copysignf128
- libc.src.__support.math.copysignf16
- libc.src.__support.math.copysignl
- libc.src.__support.math.cos
- libc.src.__support.math.cosf
- libc.src.__support.math.cosf16
- libc.src.__support.math.coshf
- libc.src.__support.math.coshf16
- libc.src.__support.math.cospif
- libc.src.__support.math.cospif16
- libc.src.__support.math.daddf128
- libc.src.__support.math.daddl
- libc.src.__support.math.ddivf128
- libc.src.__support.math.ddivl
- libc.src.__support.math.dfmaf128
- libc.src.__support.math.dfmal
- libc.src.__support.math.dmulf128
- libc.src.__support.math.dmull
- libc.src.__support.math.dsqrtf128
- libc.src.__support.math.dsqrtl
- libc.src.__support.math.dsubf128
- libc.src.__support.math.dsubl
- libc.src.__support.math.exp10m1f
- libc.src.__support.math.exp10m1f16
- libc.src.__support.math.erfcf16
- libc.src.__support.math.erff
- libc.src.__support.math.erff16
- libc.src.__support.math.exp
- libc.src.__support.math.exp2
- libc.src.__support.math.exp2f
- libc.src.__support.math.exp2f16
- libc.src.__support.math.exp2m1f
- libc.src.__support.math.exp2m1f16
- libc.src.__support.math.expm1
- libc.src.__support.math.expm1f
- libc.src.__support.math.expm1f16
- libc.src.__support.math.exp10
- libc.src.__support.math.exp10f
- libc.src.__support.math.exp10f16
- libc.src.__support.math.expf
- libc.src.__support.math.expbf16
- libc.src.__support.math.expf16
- libc.src.__support.math.f16add
- libc.src.__support.math.f16addf
- libc.src.__support.math.f16addf128
- libc.src.__support.math.f16addl
- libc.src.__support.math.f16div
- libc.src.__support.math.f16divf
- libc.src.__support.math.f16divf128
- libc.src.__support.math.f16divl
- libc.src.__support.math.f16fma
- libc.src.__support.math.f16fmaf
- libc.src.__support.math.f16fmaf128
- libc.src.__support.math.f16fmal
- libc.src.__support.math.f16mul
- libc.src.__support.math.f16mulf
- libc.src.__support.math.f16mulf128
- libc.src.__support.math.f16mull
- libc.src.__support.math.f16sqrt
- libc.src.__support.math.f16sqrtf
- libc.src.__support.math.f16sqrtf128
- libc.src.__support.math.f16sqrtl
- libc.src.__support.math.f16sub
- libc.src.__support.math.f16subf
- libc.src.__support.math.f16subf128
- libc.src.__support.math.f16subl
- libc.src.__support.math.fabs
- libc.src.__support.math.fabsbf16
- libc.src.__support.math.fabsf
- libc.src.__support.math.fabsf128
- libc.src.__support.math.fabsf16
- libc.src.__support.math.fabsl
- libc.src.__support.math.fadd
- libc.src.__support.math.faddf128
- libc.src.__support.math.faddl
- libc.src.__support.math.fdim
- libc.src.__support.math.fdimbf16
- libc.src.__support.math.fdimf
- libc.src.__support.math.fdimf128
- libc.src.__support.math.fdimf16
- libc.src.__support.math.fdiml
- libc.src.__support.math.fdiv
- libc.src.__support.math.fdivf128
- libc.src.__support.math.fdivl
- libc.src.__support.math.ffma
- libc.src.__support.math.ffmaf128
- libc.src.__support.math.ffmal
- libc.src.__support.math.floor
- libc.src.__support.math.floorbf16
- libc.src.__support.math.floorf
- libc.src.__support.math.floorf128
- libc.src.__support.math.floorf16
- libc.src.__support.math.floorl
- libc.src.__support.math.fma
- libc.src.__support.math.fmaf
- libc.src.__support.math.fmaf16
- libc.src.__support.math.fmabf16
- libc.src.__support.math.fmax
- libc.src.__support.math.fmaxbf16
- libc.src.__support.math.fmaxf
- libc.src.__support.math.fmaxf128
- libc.src.__support.math.fmaxf16
- libc.src.__support.math.fmaximum
- libc.src.__support.math.fmaximum_mag
- libc.src.__support.math.fmaximum_mag_num
- libc.src.__support.math.fmaximum_mag_numbf16
- libc.src.__support.math.fmaximum_mag_numf
- libc.src.__support.math.fmaximum_mag_numf128
- libc.src.__support.math.fmaximum_mag_numf16
- libc.src.__support.math.fmaximum_mag_numl
- libc.src.__support.math.fmaximum_magbf16
- libc.src.__support.math.fmaximum_magf
- libc.src.__support.math.fmaximum_magf128
- libc.src.__support.math.fmaximum_magf16
- libc.src.__support.math.fmaximum_magl
- libc.src.__support.math.fmaximum_num
- libc.src.__support.math.fmaximum_numbf16
- libc.src.__support.math.fmaximum_numf
- libc.src.__support.math.fmaximum_numf128
- libc.src.__support.math.fmaximum_numf16
- libc.src.__support.math.fmaximum_numl
- libc.src.__support.math.fmaximumbf16
- libc.src.__support.math.fmaximumf
- libc.src.__support.math.fmaximumf128
- libc.src.__support.math.fmaximumf16
- libc.src.__support.math.fmaximuml
- libc.src.__support.math.fmaxl
- libc.src.__support.math.fmin
- libc.src.__support.math.fminbf16
- libc.src.__support.math.fminf
- libc.src.__support.math.fminf128
- libc.src.__support.math.fminf16
- libc.src.__support.math.fminimum
- libc.src.__support.math.fminimum_mag
- libc.src.__support.math.fminimum_mag_num
- libc.src.__support.math.fminimum_mag_numbf16
- libc.src.__support.math.fminimum_mag_numf
- libc.src.__support.math.fminimum_mag_numf128
- libc.src.__support.math.fminimum_mag_numf16
- libc.src.__support.math.fminimum_mag_numl
- libc.src.__support.math.fminimum_magbf16
- libc.src.__support.math.fminimum_magf
- libc.src.__support.math.fminimum_magf128
- libc.src.__support.math.fminimum_magf16
- libc.src.__support.math.fminimum_magl
- libc.src.__support.math.fminimum_num
- libc.src.__support.math.fminimum_numbf16
- libc.src.__support.math.fminimum_numf
- libc.src.__support.math.fminimum_numf128
- libc.src.__support.math.fminimum_numf16
- libc.src.__support.math.fminimum_numl
- libc.src.__support.math.fminimumbf16
- libc.src.__support.math.fminimumf
- libc.src.__support.math.fminimumf128
- libc.src.__support.math.fminimumf16
- libc.src.__support.math.fminimuml
- libc.src.__support.math.fminl
- libc.src.__support.math.fmod
- libc.src.__support.math.fmodbf16
- libc.src.__support.math.fmodf
- libc.src.__support.math.fmodf128
- libc.src.__support.math.fmodf16
- libc.src.__support.math.fmodl
- libc.src.__support.math.fmul
- libc.src.__support.math.fmulf128
- libc.src.__support.math.fmull
- libc.src.__support.math.frexp
- libc.src.__support.math.frexpbf16
- libc.src.__support.math.frexpf
- libc.src.__support.math.frexpf128
- libc.src.__support.math.frexpf16
- libc.src.__support.math.frexpl
- libc.src.__support.math.fromfp
- libc.src.__support.math.fromfpbf16
- libc.src.__support.math.fromfpf
- libc.src.__support.math.fromfpf128
- libc.src.__support.math.fromfpf16
- libc.src.__support.math.fromfpl
- libc.src.__support.math.fromfpx
- libc.src.__support.math.fromfpxbf16
- libc.src.__support.math.fromfpxf
- libc.src.__support.math.fromfpxf128
- libc.src.__support.math.fromfpxf16
- libc.src.__support.math.fromfpxl
- libc.src.__support.math.fsqrt
- libc.src.__support.math.fsqrtf128
- libc.src.__support.math.fsqrtl
- libc.src.__support.math.fsub
- libc.src.__support.math.fsubf128
- libc.src.__support.math.fsubl
- libc.src.__support.math.getpayload
- libc.src.__support.math.getpayloadbf16
- libc.src.__support.math.getpayloadf
- libc.src.__support.math.getpayloadf128
- libc.src.__support.math.getpayloadf16
- libc.src.__support.math.getpayloadl
- libc.src.__support.math.hypot
- libc.src.__support.math.hypotf
- libc.src.__support.math.hypotbf16
- libc.src.__support.math.hypotf16
- libc.src.__support.math.ilogb
- libc.src.__support.math.ilogbbf16
- libc.src.__support.math.ilogbf
- libc.src.__support.math.ilogbf16
- libc.src.__support.math.ilogbf128
- libc.src.__support.math.ilogbl
- libc.src.__support.math.iscanonical
- libc.src.__support.math.iscanonicalbf16
- libc.src.__support.math.iscanonicalf
- libc.src.__support.math.iscanonicalf128
- libc.src.__support.math.iscanonicalf16
- libc.src.__support.math.iscanonicall
- libc.src.__support.math.isnan
- libc.src.__support.math.isnanf
- libc.src.__support.math.isnanf128
- libc.src.__support.math.isnanf16
- libc.src.__support.math.isnanl
- libc.src.__support.math.issignaling
- libc.src.__support.math.issignalingbf16
- libc.src.__support.math.issignalingf
- libc.src.__support.math.issignalingf128
- libc.src.__support.math.issignalingf16
- libc.src.__support.math.issignalingl
- libc.src.__support.math.ldexp
- libc.src.__support.math.ldexpbf16
- libc.src.__support.math.ldexpf
- libc.src.__support.math.ldexpl
- libc.src.__support.math.llogb
- libc.src.__support.math.llogbbf16
- libc.src.__support.math.llrint
- libc.src.__support.math.llrintbf16
- libc.src.__support.math.llrintf
- libc.src.__support.math.llrintf128
- libc.src.__support.math.llrintf16
- libc.src.__support.math.llrintl
- libc.src.__support.math.llround
- libc.src.__support.math.llroundbf16
- libc.src.__support.math.llroundf
- libc.src.__support.math.llroundf128
- libc.src.__support.math.llroundf16
- libc.src.__support.math.llroundl
- libc.src.__support.math.log
- libc.src.__support.math.log10
- libc.src.__support.math.log10f16
- libc.src.__support.math.log10p1f16
- libc.src.__support.math.log10f
- libc.src.__support.math.log1p
- libc.src.__support.math.log1pf
- libc.src.__support.math.log2
- libc.src.__support.math.logb
- libc.src.__support.math.log2f
- libc.src.__support.math.log2f16
- libc.src.__support.math.log2p1f16
- libc.src.__support.math.logbf
- libc.src.__support.math.logbbf16
- libc.src.__support.math.logbf128
- libc.src.__support.math.logbf16
- libc.src.__support.math.logf
- libc.src.__support.math.log_bf16
- libc.src.__support.math.ldexpf
- libc.src.__support.math.ldexpf128
- libc.src.__support.math.ldexpf16
- libc.src.__support.math.lgammaf16
- libc.src.__support.math.llogbf
- libc.src.__support.math.llogbf128
- libc.src.__support.math.llogbf16
- libc.src.__support.math.logbl
- libc.src.__support.math.logf16
- libc.src.__support.math.llogbl
- libc.src.__support.math.lrint
- libc.src.__support.math.lrintbf16
- libc.src.__support.math.lrintf
- libc.src.__support.math.lrintf128
- libc.src.__support.math.lrintf16
- libc.src.__support.math.lrintl
- libc.src.__support.math.lround
- libc.src.__support.math.lroundbf16
- libc.src.__support.math.lroundf
- libc.src.__support.math.lroundf128
- libc.src.__support.math.lroundf16
- libc.src.__support.math.lroundl
- libc.src.__support.math.modf
- libc.src.__support.math.modfbf16
- libc.src.__support.math.modff
- libc.src.__support.math.modff128
- libc.src.__support.math.modff16
- libc.src.__support.math.modfl
- libc.src.__support.math.nan
- libc.src.__support.math.nanbf16
- libc.src.__support.math.nanf
- libc.src.__support.math.nanf128
- libc.src.__support.math.nanf16
- libc.src.__support.math.nanl
- libc.src.__support.math.nearbyint
- libc.src.__support.math.nearbyintbf16
- libc.src.__support.math.nearbyintf
- libc.src.__support.math.nearbyintf128
- libc.src.__support.math.nearbyintf16
- libc.src.__support.math.nearbyintl
- libc.src.__support.math.nextdown
- libc.src.__support.math.nextdownbf16
- libc.src.__support.math.nextdownf
- libc.src.__support.math.nextdownf128
- libc.src.__support.math.nextdownf16
- libc.src.__support.math.nextdownl
- libc.src.__support.math.nextup
- libc.src.__support.math.nextupbf16
- libc.src.__support.math.nextupf
- libc.src.__support.math.nextupf128
- libc.src.__support.math.nextupf16
- libc.src.__support.math.nextupl
- libc.src.__support.math.nexttoward
- libc.src.__support.math.nexttowardbf16
- libc.src.__support.math.nexttowardf
- libc.src.__support.math.nexttowardf16
- libc.src.__support.math.nexttowardl
- libc.src.__support.math.nextafter
- libc.src.__support.math.nextafterbf16
- libc.src.__support.math.nextafterf
- libc.src.__support.math.nextafterf16
- libc.src.__support.math.nextafterl
- libc.src.__support.math.nextafterf128
- libc.src.__support.math.pow
- libc.src.__support.math.powf
- libc.src.__support.math.remainder
- libc.src.__support.math.remainderbf16
- libc.src.__support.math.remainderf
- libc.src.__support.math.remainderf128
- libc.src.__support.math.remainderf16
- libc.src.__support.math.remainderl
- libc.src.__support.math.remquo
- libc.src.__support.math.remquobf16
- libc.src.__support.math.remquof
- libc.src.__support.math.remquof128
- libc.src.__support.math.remquof16
- libc.src.__support.math.remquol
- libc.src.__support.math.rint
- libc.src.__support.math.rintbf16
- libc.src.__support.math.rintf
- libc.src.__support.math.rintf128
- libc.src.__support.math.rintf16
- libc.src.__support.math.rintl
- libc.src.__support.math.round
- libc.src.__support.math.roundbf16
- libc.src.__support.math.roundeven
- libc.src.__support.math.roundevenbf16
- libc.src.__support.math.roundevenf
- libc.src.__support.math.roundevenf128
- libc.src.__support.math.roundevenf16
- libc.src.__support.math.roundevenl
- libc.src.__support.math.roundf
- libc.src.__support.math.roundf128
- libc.src.__support.math.roundf16
- libc.src.__support.math.roundl
- libc.src.__support.math.rsqrtf
- libc.src.__support.math.rsqrtf16
- libc.src.__support.math.scalbln
- libc.src.__support.math.scalblnbf16
- libc.src.__support.math.scalblnf
- libc.src.__support.math.scalblnf128
- libc.src.__support.math.scalblnf16
- libc.src.__support.math.scalblnl
- libc.src.__support.math.scalbn
- libc.src.__support.math.scalbnbf16
- libc.src.__support.math.scalbnf
- libc.src.__support.math.scalbnf128
- libc.src.__support.math.scalbnf16
- libc.src.__support.math.scalbnl
- libc.src.__support.math.setpayload
- libc.src.__support.math.setpayloadbf16
- libc.src.__support.math.setpayloadf
- libc.src.__support.math.setpayloadf128
- libc.src.__support.math.setpayloadf16
- libc.src.__support.math.setpayloadl
- libc.src.__support.math.setpayloadsig
- libc.src.__support.math.setpayloadsigbf16
- libc.src.__support.math.setpayloadsigf
- libc.src.__support.math.setpayloadsigf128
- libc.src.__support.math.setpayloadsigf16
- libc.src.__support.math.setpayloadsigl
- libc.src.__support.math.sqrtf16
- libc.src.__support.math.sin
- libc.src.__support.math.sincos
- libc.src.__support.math.sincosf
- libc.src.__support.math.sinf
- libc.src.__support.math.sinf16
- libc.src.__support.math.sinhf
- libc.src.__support.math.sinhf16
- libc.src.__support.math.sqrtf128
- libc.src.__support.math.sinpif
- libc.src.__support.math.sinpif16
- libc.src.__support.math.sqrt
- libc.src.__support.math.sqrtbf16
- libc.src.__support.math.sqrtf
- libc.src.__support.math.sqrtl
- libc.src.__support.math.tan
- libc.src.__support.math.tanbf16
- libc.src.__support.math.tanf
- libc.src.__support.math.tanf16
- libc.src.__support.math.tanhf
- libc.src.__support.math.tanhf16
- libc.src.__support.math.tanpif
- libc.src.__support.math.tanpif16
- libc.src.__support.math.trunc
- libc.src.__support.math.truncbf16
- libc.src.__support.math.truncf
- libc.src.__support.math.truncf128
- libc.src.__support.math.truncf16
- libc.src.__support.math.truncl
- libc.src.__support.math.ufromfp
- libc.src.__support.math.ufromfpbf16
- libc.src.__support.math.ufromfpf
- libc.src.__support.math.ufromfpf128
- libc.src.__support.math.ufromfpf16
- libc.src.__support.math.ufromfpl
- libc.src.__support.math.ufromfpx
- libc.src.__support.math.ufromfpxbf16
- libc.src.__support.math.ufromfpxf
- libc.src.__support.math.ufromfpxf128
- libc.src.__support.math.ufromfpxf16
- libc.src.__support.math.ufromfpxl
- libc.src.__support.math.totalorder
- libc.src.__support.math.totalorderbf16
- libc.src.__support.math.totalorderf
- libc.src.__support.math.totalorderf128
- libc.src.__support.math.totalorderf16
- libc.src.__support.math.totalorderl
- libc.src.__support.math.totalordermag
- libc.src.__support.math.totalordermagbf16
- libc.src.__support.math.totalordermagf
- libc.src.__support.math.totalordermagf128
- libc.src.__support.math.totalordermagf16
- libc.src.__support.math.totalordermagl
- )
+add_fp_unittest(
+ shared_math_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_math_test.cpp
+ DEPENDS
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.math.acos
+ libc.src.__support.math.acosbf16
+ libc.src.__support.math.acosf
+ libc.src.__support.math.acosf16
+ libc.src.__support.math.acoshf
+ libc.src.__support.math.acoshf16
+ libc.src.__support.math.acospif
+ libc.src.__support.math.acospif16
+ libc.src.__support.math.asin
+ libc.src.__support.math.asinbf16
+ libc.src.__support.math.asinf
+ libc.src.__support.math.asinf16
+ libc.src.__support.math.asinhf
+ libc.src.__support.math.asinhf16
+ libc.src.__support.math.asinpi
+ libc.src.__support.math.asinpif
+ libc.src.__support.math.asinpif16
+ libc.src.__support.math.atan
+ libc.src.__support.math.atan2
+ libc.src.__support.math.atan2f
+ libc.src.__support.math.atan2f128
+ libc.src.__support.math.atan2f16
+ libc.src.__support.math.atanbf16
+ libc.src.__support.math.atanf
+ libc.src.__support.math.atanf16
+ libc.src.__support.math.atanhf
+ libc.src.__support.math.atanhf16
+ libc.src.__support.math.atanpif16
+ libc.src.__support.math.bf16add
+ libc.src.__support.math.bf16addf
+ libc.src.__support.math.bf16addl
+ libc.src.__support.math.bf16addf128
+ libc.src.__support.math.bf16div
+ libc.src.__support.math.bf16divf
+ libc.src.__support.math.bf16divf128
+ libc.src.__support.math.bf16divl
+ libc.src.__support.math.bf16fma
+ libc.src.__support.math.bf16fmaf
+ libc.src.__support.math.bf16fmaf128
+ libc.src.__support.math.bf16fmal
+ libc.src.__support.math.bf16mul
+ libc.src.__support.math.bf16mulf
+ libc.src.__support.math.bf16mulf128
+ libc.src.__support.math.bf16mull
+ libc.src.__support.math.bf16sub
+ libc.src.__support.math.bf16subf
+ libc.src.__support.math.bf16subf128
+ libc.src.__support.math.bf16subl
+ libc.src.__support.math.canonicalize
+ libc.src.__support.math.canonicalizebf16
+ libc.src.__support.math.canonicalizef
+ libc.src.__support.math.canonicalizef128
+ libc.src.__support.math.canonicalizef16
+ libc.src.__support.math.canonicalizel
+ libc.src.__support.math.cbrt
+ libc.src.__support.math.cbrtbf16
+ libc.src.__support.math.cbrtf
+ libc.src.__support.math.cbrtf16
+ libc.src.__support.math.ceil
+ libc.src.__support.math.ceilbf16
+ libc.src.__support.math.ceilf
+ libc.src.__support.math.ceilf128
+ libc.src.__support.math.ceilf16
+ libc.src.__support.math.ceill
+ libc.src.__support.math.copysign
+ libc.src.__support.math.copysignbf16
+ libc.src.__support.math.copysignf
+ libc.src.__support.math.copysignf128
+ libc.src.__support.math.copysignf16
+ libc.src.__support.math.copysignl
+ libc.src.__support.math.cos
+ libc.src.__support.math.cosf
+ libc.src.__support.math.cosf16
+ libc.src.__support.math.coshf
+ libc.src.__support.math.coshf16
+ libc.src.__support.math.cospif
+ libc.src.__support.math.cospif16
+ libc.src.__support.math.daddf128
+ libc.src.__support.math.daddl
+ libc.src.__support.math.ddivf128
+ libc.src.__support.math.ddivl
+ libc.src.__support.math.dfmaf128
+ libc.src.__support.math.dfmal
+ libc.src.__support.math.dmulf128
+ libc.src.__support.math.dmull
+ libc.src.__support.math.dsqrtf128
+ libc.src.__support.math.dsqrtl
+ libc.src.__support.math.dsubf128
+ libc.src.__support.math.dsubl
+ libc.src.__support.math.exp10m1f
+ libc.src.__support.math.exp10m1f16
+ libc.src.__support.math.erfcf16
+ libc.src.__support.math.erff
+ libc.src.__support.math.erff16
+ libc.src.__support.math.exp
+ libc.src.__support.math.exp2
+ libc.src.__support.math.exp2f
+ libc.src.__support.math.exp2f16
+ libc.src.__support.math.exp2m1f
+ libc.src.__support.math.exp2m1f16
+ libc.src.__support.math.expm1
+ libc.src.__support.math.expm1f
+ libc.src.__support.math.expm1f16
+ libc.src.__support.math.exp10
+ libc.src.__support.math.exp10f
+ libc.src.__support.math.exp10f16
+ libc.src.__support.math.expf
+ libc.src.__support.math.expbf16
+ libc.src.__support.math.expf16
+ libc.src.__support.math.f16add
+ libc.src.__support.math.f16addf
+ libc.src.__support.math.f16addf128
+ libc.src.__support.math.f16addl
+ libc.src.__support.math.f16div
+ libc.src.__support.math.f16divf
+ libc.src.__support.math.f16divf128
+ libc.src.__support.math.f16divl
+ libc.src.__support.math.f16fma
+ libc.src.__support.math.f16fmaf
+ libc.src.__support.math.f16fmaf128
+ libc.src.__support.math.f16fmal
+ libc.src.__support.math.f16mul
+ libc.src.__support.math.f16mulf
+ libc.src.__support.math.f16mulf128
+ libc.src.__support.math.f16mull
+ libc.src.__support.math.f16sqrt
+ libc.src.__support.math.f16sqrtf
+ libc.src.__support.math.f16sqrtf128
+ libc.src.__support.math.f16sqrtl
+ libc.src.__support.math.f16sub
+ libc.src.__support.math.f16subf
+ libc.src.__support.math.f16subf128
+ libc.src.__support.math.f16subl
+ libc.src.__support.math.fabs
+ libc.src.__support.math.fabsbf16
+ libc.src.__support.math.fabsf
+ libc.src.__support.math.fabsf128
+ libc.src.__support.math.fabsf16
+ libc.src.__support.math.fabsl
+ libc.src.__support.math.fadd
+ libc.src.__support.math.faddf128
+ libc.src.__support.math.faddl
+ libc.src.__support.math.fdim
+ libc.src.__support.math.fdimbf16
+ libc.src.__support.math.fdimf
+ libc.src.__support.math.fdimf128
+ libc.src.__support.math.fdimf16
+ libc.src.__support.math.fdiml
+ libc.src.__support.math.fdiv
+ libc.src.__support.math.fdivf128
+ libc.src.__support.math.fdivl
+ libc.src.__support.math.ffma
+ libc.src.__support.math.ffmaf128
+ libc.src.__support.math.ffmal
+ libc.src.__support.math.floor
+ libc.src.__support.math.floorbf16
+ libc.src.__support.math.floorf
+ libc.src.__support.math.floorf128
+ libc.src.__support.math.floorf16
+ libc.src.__support.math.floorl
+ libc.src.__support.math.fma
+ libc.src.__support.math.fmaf
+ libc.src.__support.math.fmaf16
+ libc.src.__support.math.fmabf16
+ libc.src.__support.math.fmax
+ libc.src.__support.math.fmaxbf16
+ libc.src.__support.math.fmaxf
+ libc.src.__support.math.fmaxf128
+ libc.src.__support.math.fmaxf16
+ libc.src.__support.math.fmaximum
+ libc.src.__support.math.fmaximum_mag
+ libc.src.__support.math.fmaximum_mag_num
+ libc.src.__support.math.fmaximum_mag_numbf16
+ libc.src.__support.math.fmaximum_mag_numf
+ libc.src.__support.math.fmaximum_mag_numf128
+ libc.src.__support.math.fmaximum_mag_numf16
+ libc.src.__support.math.fmaximum_mag_numl
+ libc.src.__support.math.fmaximum_magbf16
+ libc.src.__support.math.fmaximum_magf
+ libc.src.__support.math.fmaximum_magf128
+ libc.src.__support.math.fmaximum_magf16
+ libc.src.__support.math.fmaximum_magl
+ libc.src.__support.math.fmaximum_num
+ libc.src.__support.math.fmaximum_numbf16
+ libc.src.__support.math.fmaximum_numf
+ libc.src.__support.math.fmaximum_numf128
+ libc.src.__support.math.fmaximum_numf16
+ libc.src.__support.math.fmaximum_numl
+ libc.src.__support.math.fmaximumbf16
+ libc.src.__support.math.fmaximumf
+ libc.src.__support.math.fmaximumf128
+ libc.src.__support.math.fmaximumf16
+ libc.src.__support.math.fmaximuml
+ libc.src.__support.math.fmaxl
+ libc.src.__support.math.fmin
+ libc.src.__support.math.fminbf16
+ libc.src.__support.math.fminf
+ libc.src.__support.math.fminf128
+ libc.src.__support.math.fminf16
+ libc.src.__support.math.fminimum
+ libc.src.__support.math.fminimum_mag
+ libc.src.__support.math.fminimum_mag_num
+ libc.src.__support.math.fminimum_mag_numbf16
+ libc.src.__support.math.fminimum_mag_numf
+ libc.src.__support.math.fminimum_mag_numf128
+ libc.src.__support.math.fminimum_mag_numf16
+ libc.src.__support.math.fminimum_mag_numl
+ libc.src.__support.math.fminimum_magbf16
+ libc.src.__support.math.fminimum_magf
+ libc.src.__support.math.fminimum_magf128
+ libc.src.__support.math.fminimum_magf16
+ libc.src.__support.math.fminimum_magl
+ libc.src.__support.math.fminimum_num
+ libc.src.__support.math.fminimum_numbf16
+ libc.src.__support.math.fminimum_numf
+ libc.src.__support.math.fminimum_numf128
+ libc.src.__support.math.fminimum_numf16
+ libc.src.__support.math.fminimum_numl
+ libc.src.__support.math.fminimumbf16
+ libc.src.__support.math.fminimumf
+ libc.src.__support.math.fminimumf128
+ libc.src.__support.math.fminimumf16
+ libc.src.__support.math.fminimuml
+ libc.src.__support.math.fminl
+ libc.src.__support.math.fmod
+ libc.src.__support.math.fmodbf16
+ libc.src.__support.math.fmodf
+ libc.src.__support.math.fmodf128
+ libc.src.__support.math.fmodf16
+ libc.src.__support.math.fmodl
+ libc.src.__support.math.fmul
+ libc.src.__support.math.fmulf128
+ libc.src.__support.math.fmull
+ libc.src.__support.math.frexp
+ libc.src.__support.math.frexpbf16
+ libc.src.__support.math.frexpf
+ libc.src.__support.math.frexpf128
+ libc.src.__support.math.frexpf16
+ libc.src.__support.math.frexpl
+ libc.src.__support.math.fromfp
+ libc.src.__support.math.fromfpbf16
+ libc.src.__support.math.fromfpf
+ libc.src.__support.math.fromfpf128
+ libc.src.__support.math.fromfpf16
+ libc.src.__support.math.fromfpl
+ libc.src.__support.math.fromfpx
+ libc.src.__support.math.fromfpxbf16
+ libc.src.__support.math.fromfpxf
+ libc.src.__support.math.fromfpxf128
+ libc.src.__support.math.fromfpxf16
+ libc.src.__support.math.fromfpxl
+ libc.src.__support.math.fsqrt
+ libc.src.__support.math.fsqrtf128
+ libc.src.__support.math.fsqrtl
+ libc.src.__support.math.fsub
+ libc.src.__support.math.fsubf128
+ libc.src.__support.math.fsubl
+ libc.src.__support.math.getpayload
+ libc.src.__support.math.getpayloadbf16
+ libc.src.__support.math.getpayloadf
+ libc.src.__support.math.getpayloadf128
+ libc.src.__support.math.getpayloadf16
+ libc.src.__support.math.getpayloadl
+ libc.src.__support.math.hypot
+ libc.src.__support.math.hypotf
+ libc.src.__support.math.hypotbf16
+ libc.src.__support.math.hypotf16
+ libc.src.__support.math.ilogb
+ libc.src.__support.math.ilogbbf16
+ libc.src.__support.math.ilogbf
+ libc.src.__support.math.ilogbf16
+ libc.src.__support.math.ilogbf128
+ libc.src.__support.math.ilogbl
+ libc.src.__support.math.iscanonical
+ libc.src.__support.math.iscanonicalbf16
+ libc.src.__support.math.iscanonicalf
+ libc.src.__support.math.iscanonicalf128
+ libc.src.__support.math.iscanonicalf16
+ libc.src.__support.math.iscanonicall
+ libc.src.__support.math.isnan
+ libc.src.__support.math.isnanf
+ libc.src.__support.math.isnanf128
+ libc.src.__support.math.isnanf16
+ libc.src.__support.math.isnanl
+ libc.src.__support.math.issignaling
+ libc.src.__support.math.issignalingbf16
+ libc.src.__support.math.issignalingf
+ libc.src.__support.math.issignalingf128
+ libc.src.__support.math.issignalingf16
+ libc.src.__support.math.issignalingl
+ libc.src.__support.math.ldexp
+ libc.src.__support.math.ldexpbf16
+ libc.src.__support.math.ldexpf
+ libc.src.__support.math.ldexpl
+ libc.src.__support.math.llogb
+ libc.src.__support.math.llogbbf16
+ libc.src.__support.math.llrint
+ libc.src.__support.math.llrintbf16
+ libc.src.__support.math.llrintf
+ libc.src.__support.math.llrintf128
+ libc.src.__support.math.llrintf16
+ libc.src.__support.math.llrintl
+ libc.src.__support.math.llround
+ libc.src.__support.math.llroundbf16
+ libc.src.__support.math.llroundf
+ libc.src.__support.math.llroundf128
+ libc.src.__support.math.llroundf16
+ libc.src.__support.math.llroundl
+ libc.src.__support.math.log
+ libc.src.__support.math.log10
+ libc.src.__support.math.log10f16
+ libc.src.__support.math.log10p1f16
+ libc.src.__support.math.log10f
+ libc.src.__support.math.log1p
+ libc.src.__support.math.log1pf
+ libc.src.__support.math.log2
+ libc.src.__support.math.logb
+ libc.src.__support.math.log2f
+ libc.src.__support.math.log2f16
+ libc.src.__support.math.log2p1f16
+ libc.src.__support.math.logbf
+ libc.src.__support.math.logbbf16
+ libc.src.__support.math.logbf128
+ libc.src.__support.math.logbf16
+ libc.src.__support.math.logf
+ libc.src.__support.math.log_bf16
+ libc.src.__support.math.ldexpf
+ libc.src.__support.math.ldexpf128
+ libc.src.__support.math.ldexpf16
+ libc.src.__support.math.lgammaf16
+ libc.src.__support.math.llogbf
+ libc.src.__support.math.llogbf128
+ libc.src.__support.math.llogbf16
+ libc.src.__support.math.logbl
+ libc.src.__support.math.logf16
+ libc.src.__support.math.llogbl
+ libc.src.__support.math.lrint
+ libc.src.__support.math.lrintbf16
+ libc.src.__support.math.lrintf
+ libc.src.__support.math.lrintf128
+ libc.src.__support.math.lrintf16
+ libc.src.__support.math.lrintl
+ libc.src.__support.math.lround
+ libc.src.__support.math.lroundbf16
+ libc.src.__support.math.lroundf
+ libc.src.__support.math.lroundf128
+ libc.src.__support.math.lroundf16
+ libc.src.__support.math.lroundl
+ libc.src.__support.math.modf
+ libc.src.__support.math.modfbf16
+ libc.src.__support.math.modff
+ libc.src.__support.math.modff128
+ libc.src.__support.math.modff16
+ libc.src.__support.math.modfl
+ libc.src.__support.math.nan
+ libc.src.__support.math.nanbf16
+ libc.src.__support.math.nanf
+ libc.src.__support.math.nanf128
+ libc.src.__support.math.nanf16
+ libc.src.__support.math.nanl
+ libc.src.__support.math.nearbyint
+ libc.src.__support.math.nearbyintbf16
+ libc.src.__support.math.nearbyintf
+ libc.src.__support.math.nearbyintf128
+ libc.src.__support.math.nearbyintf16
+ libc.src.__support.math.nearbyintl
+ libc.src.__support.math.nextdown
+ libc.src.__support.math.nextdownbf16
+ libc.src.__support.math.nextdownf
+ libc.src.__support.math.nextdownf128
+ libc.src.__support.math.nextdownf16
+ libc.src.__support.math.nextdownl
+ libc.src.__support.math.nextup
+ libc.src.__support.math.nextupbf16
+ libc.src.__support.math.nextupf
+ libc.src.__support.math.nextupf128
+ libc.src.__support.math.nextupf16
+ libc.src.__support.math.nextupl
+ libc.src.__support.math.nexttoward
+ libc.src.__support.math.nexttowardbf16
+ libc.src.__support.math.nexttowardf
+ libc.src.__support.math.nexttowardf16
+ libc.src.__support.math.nexttowardl
+ libc.src.__support.math.nextafter
+ libc.src.__support.math.nextafterbf16
+ libc.src.__support.math.nextafterf
+ libc.src.__support.math.nextafterf16
+ libc.src.__support.math.nextafterl
+ libc.src.__support.math.nextafterf128
+ libc.src.__support.math.pow
+ libc.src.__support.math.powf
+ libc.src.__support.math.remainder
+ libc.src.__support.math.remainderbf16
+ libc.src.__support.math.remainderf
+ libc.src.__support.math.remainderf128
+ libc.src.__support.math.remainderf16
+ libc.src.__support.math.remainderl
+ libc.src.__support.math.remquo
+ libc.src.__support.math.remquobf16
+ libc.src.__support.math.remquof
+ libc.src.__support.math.remquof128
+ libc.src.__support.math.remquof16
+ libc.src.__support.math.remquol
+ libc.src.__support.math.rint
+ libc.src.__support.math.rintbf16
+ libc.src.__support.math.rintf
+ libc.src.__support.math.rintf128
+ libc.src.__support.math.rintf16
+ libc.src.__support.math.rintl
+ libc.src.__support.math.round
+ libc.src.__support.math.roundbf16
+ libc.src.__support.math.roundeven
+ libc.src.__support.math.roundevenbf16
+ libc.src.__support.math.roundevenf
+ libc.src.__support.math.roundevenf128
+ libc.src.__support.math.roundevenf16
+ libc.src.__support.math.roundevenl
+ libc.src.__support.math.roundf
+ libc.src.__support.math.roundf128
+ libc.src.__support.math.roundf16
+ libc.src.__support.math.roundl
+ libc.src.__support.math.rsqrtf
+ libc.src.__support.math.rsqrtf16
+ libc.src.__support.math.scalbln
+ libc.src.__support.math.scalblnbf16
+ libc.src.__support.math.scalblnf
+ libc.src.__support.math.scalblnf128
+ libc.src.__support.math.scalblnf16
+ libc.src.__support.math.scalblnl
+ libc.src.__support.math.scalbn
+ libc.src.__support.math.scalbnbf16
+ libc.src.__support.math.scalbnf
+ libc.src.__support.math.scalbnf128
+ libc.src.__support.math.scalbnf16
+ libc.src.__support.math.scalbnl
+ libc.src.__support.math.setpayload
+ libc.src.__support.math.setpayloadbf16
+ libc.src.__support.math.setpayloadf
+ libc.src.__support.math.setpayloadf128
+ libc.src.__support.math.setpayloadf16
+ libc.src.__support.math.setpayloadl
+ libc.src.__support.math.setpayloadsig
+ libc.src.__support.math.setpayloadsigbf16
+ libc.src.__support.math.setpayloadsigf
+ libc.src.__support.math.setpayloadsigf128
+ libc.src.__support.math.setpayloadsigf16
+ libc.src.__support.math.setpayloadsigl
+ libc.src.__support.math.sqrtf16
+ libc.src.__support.math.sin
+ libc.src.__support.math.sincos
+ libc.src.__support.math.sincosf
+ libc.src.__support.math.sinf
+ libc.src.__support.math.sinf16
+ libc.src.__support.math.sinhf
+ libc.src.__support.math.sinhf16
+ libc.src.__support.math.sqrtf128
+ libc.src.__support.math.sinpif
+ libc.src.__support.math.sinpif16
+ libc.src.__support.math.sqrt
+ libc.src.__support.math.sqrtbf16
+ libc.src.__support.math.sqrtf
+ libc.src.__support.math.sqrtl
+ libc.src.__support.math.tan
+ libc.src.__support.math.tanbf16
+ libc.src.__support.math.tanf
+ libc.src.__support.math.tanf16
+ libc.src.__support.math.tanhf
+ libc.src.__support.math.tanhf16
+ libc.src.__support.math.tanpif
+ libc.src.__support.math.tanpif16
+ libc.src.__support.math.trunc
+ libc.src.__support.math.truncbf16
+ libc.src.__support.math.truncf
+ libc.src.__support.math.truncf128
+ libc.src.__support.math.truncf16
+ libc.src.__support.math.truncl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
+ libc.src.__support.math.totalorder
+ libc.src.__support.math.totalorderbf16
+ libc.src.__support.math.totalorderf
+ libc.src.__support.math.totalorderf128
+ libc.src.__support.math.totalorderf16
+ libc.src.__support.math.totalorderl
+ libc.src.__support.math.totalordermag
+ libc.src.__support.math.totalordermagbf16
+ libc.src.__support.math.totalordermagf
+ libc.src.__support.math.totalordermagf128
+ libc.src.__support.math.totalordermagf16
+ libc.src.__support.math.totalordermagl
+)
add_fp_unittest(
shared_math_constexpr_test
>From 9ca511d2a582fb10ce87ea92c6a5834c750bea78 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Mon, 29 Jun 2026 16:35:44 +0530
Subject: [PATCH 04/41] cmake edits
---
libc/src/__support/math/CMakeLists.txt | 2 +-
libc/src/__support/math/ceilf128.h | 3 +++
libc/src/math/generic/CMakeLists.txt | 1 +
libc/test/src/math/CMakeLists.txt | 1 +
libc/test/src/math/smoke/CMakeLists.txt | 1 +
libc/test/src/math/smoke/ceilf128_test.cpp | 5 ++++-
6 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 7945c12e388a7..db514db61a9df 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -813,7 +813,7 @@ add_header_library(
HDRS
ceilf128.h
DEPENDS
- libc.include.llvm-libc-types.float128
+ libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.nearest_integer_operations
libc.src.__support.macros.config
)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index 0361251b664a9..d8d82970df7e7 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -11,7 +11,10 @@
#include "src/__support/FPUtil/NearestIntegerOperations.h"
#include "src/__support/macros/config.h"
+#include "src/__support/FPUtil/float128.h"
+using LIBC_NAMESPACE::fputil::Float128;
+c
namespace LIBC_NAMESPACE_DECL {
namespace math {
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 1a81f84db853d..d25a4a579f26b 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -162,6 +162,7 @@ add_entrypoint_object(
../ceilf128.h
DEPENDS
libc.src.__support.math.ceilf128
+ libc.src.__support.FPUtil.float128
)
add_entrypoint_object(
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 850cf31e8f44f..fbbbf67774d36 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -435,6 +435,7 @@ add_fp_unittest(
libc.src.math.ceilf128
libc.src.__support.CPP.algorithm
libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.float128
)
add_fp_unittest(
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index a42a6e70f773f..91d76f2c7973c 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -616,6 +616,7 @@ add_fp_unittest(
CeilTest.h
DEPENDS
libc.src.math.ceilf128
+ libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.fp_bits
)
diff --git a/libc/test/src/math/smoke/ceilf128_test.cpp b/libc/test/src/math/smoke/ceilf128_test.cpp
index f0da8258f79bc..e01221f4ac6cd 100644
--- a/libc/test/src/math/smoke/ceilf128_test.cpp
+++ b/libc/test/src/math/smoke/ceilf128_test.cpp
@@ -9,5 +9,8 @@
#include "CeilTest.h"
#include "src/math/ceilf128.h"
+#include "src/__support/FPUtil/float128.h"
-LIST_CEIL_TESTS(float128, LIBC_NAMESPACE::ceilf128)
+using LIBC_NAMESPACE::fputil::Float128;
+
+LIST_CEIL_TESTS(Float128, LIBC_NAMESPACE::ceilf128)
>From 227cd83fd2ccc3179d3dc5e145dacd69d4f05dfd Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Mon, 29 Jun 2026 16:41:00 +0530
Subject: [PATCH 05/41] nits
---
libc/src/__support/math/ceilf128.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index d8d82970df7e7..f12fc6a11a07c 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -14,7 +14,7 @@
#include "src/__support/FPUtil/float128.h"
using LIBC_NAMESPACE::fputil::Float128;
-c
+
namespace LIBC_NAMESPACE_DECL {
namespace math {
>From ba97f7cfd26590c459c67468a2df0c0031af1564 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 11:17:21 +0530
Subject: [PATCH 06/41] test mpfr
---
libc/utils/MPFRWrapper/CMakeLists.txt | 120 +++++++++++++-------------
libc/utils/MPFRWrapper/MPCommon.cpp | 7 ++
libc/utils/MPFRWrapper/MPCommon.h | 9 +-
3 files changed, 76 insertions(+), 60 deletions(-)
diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index 73151c61a7fcc..a1324e9af33c9 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -1,59 +1,61 @@
-if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
- add_library(libcMPCommon STATIC
- MPCommon.cpp
- MPCommon.h
- mpfr_inc.h
- )
- _get_common_test_compile_options(compile_options "" "")
- # mpfr/gmp headers do not work with -ffreestanding flag.
- list(REMOVE_ITEM compile_options "-ffreestanding")
- target_compile_options(libcMPCommon PRIVATE -O3 ${compile_options})
- add_dependencies(
- libcMPCommon
- libc.hdr.stdint_proxy
- libc.src.__support.CPP.string
- libc.src.__support.CPP.string_view
- libc.src.__support.CPP.type_traits
- libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.cast
- libc.src.__support.FPUtil.fp_bits
- )
- if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
- target_include_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
- target_link_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
- endif()
- target_include_directories(libcMPCommon PUBLIC ${LIBC_SOURCE_DIR})
- target_link_libraries(libcMPCommon PUBLIC LibcFPTestHelpers.unit mpfr gmp)
-elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
- message(WARNING "Math tests using MPFR will be skipped.")
-endif()
-
-if(LIBC_TESTS_CAN_USE_MPFR)
- add_library(libcMPFRWrapper STATIC
- MPFRUtils.cpp
- MPFRUtils.h
- )
- _get_common_test_compile_options(compile_options "" "")
- # mpfr/gmp headers do not work with -ffreestanding flag.
- list(REMOVE_ITEM compile_options "-ffreestanding")
- target_compile_options(libcMPFRWrapper PRIVATE ${libc_opt_high_flag} ${compile_options})
- add_dependencies(
- libcMPFRWrapper
- libcMPCommon
- libc.hdr.stdint_proxy
- libc.src.__support.CPP.array
- libc.src.__support.CPP.stringstream
- libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.fp_bits
- libc.src.__support.FPUtil.fpbits_str
- LibcTest.unit
- )
- if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
- target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
- target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
- endif()
- target_include_directories(libcMPFRWrapper PUBLIC ${LIBC_SOURCE_DIR})
- target_link_libraries(libcMPFRWrapper PUBLIC libcMPCommon LibcFPTestHelpers.unit LibcTest.unit)
-elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
- message(WARNING "Math tests using MPFR will be skipped.")
-endif()
+if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
+ add_library(libcMPCommon STATIC
+ MPCommon.cpp
+ MPCommon.h
+ mpfr_inc.h
+ )
+ _get_common_test_compile_options(compile_options "" "")
+ # mpfr/gmp headers do not work with -ffreestanding flag.
+ list(REMOVE_ITEM compile_options "-ffreestanding")
+ target_compile_options(libcMPCommon PRIVATE -O3 ${compile_options})
+ add_dependencies(
+ libcMPCommon
+ libc.hdr.stdint_proxy
+ libc.src.__support.CPP.string
+ libc.src.__support.CPP.string_view
+ libc.src.__support.CPP.type_traits
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.cast
+ libc.src.__support.FPUtil.fp_bits
+ )
+ if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
+ target_include_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
+ target_link_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
+ endif()
+ target_include_directories(libcMPCommon PUBLIC ${LIBC_SOURCE_DIR})
+ target_link_libraries(libcMPCommon PUBLIC LibcFPTestHelpers.unit mpfr gmp)
+elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
+ message(WARNING "Math tests using MPFR will be skipped.")
+endif()
+
+if(LIBC_TESTS_CAN_USE_MPFR)
+ add_library(libcMPFRWrapper STATIC
+ MPFRUtils.cpp
+ MPFRUtils.h
+ )
+ _get_common_test_compile_options(compile_options "" "")
+ # mpfr/gmp headers do not work with -ffreestanding flag.
+ list(REMOVE_ITEM compile_options "-ffreestanding")
+ target_compile_options(libcMPFRWrapper PRIVATE ${libc_opt_high_flag} ${compile_options})
+ add_dependencies(
+ libcMPFRWrapper
+ libcMPCommon
+ libc.hdr.stdint_proxy
+ libc.src.__support.CPP.array
+ libc.src.__support.CPP.stringstream
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fpbits_str
+ LibcTest.unit
+ )
+ if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
+ target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
+ target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
+ endif()
+ target_include_directories(libcMPFRWrapper PUBLIC ${LIBC_SOURCE_DIR})
+ target_link_libraries(libcMPFRWrapper PUBLIC libcMPCommon LibcFPTestHelpers.unit LibcTest.unit)
+elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
+ message(WARNING "Math tests using MPFR will be skipped.")
+endif()
diff --git a/libc/utils/MPFRWrapper/MPCommon.cpp b/libc/utils/MPFRWrapper/MPCommon.cpp
index 2422bcf45222f..8546aef2a2ff5 100644
--- a/libc/utils/MPFRWrapper/MPCommon.cpp
+++ b/libc/utils/MPFRWrapper/MPCommon.cpp
@@ -13,6 +13,9 @@
#include "src/__support/FPUtil/cast.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace testing {
@@ -650,6 +653,10 @@ template <> bfloat16 MPFRNumber::as<bfloat16>() const {
return fputil::cast<bfloat16>(mpfr_get_flt(value, mpfr_rounding));
}
+template <> Float128 MPFRNumber::as<Float128>() const {
+ return fputil::cast<Float128>(mpfr_get_flt(value, mpfr_rounding));
+}
+
} // namespace mpfr
} // namespace testing
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 38fd15fcc956c..518144fd9160a 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -16,6 +16,9 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
#include "test/UnitTest/RoundingModeUtils.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
#include "mpfr_inc.h"
@@ -69,6 +72,10 @@ template <> struct ExtraPrecision<bfloat16> {
static constexpr unsigned int VALUE = 64;
};
+template <> struct ExtraPrecision<Float128> {
+ static constexpr unsigned int VALUE = VALUE = 512;
+}
+
// If the ulp tolerance is less than or equal to 0.5, we would check that the
// result is rounded correctly with respect to the rounding mode by using the
// same precision as the inputs.
@@ -116,7 +123,7 @@ class MPFRNumber {
#ifdef LIBC_TYPES_HAS_FLOAT16
|| cpp::is_same_v<float16, XType>
#endif
- || cpp::is_same_v<bfloat16, XType>,
+ || cpp::is_same_v<bfloat16, XType> || cpp:::is_same<Float128,XType>,
int> = 0>
explicit MPFRNumber(XType x,
unsigned int precision = ExtraPrecision<XType>::VALUE,
>From 7902a26aa31a28fd3db9020868880538afb86710 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 11:23:07 +0530
Subject: [PATCH 07/41] shared_math_constexpr update
---
libc/test/shared/CMakeLists.txt | 599 +++++++++---------
.../shared/shared_math_constexpr_test.cpp | 9 +-
2 files changed, 308 insertions(+), 300 deletions(-)
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 6e667f4feec71..48e16e353d45b 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -521,305 +521,306 @@ add_fp_unittest(
libc.src.__support.math.totalordermagl
)
- add_fp_unittest(
- shared_math_constexpr_test
- SUITE
- libc-shared-tests
- SRCS
- shared_math_constexpr_test.cpp
- DEPENDS
- libc.src.__support.math.asinbf16
- libc.src.__support.math.bf16subl
- libc.src.__support.math.canonicalize
- libc.src.__support.math.canonicalizebf16
- libc.src.__support.math.canonicalizef
- libc.src.__support.math.canonicalizef128
- libc.src.__support.math.canonicalizef16
- libc.src.__support.math.canonicalizel
- libc.src.__support.math.ceil
- libc.src.__support.math.ceilbf16
- libc.src.__support.math.ceilf
- libc.src.__support.math.ceilf128
- libc.src.__support.math.ceilf16
- libc.src.__support.math.ceill
- libc.src.__support.math.copysign
- libc.src.__support.math.copysignbf16
- libc.src.__support.math.copysignf
- libc.src.__support.math.copysignf128
- libc.src.__support.math.copysignf16
- libc.src.__support.math.copysignl
- libc.src.__support.math.ddivf128
- libc.src.__support.math.ddivl
- libc.src.__support.math.dmulf128
- libc.src.__support.math.dmull
- libc.src.__support.math.dsqrtf128
- libc.src.__support.math.f16add
- libc.src.__support.math.f16addf
- libc.src.__support.math.f16addf128
- libc.src.__support.math.f16addl
- libc.src.__support.math.fadd
- libc.src.__support.math.faddf128
- libc.src.__support.math.faddl
- libc.src.__support.math.fdim
- libc.src.__support.math.fdimbf16
- libc.src.__support.math.fdimf
- libc.src.__support.math.fdimf128
- libc.src.__support.math.fdimf16
- libc.src.__support.math.fdiml
- libc.src.__support.math.fdiv
- libc.src.__support.math.fdivf128
- libc.src.__support.math.fdivl
- libc.src.__support.math.floor
- libc.src.__support.math.floorbf16
- libc.src.__support.math.floorf
- libc.src.__support.math.floorf128
- libc.src.__support.math.floorf16
- libc.src.__support.math.floorl
- libc.src.__support.math.fabs
- libc.src.__support.math.fabsbf16
- libc.src.__support.math.fabsf
- libc.src.__support.math.fabsf128
- libc.src.__support.math.fabsf16
- libc.src.__support.math.fabsl
- libc.src.__support.math.fmaximum
- libc.src.__support.math.fmaximum_mag
- libc.src.__support.math.fmaximum_mag_num
- libc.src.__support.math.fmaximum_mag_numbf16
- libc.src.__support.math.fmaximum_mag_numf
- libc.src.__support.math.fmaximum_mag_numf128
- libc.src.__support.math.fmaximum_mag_numf16
- libc.src.__support.math.fmaximum_mag_numl
- libc.src.__support.math.fmaximum_magbf16
- libc.src.__support.math.fmaximum_magf
- libc.src.__support.math.fmaximum_magf128
- libc.src.__support.math.fmaximum_magf16
- libc.src.__support.math.fmaximum_magl
- libc.src.__support.math.fmaximum_num
- libc.src.__support.math.fmaximum_numbf16
- libc.src.__support.math.fmaximum_numf
- libc.src.__support.math.fmaximum_numf128
- libc.src.__support.math.fmaximum_numf16
- libc.src.__support.math.fmaximum_numl
- libc.src.__support.math.fmaximumbf16
- libc.src.__support.math.fmaximumf
- libc.src.__support.math.fmaximumf128
- libc.src.__support.math.fmaximumf16
- libc.src.__support.math.fmaximuml
- libc.src.__support.math.fmin
- libc.src.__support.math.fminbf16
- libc.src.__support.math.fminf
- libc.src.__support.math.fminf128
- libc.src.__support.math.fminf16
- libc.src.__support.math.fminimum
- libc.src.__support.math.fminimum_mag
- libc.src.__support.math.fminimum_mag_num
- libc.src.__support.math.fminimum_mag_numbf16
- libc.src.__support.math.fminimum_mag_numf
- libc.src.__support.math.fminimum_mag_numf128
- libc.src.__support.math.fminimum_mag_numf16
- libc.src.__support.math.fminimum_mag_numl
- libc.src.__support.math.fminimum_magbf16
- libc.src.__support.math.fminimum_magf
- libc.src.__support.math.fminimum_magf128
- libc.src.__support.math.fminimum_magf16
- libc.src.__support.math.fminimum_magl
- libc.src.__support.math.fminimum_num
- libc.src.__support.math.fminimum_numbf16
- libc.src.__support.math.fminimum_numf
- libc.src.__support.math.fminimum_numf128
- libc.src.__support.math.fminimum_numf16
- libc.src.__support.math.fminimum_numl
- libc.src.__support.math.fminimumbf16
- libc.src.__support.math.fminimumf
- libc.src.__support.math.fminimumf128
- libc.src.__support.math.fminimumf16
- libc.src.__support.math.fminimuml
- libc.src.__support.math.fminl
- libc.src.__support.math.fmod
- libc.src.__support.math.fmodbf16
- libc.src.__support.math.fmodf
- libc.src.__support.math.fmodf128
- libc.src.__support.math.fmodf16
- libc.src.__support.math.fmodl
- libc.src.__support.math.fmul
- libc.src.__support.math.fmulf128
- libc.src.__support.math.fmull
- libc.src.__support.math.frexp
- libc.src.__support.math.frexpbf16
- libc.src.__support.math.frexpl
- libc.src.__support.math.fromfp
- libc.src.__support.math.fromfpbf16
- libc.src.__support.math.fromfpf
- libc.src.__support.math.fromfpf128
- libc.src.__support.math.fromfpf16
- libc.src.__support.math.fromfpl
- libc.src.__support.math.fromfpx
- libc.src.__support.math.fromfpxbf16
- libc.src.__support.math.fromfpxf
- libc.src.__support.math.fromfpxf128
- libc.src.__support.math.fromfpxf16
- libc.src.__support.math.fromfpxl
- libc.src.__support.math.fsub
- libc.src.__support.math.fsubf128
- libc.src.__support.math.fsubl
- libc.src.__support.math.getpayload
- libc.src.__support.math.getpayloadbf16
- libc.src.__support.math.getpayloadf
- libc.src.__support.math.getpayloadf128
- libc.src.__support.math.getpayloadf16
- libc.src.__support.math.getpayloadl
- libc.src.__support.math.iscanonical
- libc.src.__support.math.iscanonicalbf16
- libc.src.__support.math.iscanonicalf
- libc.src.__support.math.iscanonicalf128
- libc.src.__support.math.iscanonicalf16
- libc.src.__support.math.iscanonicall
- libc.src.__support.math.isnan
- libc.src.__support.math.isnanf
- libc.src.__support.math.isnanf128
- libc.src.__support.math.isnanf16
- libc.src.__support.math.isnanl
- libc.src.__support.math.issignaling
- libc.src.__support.math.issignalingbf16
- libc.src.__support.math.issignalingf
- libc.src.__support.math.issignalingf128
- libc.src.__support.math.issignalingf16
- libc.src.__support.math.issignalingl
- libc.src.__support.math.ldexp
- libc.src.__support.math.ldexpbf16
- libc.src.__support.math.ldexpl
- libc.src.__support.math.llogbbf16
- libc.src.__support.math.llrint
- libc.src.__support.math.llrintbf16
- libc.src.__support.math.llrintf
- libc.src.__support.math.llrintf128
- libc.src.__support.math.llrintf16
- libc.src.__support.math.llrintl
- libc.src.__support.math.llround
- libc.src.__support.math.llroundbf16
- libc.src.__support.math.llroundf
- libc.src.__support.math.llroundf128
- libc.src.__support.math.llroundf16
- libc.src.__support.math.llroundl
- libc.src.__support.math.log
- libc.src.__support.math.logbbf16
- libc.src.__support.math.ilogbbf16
- libc.src.__support.math.lrint
- libc.src.__support.math.lrintbf16
- libc.src.__support.math.lrintf
- libc.src.__support.math.lrintf128
- libc.src.__support.math.lrintf16
- libc.src.__support.math.lrintl
- libc.src.__support.math.lround
- libc.src.__support.math.lroundbf16
- libc.src.__support.math.lroundf
- libc.src.__support.math.lroundf128
- libc.src.__support.math.lroundf16
- libc.src.__support.math.lroundl
- libc.src.__support.math.modf
- libc.src.__support.math.modfbf16
- libc.src.__support.math.modff
- libc.src.__support.math.modff128
- libc.src.__support.math.modff16
- libc.src.__support.math.modfl
- libc.src.__support.math.nan
- libc.src.__support.math.nanbf16
- libc.src.__support.math.nanf
- libc.src.__support.math.nanf128
- libc.src.__support.math.nanf16
- libc.src.__support.math.nanl
- libc.src.__support.math.nearbyint
- libc.src.__support.math.nearbyintbf16
- libc.src.__support.math.nearbyintf
- libc.src.__support.math.nearbyintf128
- libc.src.__support.math.nearbyintf16
- libc.src.__support.math.nearbyintl
- libc.src.__support.math.nextafter
- libc.src.__support.math.nextafterbf16
- libc.src.__support.math.nextafterf
- libc.src.__support.math.nextafterf16
- libc.src.__support.math.nextafterl
- libc.src.__support.math.nextafterf128
- libc.src.__support.math.remainder
- libc.src.__support.math.remainderbf16
- libc.src.__support.math.remainderf
- libc.src.__support.math.remainderf128
- libc.src.__support.math.remainderf16
- libc.src.__support.math.remainderl
- libc.src.__support.math.remquo
- libc.src.__support.math.remquobf16
- libc.src.__support.math.remquof
- libc.src.__support.math.remquof128
- libc.src.__support.math.remquof16
- libc.src.__support.math.remquol
- libc.src.__support.math.rint
- libc.src.__support.math.rintbf16
- libc.src.__support.math.rintf
- libc.src.__support.math.rintf128
- libc.src.__support.math.rintf16
- libc.src.__support.math.rintl
- libc.src.__support.math.round
- libc.src.__support.math.roundbf16
- libc.src.__support.math.roundeven
- libc.src.__support.math.roundevenbf16
- libc.src.__support.math.roundevenf
- libc.src.__support.math.roundevenf128
- libc.src.__support.math.roundevenf16
- libc.src.__support.math.roundevenl
- libc.src.__support.math.roundf
- libc.src.__support.math.roundf128
- libc.src.__support.math.roundf16
- libc.src.__support.math.roundl
- libc.src.__support.math.scalbln
- libc.src.__support.math.scalblnbf16
- libc.src.__support.math.scalblnf
- libc.src.__support.math.scalblnf128
- libc.src.__support.math.scalblnf16
- libc.src.__support.math.scalblnl
- libc.src.__support.math.scalbn
- libc.src.__support.math.scalbnbf16
- libc.src.__support.math.scalbnf
- libc.src.__support.math.scalbnf128
- libc.src.__support.math.scalbnf16
- libc.src.__support.math.scalbnl
- libc.src.__support.math.setpayload
- libc.src.__support.math.setpayloadbf16
- libc.src.__support.math.setpayloadf
- libc.src.__support.math.setpayloadf128
- libc.src.__support.math.setpayloadf16
- libc.src.__support.math.setpayloadl
- libc.src.__support.math.sqrtl
- libc.src.__support.math.trunc
- libc.src.__support.math.truncbf16
- libc.src.__support.math.truncf
- libc.src.__support.math.truncf128
- libc.src.__support.math.truncf16
- libc.src.__support.math.truncl
- libc.src.__support.math.ufromfp
- libc.src.__support.math.ufromfpbf16
- libc.src.__support.math.ufromfpf
- libc.src.__support.math.ufromfpf128
- libc.src.__support.math.ufromfpf16
- libc.src.__support.math.ufromfpl
- libc.src.__support.math.ufromfpx
- libc.src.__support.math.ufromfpxbf16
- libc.src.__support.math.ufromfpxf
- libc.src.__support.math.ufromfpxf128
- libc.src.__support.math.ufromfpxf16
- libc.src.__support.math.ufromfpxl
- libc.src.__support.math.totalorder
- libc.src.__support.math.totalorderbf16
- libc.src.__support.math.totalorderf
- libc.src.__support.math.totalorderf128
- libc.src.__support.math.totalorderf16
- libc.src.__support.math.totalorderl
- libc.src.__support.math.totalordermag
- libc.src.__support.math.totalordermagbf16
- libc.src.__support.math.totalordermagf
- libc.src.__support.math.totalordermagf128
- libc.src.__support.math.totalordermagf16
- libc.src.__support.math.totalordermagl
- )
+add_fp_unittest(
+ shared_math_constexpr_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_math_constexpr_test.cpp
+ DEPENDS
+ libc.src.__support.math.asinbf16
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.math.bf16subl
+ libc.src.__support.math.canonicalize
+ libc.src.__support.math.canonicalizebf16
+ libc.src.__support.math.canonicalizef
+ libc.src.__support.math.canonicalizef128
+ libc.src.__support.math.canonicalizef16
+ libc.src.__support.math.canonicalizel
+ libc.src.__support.math.ceil
+ libc.src.__support.math.ceilbf16
+ libc.src.__support.math.ceilf
+ libc.src.__support.math.ceilf128
+ libc.src.__support.math.ceilf16
+ libc.src.__support.math.ceill
+ libc.src.__support.math.copysign
+ libc.src.__support.math.copysignbf16
+ libc.src.__support.math.copysignf
+ libc.src.__support.math.copysignf128
+ libc.src.__support.math.copysignf16
+ libc.src.__support.math.copysignl
+ libc.src.__support.math.ddivf128
+ libc.src.__support.math.ddivl
+ libc.src.__support.math.dmulf128
+ libc.src.__support.math.dmull
+ libc.src.__support.math.dsqrtf128
+ libc.src.__support.math.f16add
+ libc.src.__support.math.f16addf
+ libc.src.__support.math.f16addf128
+ libc.src.__support.math.f16addl
+ libc.src.__support.math.fadd
+ libc.src.__support.math.faddf128
+ libc.src.__support.math.faddl
+ libc.src.__support.math.fdim
+ libc.src.__support.math.fdimbf16
+ libc.src.__support.math.fdimf
+ libc.src.__support.math.fdimf128
+ libc.src.__support.math.fdimf16
+ libc.src.__support.math.fdiml
+ libc.src.__support.math.fdiv
+ libc.src.__support.math.fdivf128
+ libc.src.__support.math.fdivl
+ libc.src.__support.math.floor
+ libc.src.__support.math.floorbf16
+ libc.src.__support.math.floorf
+ libc.src.__support.math.floorf128
+ libc.src.__support.math.floorf16
+ libc.src.__support.math.floorl
+ libc.src.__support.math.fabs
+ libc.src.__support.math.fabsbf16
+ libc.src.__support.math.fabsf
+ libc.src.__support.math.fabsf128
+ libc.src.__support.math.fabsf16
+ libc.src.__support.math.fabsl
+ libc.src.__support.math.fmaximum
+ libc.src.__support.math.fmaximum_mag
+ libc.src.__support.math.fmaximum_mag_num
+ libc.src.__support.math.fmaximum_mag_numbf16
+ libc.src.__support.math.fmaximum_mag_numf
+ libc.src.__support.math.fmaximum_mag_numf128
+ libc.src.__support.math.fmaximum_mag_numf16
+ libc.src.__support.math.fmaximum_mag_numl
+ libc.src.__support.math.fmaximum_magbf16
+ libc.src.__support.math.fmaximum_magf
+ libc.src.__support.math.fmaximum_magf128
+ libc.src.__support.math.fmaximum_magf16
+ libc.src.__support.math.fmaximum_magl
+ libc.src.__support.math.fmaximum_num
+ libc.src.__support.math.fmaximum_numbf16
+ libc.src.__support.math.fmaximum_numf
+ libc.src.__support.math.fmaximum_numf128
+ libc.src.__support.math.fmaximum_numf16
+ libc.src.__support.math.fmaximum_numl
+ libc.src.__support.math.fmaximumbf16
+ libc.src.__support.math.fmaximumf
+ libc.src.__support.math.fmaximumf128
+ libc.src.__support.math.fmaximumf16
+ libc.src.__support.math.fmaximuml
+ libc.src.__support.math.fmin
+ libc.src.__support.math.fminbf16
+ libc.src.__support.math.fminf
+ libc.src.__support.math.fminf128
+ libc.src.__support.math.fminf16
+ libc.src.__support.math.fminimum
+ libc.src.__support.math.fminimum_mag
+ libc.src.__support.math.fminimum_mag_num
+ libc.src.__support.math.fminimum_mag_numbf16
+ libc.src.__support.math.fminimum_mag_numf
+ libc.src.__support.math.fminimum_mag_numf128
+ libc.src.__support.math.fminimum_mag_numf16
+ libc.src.__support.math.fminimum_mag_numl
+ libc.src.__support.math.fminimum_magbf16
+ libc.src.__support.math.fminimum_magf
+ libc.src.__support.math.fminimum_magf128
+ libc.src.__support.math.fminimum_magf16
+ libc.src.__support.math.fminimum_magl
+ libc.src.__support.math.fminimum_num
+ libc.src.__support.math.fminimum_numbf16
+ libc.src.__support.math.fminimum_numf
+ libc.src.__support.math.fminimum_numf128
+ libc.src.__support.math.fminimum_numf16
+ libc.src.__support.math.fminimum_numl
+ libc.src.__support.math.fminimumbf16
+ libc.src.__support.math.fminimumf
+ libc.src.__support.math.fminimumf128
+ libc.src.__support.math.fminimumf16
+ libc.src.__support.math.fminimuml
+ libc.src.__support.math.fminl
+ libc.src.__support.math.fmod
+ libc.src.__support.math.fmodbf16
+ libc.src.__support.math.fmodf
+ libc.src.__support.math.fmodf128
+ libc.src.__support.math.fmodf16
+ libc.src.__support.math.fmodl
+ libc.src.__support.math.fmul
+ libc.src.__support.math.fmulf128
+ libc.src.__support.math.fmull
+ libc.src.__support.math.frexp
+ libc.src.__support.math.frexpbf16
+ libc.src.__support.math.frexpl
+ libc.src.__support.math.fromfp
+ libc.src.__support.math.fromfpbf16
+ libc.src.__support.math.fromfpf
+ libc.src.__support.math.fromfpf128
+ libc.src.__support.math.fromfpf16
+ libc.src.__support.math.fromfpl
+ libc.src.__support.math.fromfpx
+ libc.src.__support.math.fromfpxbf16
+ libc.src.__support.math.fromfpxf
+ libc.src.__support.math.fromfpxf128
+ libc.src.__support.math.fromfpxf16
+ libc.src.__support.math.fromfpxl
+ libc.src.__support.math.fsub
+ libc.src.__support.math.fsubf128
+ libc.src.__support.math.fsubl
+ libc.src.__support.math.getpayload
+ libc.src.__support.math.getpayloadbf16
+ libc.src.__support.math.getpayloadf
+ libc.src.__support.math.getpayloadf128
+ libc.src.__support.math.getpayloadf16
+ libc.src.__support.math.getpayloadl
+ libc.src.__support.math.iscanonical
+ libc.src.__support.math.iscanonicalbf16
+ libc.src.__support.math.iscanonicalf
+ libc.src.__support.math.iscanonicalf128
+ libc.src.__support.math.iscanonicalf16
+ libc.src.__support.math.iscanonicall
+ libc.src.__support.math.isnan
+ libc.src.__support.math.isnanf
+ libc.src.__support.math.isnanf128
+ libc.src.__support.math.isnanf16
+ libc.src.__support.math.isnanl
+ libc.src.__support.math.issignaling
+ libc.src.__support.math.issignalingbf16
+ libc.src.__support.math.issignalingf
+ libc.src.__support.math.issignalingf128
+ libc.src.__support.math.issignalingf16
+ libc.src.__support.math.issignalingl
+ libc.src.__support.math.ldexp
+ libc.src.__support.math.ldexpbf16
+ libc.src.__support.math.ldexpl
+ libc.src.__support.math.llogbbf16
+ libc.src.__support.math.llrint
+ libc.src.__support.math.llrintbf16
+ libc.src.__support.math.llrintf
+ libc.src.__support.math.llrintf128
+ libc.src.__support.math.llrintf16
+ libc.src.__support.math.llrintl
+ libc.src.__support.math.llround
+ libc.src.__support.math.llroundbf16
+ libc.src.__support.math.llroundf
+ libc.src.__support.math.llroundf128
+ libc.src.__support.math.llroundf16
+ libc.src.__support.math.llroundl
+ libc.src.__support.math.log
+ libc.src.__support.math.logbbf16
+ libc.src.__support.math.ilogbbf16
+ libc.src.__support.math.lrint
+ libc.src.__support.math.lrintbf16
+ libc.src.__support.math.lrintf
+ libc.src.__support.math.lrintf128
+ libc.src.__support.math.lrintf16
+ libc.src.__support.math.lrintl
+ libc.src.__support.math.lround
+ libc.src.__support.math.lroundbf16
+ libc.src.__support.math.lroundf
+ libc.src.__support.math.lroundf128
+ libc.src.__support.math.lroundf16
+ libc.src.__support.math.lroundl
+ libc.src.__support.math.modf
+ libc.src.__support.math.modfbf16
+ libc.src.__support.math.modff
+ libc.src.__support.math.modff128
+ libc.src.__support.math.modff16
+ libc.src.__support.math.modfl
+ libc.src.__support.math.nan
+ libc.src.__support.math.nanbf16
+ libc.src.__support.math.nanf
+ libc.src.__support.math.nanf128
+ libc.src.__support.math.nanf16
+ libc.src.__support.math.nanl
+ libc.src.__support.math.nearbyint
+ libc.src.__support.math.nearbyintbf16
+ libc.src.__support.math.nearbyintf
+ libc.src.__support.math.nearbyintf128
+ libc.src.__support.math.nearbyintf16
+ libc.src.__support.math.nearbyintl
+ libc.src.__support.math.nextafter
+ libc.src.__support.math.nextafterbf16
+ libc.src.__support.math.nextafterf
+ libc.src.__support.math.nextafterf16
+ libc.src.__support.math.nextafterl
+ libc.src.__support.math.nextafterf128
+ libc.src.__support.math.remainder
+ libc.src.__support.math.remainderbf16
+ libc.src.__support.math.remainderf
+ libc.src.__support.math.remainderf128
+ libc.src.__support.math.remainderf16
+ libc.src.__support.math.remainderl
+ libc.src.__support.math.remquo
+ libc.src.__support.math.remquobf16
+ libc.src.__support.math.remquof
+ libc.src.__support.math.remquof128
+ libc.src.__support.math.remquof16
+ libc.src.__support.math.remquol
+ libc.src.__support.math.rint
+ libc.src.__support.math.rintbf16
+ libc.src.__support.math.rintf
+ libc.src.__support.math.rintf128
+ libc.src.__support.math.rintf16
+ libc.src.__support.math.rintl
+ libc.src.__support.math.round
+ libc.src.__support.math.roundbf16
+ libc.src.__support.math.roundeven
+ libc.src.__support.math.roundevenbf16
+ libc.src.__support.math.roundevenf
+ libc.src.__support.math.roundevenf128
+ libc.src.__support.math.roundevenf16
+ libc.src.__support.math.roundevenl
+ libc.src.__support.math.roundf
+ libc.src.__support.math.roundf128
+ libc.src.__support.math.roundf16
+ libc.src.__support.math.roundl
+ libc.src.__support.math.scalbln
+ libc.src.__support.math.scalblnbf16
+ libc.src.__support.math.scalblnf
+ libc.src.__support.math.scalblnf128
+ libc.src.__support.math.scalblnf16
+ libc.src.__support.math.scalblnl
+ libc.src.__support.math.scalbn
+ libc.src.__support.math.scalbnbf16
+ libc.src.__support.math.scalbnf
+ libc.src.__support.math.scalbnf128
+ libc.src.__support.math.scalbnf16
+ libc.src.__support.math.scalbnl
+ libc.src.__support.math.setpayload
+ libc.src.__support.math.setpayloadbf16
+ libc.src.__support.math.setpayloadf
+ libc.src.__support.math.setpayloadf128
+ libc.src.__support.math.setpayloadf16
+ libc.src.__support.math.setpayloadl
+ libc.src.__support.math.sqrtl
+ libc.src.__support.math.trunc
+ libc.src.__support.math.truncbf16
+ libc.src.__support.math.truncf
+ libc.src.__support.math.truncf128
+ libc.src.__support.math.truncf16
+ libc.src.__support.math.truncl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
+ libc.src.__support.math.totalorder
+ libc.src.__support.math.totalorderbf16
+ libc.src.__support.math.totalorderf
+ libc.src.__support.math.totalorderf128
+ libc.src.__support.math.totalorderf16
+ libc.src.__support.math.totalorderl
+ libc.src.__support.math.totalordermag
+ libc.src.__support.math.totalordermagbf16
+ libc.src.__support.math.totalordermagf
+ libc.src.__support.math.totalordermagf128
+ libc.src.__support.math.totalordermagf16
+ libc.src.__support.math.totalordermagl
+)
endif() # LIBC_TEST_SKIP_SHARED_MATH_TESTS
add_fp_unittest(
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 1548e317761e2..62970217551c0 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -10,6 +10,9 @@
#include "shared/math.h"
#include "test/UnitTest/Test.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;s
#ifdef LIBC_USE_CONSTEXPR
@@ -373,6 +376,11 @@ static_assert(0 == LIBC_NAMESPACE::shared::isnanl(0.0L));
#endif
+//emulated float128
+
+static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
+
+
//===----------------------------------------------------------------------===//
// Float128 Tests
//===----------------------------------------------------------------------===//
@@ -384,7 +392,6 @@ static_assert(0 == [] {
float128 x = float128(0.0);
return LIBC_NAMESPACE::shared::canonicalizef128(&cx, &x);
}());
-static_assert(float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(float128(0.0)));
static_assert(float128(1.0) ==
LIBC_NAMESPACE::shared::fabsf128(float128(-1.0)));
static_assert(float128(0.0) ==
>From cf85a14279fff7223d452b04f0ff726db8046528 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 11:46:33 +0530
Subject: [PATCH 08/41] nits
---
libc/test/shared/shared_math_constexpr_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 62970217551c0..68581ddcd4b0f 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -12,7 +12,7 @@
#include "test/UnitTest/Test.h"
#include "src/__support/FPUtil/float128.h"
-using LIBC_NAMESPACE::fputil::Float128;s
+using LIBC_NAMESPACE::fputil::Float128;
#ifdef LIBC_USE_CONSTEXPR
>From 8c18ce1ba7020149408a9277994ec5b1b8f34477 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 11:50:28 +0530
Subject: [PATCH 09/41] nits
---
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 518144fd9160a..6339283fe5e05 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -123,7 +123,7 @@ class MPFRNumber {
#ifdef LIBC_TYPES_HAS_FLOAT16
|| cpp::is_same_v<float16, XType>
#endif
- || cpp::is_same_v<bfloat16, XType> || cpp:::is_same<Float128,XType>,
+ || cpp::is_same_v<bfloat16, XType> || cpp::is_same<Float128,XType>,
int> = 0>
explicit MPFRNumber(XType x,
unsigned int precision = ExtraPrecision<XType>::VALUE,
>From 7930f57437c202599a6467091b66dc99a13583a4 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 12:39:29 +0530
Subject: [PATCH 10/41] nits
---
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 6339283fe5e05..43acdfd28e9ae 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -73,7 +73,7 @@ template <> struct ExtraPrecision<bfloat16> {
};
template <> struct ExtraPrecision<Float128> {
- static constexpr unsigned int VALUE = VALUE = 512;
+ static constexpr unsigned int VALUE = 512;
}
// If the ulp tolerance is less than or equal to 0.5, we would check that the
>From 75c87c45525531e705db68de5f7ea89cd549d063 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 12:45:17 +0530
Subject: [PATCH 11/41] nits
---
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 43acdfd28e9ae..a5c2af909445f 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -74,7 +74,7 @@ template <> struct ExtraPrecision<bfloat16> {
template <> struct ExtraPrecision<Float128> {
static constexpr unsigned int VALUE = 512;
-}
+};
// If the ulp tolerance is less than or equal to 0.5, we would check that the
// result is rounded correctly with respect to the rounding mode by using the
>From 304e3254a9f1edd8bb5117135e70c98527c89b91 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 12:50:06 +0530
Subject: [PATCH 12/41] nit
---
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index a5c2af909445f..60d89edcf4287 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -123,7 +123,7 @@ class MPFRNumber {
#ifdef LIBC_TYPES_HAS_FLOAT16
|| cpp::is_same_v<float16, XType>
#endif
- || cpp::is_same_v<bfloat16, XType> || cpp::is_same<Float128,XType>,
+ || cpp::is_same_v<bfloat16, XType> || cpp::is_same_v<Float128,XType>,
int> = 0>
explicit MPFRNumber(XType x,
unsigned int precision = ExtraPrecision<XType>::VALUE,
>From c8dfeb1c35ec42e3283a6b20974d2cd47e11fee3 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 14:21:38 +0530
Subject: [PATCH 13/41] nit
---
libc/utils/MPFRWrapper/MPFRUtils.cpp | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index bc32b11466e5a..b3c6ebddf8257 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -15,6 +15,9 @@
#include "src/__support/FPUtil/fpbits_str.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
+#include "src/__support/FPUtil/float128.h"
+
+using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace testing {
@@ -288,6 +291,12 @@ template void explain_unary_operation_single_output_error(Operation op,
bfloat16, bfloat16,
double, RoundingMode);
+// Emulated Float128 is always available regardless of native float128 support.
+template void
+explain_unary_operation_single_output_error(Operation op, fputil::Float128,
+ fputil::Float128, double,
+ RoundingMode);
+
template <typename T>
void explain_unary_operation_two_outputs_error(
Operation op, T input, const BinaryOutput<T> &libc_result,
@@ -580,6 +589,10 @@ template bool compare_unary_operation_single_output(Operation, float128,
template bool compare_unary_operation_single_output(Operation, bfloat16,
bfloat16, double,
RoundingMode);
+// Emulated Float128
+template bool compare_unary_operation_single_output(Operation, fputil::Float128,
+ fputil::Float128, double,
+ RoundingMode);
template <typename T>
bool compare_unary_operation_two_outputs(Operation op, T input,
>From 158c144b40012438e33474030a7e949e235b8d36 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Tue, 30 Jun 2026 14:29:13 +0530
Subject: [PATCH 14/41] nit
---
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 60d89edcf4287..ee5a69f0353d1 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -298,7 +298,7 @@ class MPFRNumber {
if (FPBits<T>(input).is_subnormal())
++inputExponent;
- if (thisAsT * input < 0 || thisExponent == inputExponent) {
+ if (thisAsT * input < T(0) || thisExponent == inputExponent) {
MPFRNumber inputMPFR(input);
mpfr_sub(inputMPFR.value, value, inputMPFR.value, MPFR_RNDN);
mpfr_abs(inputMPFR.value, inputMPFR.value, MPFR_RNDN);
>From 290acd94c8cc867f7009474db83830cea0537eaf Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 2 Jul 2026 20:44:29 +0530
Subject: [PATCH 15/41] test mpfr_get_float128
---
libc/utils/MPFRWrapper/CMakeLists.txt | 122 +++++++++++++-------------
libc/utils/MPFRWrapper/MPCommon.cpp | 2 +-
2 files changed, 62 insertions(+), 62 deletions(-)
diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index a1324e9af33c9..fe328062c2b1c 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -1,61 +1,61 @@
-if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
- add_library(libcMPCommon STATIC
- MPCommon.cpp
- MPCommon.h
- mpfr_inc.h
- )
- _get_common_test_compile_options(compile_options "" "")
- # mpfr/gmp headers do not work with -ffreestanding flag.
- list(REMOVE_ITEM compile_options "-ffreestanding")
- target_compile_options(libcMPCommon PRIVATE -O3 ${compile_options})
- add_dependencies(
- libcMPCommon
- libc.hdr.stdint_proxy
- libc.src.__support.CPP.string
- libc.src.__support.CPP.string_view
- libc.src.__support.CPP.type_traits
- libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.float128
- libc.src.__support.FPUtil.cast
- libc.src.__support.FPUtil.fp_bits
- )
- if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
- target_include_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
- target_link_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
- endif()
- target_include_directories(libcMPCommon PUBLIC ${LIBC_SOURCE_DIR})
- target_link_libraries(libcMPCommon PUBLIC LibcFPTestHelpers.unit mpfr gmp)
-elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
- message(WARNING "Math tests using MPFR will be skipped.")
-endif()
-
-if(LIBC_TESTS_CAN_USE_MPFR)
- add_library(libcMPFRWrapper STATIC
- MPFRUtils.cpp
- MPFRUtils.h
- )
- _get_common_test_compile_options(compile_options "" "")
- # mpfr/gmp headers do not work with -ffreestanding flag.
- list(REMOVE_ITEM compile_options "-ffreestanding")
- target_compile_options(libcMPFRWrapper PRIVATE ${libc_opt_high_flag} ${compile_options})
- add_dependencies(
- libcMPFRWrapper
- libcMPCommon
- libc.hdr.stdint_proxy
- libc.src.__support.CPP.array
- libc.src.__support.CPP.stringstream
- libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.float128
- libc.src.__support.FPUtil.fp_bits
- libc.src.__support.FPUtil.fpbits_str
- LibcTest.unit
- )
- if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
- target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
- target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
- endif()
- target_include_directories(libcMPFRWrapper PUBLIC ${LIBC_SOURCE_DIR})
- target_link_libraries(libcMPFRWrapper PUBLIC libcMPCommon LibcFPTestHelpers.unit LibcTest.unit)
-elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
- message(WARNING "Math tests using MPFR will be skipped.")
-endif()
+if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
+ add_library(libcMPCommon STATIC
+ MPCommon.cpp
+ MPCommon.h
+ mpfr_inc.h
+ )
+ _get_common_test_compile_options(compile_options "" "")
+ # mpfr/gmp headers do not work with -ffreestanding flag.
+ list(REMOVE_ITEM compile_options "-ffreestanding")
+ target_compile_options(libcMPCommon PRIVATE -O3 ${compile_options})
+ add_dependencies(
+ libcMPCommon
+ libc.hdr.stdint_proxy
+ libc.src.__support.CPP.string
+ libc.src.__support.CPP.string_view
+ libc.src.__support.CPP.type_traits
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.cast
+ libc.src.__support.FPUtil.fp_bits
+ )
+ if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
+ target_include_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
+ target_link_directories(libcMPCommon PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
+ endif()
+ target_include_directories(libcMPCommon PUBLIC ${LIBC_SOURCE_DIR})
+ target_link_libraries(libcMPCommon PUBLIC LibcFPTestHelpers.unit mpfr gmp)
+elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
+ message(WARNING "Math tests using MPFR will be skipped.")
+endif()
+
+if(LIBC_TESTS_CAN_USE_MPFR)
+ add_library(libcMPFRWrapper STATIC
+ MPFRUtils.cpp
+ MPFRUtils.h
+ )
+ _get_common_test_compile_options(compile_options "" "")
+ # mpfr/gmp headers do not work with -ffreestanding flag.
+ list(REMOVE_ITEM compile_options "-ffreestanding")
+ target_compile_options(libcMPFRWrapper PRIVATE ${libc_opt_high_flag} ${compile_options})
+ add_dependencies(
+ libcMPFRWrapper
+ libcMPCommon
+ libc.hdr.stdint_proxy
+ libc.src.__support.CPP.array
+ libc.src.__support.CPP.stringstream
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.fpbits_str
+ LibcTest.unit
+ )
+ if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
+ target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include)
+ target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib)
+ endif()
+ target_include_directories(libcMPFRWrapper PUBLIC ${LIBC_SOURCE_DIR})
+ target_link_libraries(libcMPFRWrapper PUBLIC libcMPCommon LibcFPTestHelpers.unit LibcTest.unit)
+elseif(NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD)
+ message(WARNING "Math tests using MPFR will be skipped.")
+endif()
diff --git a/libc/utils/MPFRWrapper/MPCommon.cpp b/libc/utils/MPFRWrapper/MPCommon.cpp
index 8546aef2a2ff5..fb9573ca424f8 100644
--- a/libc/utils/MPFRWrapper/MPCommon.cpp
+++ b/libc/utils/MPFRWrapper/MPCommon.cpp
@@ -654,7 +654,7 @@ template <> bfloat16 MPFRNumber::as<bfloat16>() const {
}
template <> Float128 MPFRNumber::as<Float128>() const {
- return fputil::cast<Float128>(mpfr_get_flt(value, mpfr_rounding));
+ return fputil::cast<Float128>(mpfr_get_float128(value, mpfr_rounding));
}
} // namespace mpfr
>From a87b952c740091805485fd45cc0bb97e54744549 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 2 Jul 2026 21:10:58 +0530
Subject: [PATCH 16/41] non-native mpfr_get_float128
---
libc/utils/MPFRWrapper/MPCommon.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index ee5a69f0353d1..72444375c262d 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -27,6 +27,11 @@ extern "C" {
int mpfr_set_float128(mpfr_ptr, float128, mpfr_rnd_t);
float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
}
+#else
+extern "C"{
+int mpfr_set_float128(mpfr_ptr, Float128, mpfr_rnd_t);
+Float128 mpfr_get_float128(mpfr_srcptr,mpfr_rnd_t);
+}
#endif
namespace LIBC_NAMESPACE_DECL {
>From 0741c85c99c315111b6495b95dbfb668dd9c1098 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sun, 5 Jul 2026 12:57:55 +0530
Subject: [PATCH 17/41] add template for Float128 separately
---
libc/utils/MPFRWrapper/MPCommon.h | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 72444375c262d..981f6ba23df93 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -128,7 +128,7 @@ class MPFRNumber {
#ifdef LIBC_TYPES_HAS_FLOAT16
|| cpp::is_same_v<float16, XType>
#endif
- || cpp::is_same_v<bfloat16, XType> || cpp::is_same_v<Float128,XType>,
+ || cpp::is_same_v<bfloat16, XType>,
int> = 0>
explicit MPFRNumber(XType x,
unsigned int precision = ExtraPrecision<XType>::VALUE,
@@ -174,6 +174,17 @@ class MPFRNumber {
}
#endif // LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE
+ template <typename XType,
+ cpp::enable_if_t<cpp::is_same_v<Float128, XType>, int> = 0>
+ explicit MPFRNumber(XType x,
+ unsigned int precision = ExtraPrecision<XType>::VALUE,
+ RoundingMode rounding = RoundingMode::Nearest)
+ : mpfr_precision(precision),
+ mpfr_rounding(get_mpfr_rounding_mode(rounding)) {
+ mpfr_init2(value, mpfr_precision);
+ mpfr_set_float128(value, x, mpfr_rounding);
+ }
+
template <typename XType,
cpp::enable_if_t<cpp::is_integral_v<XType>, int> = 0>
explicit MPFRNumber(XType x,
>From 27e733fbc78ed939154239ee091aa076128b5e98 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sun, 5 Jul 2026 13:00:30 +0530
Subject: [PATCH 18/41] formatting
---
libc/shared/math/ceilf128.h | 2 +-
libc/src/__support/math/ceilf128.h | 2 +-
libc/src/math/ceilf128.h | 2 +-
libc/src/math/generic/ceilf128.cpp | 2 +-
libc/test/shared/shared_math_test.cpp | 4 ++--
libc/test/src/math/ceilf128_test.cpp | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libc/shared/math/ceilf128.h b/libc/shared/math/ceilf128.h
index 25611636e2233..d7fe00fe86a3e 100644
--- a/libc/shared/math/ceilf128.h
+++ b/libc/shared/math/ceilf128.h
@@ -10,8 +10,8 @@
#define LLVM_LIBC_SHARED_MATH_CEILF128_H
#include "shared/libc_common.h"
-#include "src/__support/math/ceilf128.h"
#include "src/__support/FPUtil/float128.h"
+#include "src/__support/math/ceilf128.h"
using LIBC_NAMESPACE::fputil::Float128;
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index f12fc6a11a07c..31b3debb890da 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -10,8 +10,8 @@
#define LLVM_LIBC_SRC___SUPPORT_MATH_CEILF128_H
#include "src/__support/FPUtil/NearestIntegerOperations.h"
-#include "src/__support/macros/config.h"
#include "src/__support/FPUtil/float128.h"
+#include "src/__support/macros/config.h"
using LIBC_NAMESPACE::fputil::Float128;
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index 40de768feb299..32b69433767b5 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -9,9 +9,9 @@
#ifndef LLVM_LIBC_SRC_MATH_CEILF128_H
#define LLVM_LIBC_SRC_MATH_CEILF128_H
+#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-#include "src/__support/FPUtil/float128.h"
using LIBC_NAMESPACE::fputil::Float128;
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index e359ef9cb18b7..acb5ed3b8b8ab 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "src/math/ceilf128.h"
-#include "src/__support/math/ceilf128.h"
#include "src/__support/FPUtil/float128.h"
+#include "src/__support/math/ceilf128.h"
using LIBC_NAMESPACE::fputil::Float128;
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index cb207b5095b59..802205d4ff974 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -576,13 +576,13 @@ TEST(LlvmLibcSharedMathTest, AllLongDouble) {
#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
-// Emulated float128
+// Emulated float128
// TODO: style
#include "src/__support/FPUtil/float128.h"
using LIBC_NAMESPACE::fputil::Float128;
-TEST(LlvmLibcSharedMathTest, AllEmuFloat128){
+TEST(LlvmLibcSharedMathTest, AllEmuFloat128) {
EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
}
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index e01221f4ac6cd..accb766e1526d 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -8,8 +8,8 @@
#include "CeilTest.h"
-#include "src/math/ceilf128.h"
#include "src/__support/FPUtil/float128.h"
+#include "src/math/ceilf128.h"
using LIBC_NAMESPACE::fputil::Float128;
>From fb052313b5304228b676e9ace1e16711156f84e3 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sun, 5 Jul 2026 13:36:00 +0530
Subject: [PATCH 19/41] chore: format
---
libc/test/shared/shared_math_constexpr_test.cpp | 5 ++---
libc/test/src/math/smoke/ceilf128_test.cpp | 2 +-
libc/utils/MPFRWrapper/MPCommon.cpp | 2 +-
libc/utils/MPFRWrapper/MPCommon.h | 8 ++++----
libc/utils/MPFRWrapper/MPFRUtils.cpp | 10 +++++-----
5 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 68581ddcd4b0f..91b43f84332ce 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -9,8 +9,8 @@
#define LIBC_ENABLE_CONSTEXPR 1
#include "shared/math.h"
-#include "test/UnitTest/Test.h"
#include "src/__support/FPUtil/float128.h"
+#include "test/UnitTest/Test.h"
using LIBC_NAMESPACE::fputil::Float128;
@@ -376,11 +376,10 @@ static_assert(0 == LIBC_NAMESPACE::shared::isnanl(0.0L));
#endif
-//emulated float128
+// emulated float128
static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
-
//===----------------------------------------------------------------------===//
// Float128 Tests
//===----------------------------------------------------------------------===//
diff --git a/libc/test/src/math/smoke/ceilf128_test.cpp b/libc/test/src/math/smoke/ceilf128_test.cpp
index e01221f4ac6cd..accb766e1526d 100644
--- a/libc/test/src/math/smoke/ceilf128_test.cpp
+++ b/libc/test/src/math/smoke/ceilf128_test.cpp
@@ -8,8 +8,8 @@
#include "CeilTest.h"
-#include "src/math/ceilf128.h"
#include "src/__support/FPUtil/float128.h"
+#include "src/math/ceilf128.h"
using LIBC_NAMESPACE::fputil::Float128;
diff --git a/libc/utils/MPFRWrapper/MPCommon.cpp b/libc/utils/MPFRWrapper/MPCommon.cpp
index fb9573ca424f8..b3d0b3ca77122 100644
--- a/libc/utils/MPFRWrapper/MPCommon.cpp
+++ b/libc/utils/MPFRWrapper/MPCommon.cpp
@@ -11,9 +11,9 @@
#include "src/__support/CPP/string_view.h"
#include "src/__support/FPUtil/bfloat16.h"
#include "src/__support/FPUtil/cast.h"
+#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-#include "src/__support/FPUtil/float128.h"
using LIBC_NAMESPACE::fputil::Float128;
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 981f6ba23df93..3d364cdcd8dee 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -13,10 +13,10 @@
#include "src/__support/CPP/string.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/FPBits.h"
+#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
#include "test/UnitTest/RoundingModeUtils.h"
-#include "src/__support/FPUtil/float128.h"
using LIBC_NAMESPACE::fputil::Float128;
@@ -27,10 +27,10 @@ extern "C" {
int mpfr_set_float128(mpfr_ptr, float128, mpfr_rnd_t);
float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
}
-#else
-extern "C"{
+#else
+extern "C" {
int mpfr_set_float128(mpfr_ptr, Float128, mpfr_rnd_t);
-Float128 mpfr_get_float128(mpfr_srcptr,mpfr_rnd_t);
+Float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
}
#endif
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index b3c6ebddf8257..fd390abf56645 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -12,10 +12,10 @@
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/stringstream.h"
#include "src/__support/FPUtil/bfloat16.h"
+#include "src/__support/FPUtil/float128.h"
#include "src/__support/FPUtil/fpbits_str.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-#include "src/__support/FPUtil/float128.h"
using LIBC_NAMESPACE::fputil::Float128;
@@ -292,10 +292,10 @@ template void explain_unary_operation_single_output_error(Operation op,
double, RoundingMode);
// Emulated Float128 is always available regardless of native float128 support.
-template void
-explain_unary_operation_single_output_error(Operation op, fputil::Float128,
- fputil::Float128, double,
- RoundingMode);
+template void explain_unary_operation_single_output_error(Operation op,
+ fputil::Float128,
+ fputil::Float128,
+ double, RoundingMode);
template <typename T>
void explain_unary_operation_two_outputs_error(
>From 4f3e7979da6554e83ee0f067eacde5af1bec0669 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Mon, 6 Jul 2026 16:18:57 +0530
Subject: [PATCH 20/41] guard for LD
---
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 3d364cdcd8dee..96e1d35b7777a 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -22,7 +22,7 @@ using LIBC_NAMESPACE::fputil::Float128;
#include "mpfr_inc.h"
-#ifdef LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE
+#ifdef LIBC_TYPES_HAS_FLOAT128
extern "C" {
int mpfr_set_float128(mpfr_ptr, float128, mpfr_rnd_t);
float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
>From efbb39717d4b562f965585a963f0bfa8ee91d775 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 30 Jul 2026 01:37:18 +0530
Subject: [PATCH 21/41] test
---
libc/src/__support/math/CMakeLists.txt | 1 +
libc/src/__support/math/ceilf128.h | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index db514db61a9df..8e168eadf5ba0 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -816,6 +816,7 @@ add_header_library(
libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.nearest_integer_operations
libc.src.__support.macros.config
+ libc.src.__support.macros.properties.types
)
add_header_library(
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index 31b3debb890da..c89198780696a 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -12,13 +12,22 @@
#include "src/__support/FPUtil/NearestIntegerOperations.h"
#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/types.h"
using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace math {
-LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
+#ifdef LIBC_TYPES_HAS_FLOAT128
+LIBC_INLINE constexpr float128 ceilf128(float128 x) {
+ return static_cast<float128>(fputil::ceil(fputil::Float128(x)));
+}
+#else
+LIBC_INLINE constexpr fputil::Float128 ceilf128(fputil::Float128 x) {
+ return fputil::ceil(x);
+}
+#endif // LIBC_TYPES_HAS_FLOAT128
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
>From 6ea2f3bf56fe8bc43310653e12ed7f64f1555d3a Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 30 Jul 2026 20:25:15 +0530
Subject: [PATCH 22/41] test
---
libc/src/__support/math/ceilf128.h | 4 ++--
libc/src/math/generic/CMakeLists.txt | 1 +
libc/src/math/generic/ceilf128.cpp | 7 +++++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index c89198780696a..32050b9c80c99 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -21,10 +21,10 @@ namespace math {
#ifdef LIBC_TYPES_HAS_FLOAT128
LIBC_INLINE constexpr float128 ceilf128(float128 x) {
- return static_cast<float128>(fputil::ceil(fputil::Float128(x)));
+ return static_cast<float128>(fputil::ceil(Float128(x)));
}
#else
-LIBC_INLINE constexpr fputil::Float128 ceilf128(fputil::Float128 x) {
+LIBC_INLINE constexpr Float128 ceilf128(Float128 x) {
return fputil::ceil(x);
}
#endif // LIBC_TYPES_HAS_FLOAT128
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index d25a4a579f26b..e8552ebf2ac9b 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -163,6 +163,7 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.math.ceilf128
libc.src.__support.FPUtil.float128
+ libc.src.__support.macros.properties.types
)
add_entrypoint_object(
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index acb5ed3b8b8ab..685518ed49d32 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -9,13 +9,20 @@
#include "src/math/ceilf128.h"
#include "src/__support/FPUtil/float128.h"
#include "src/__support/math/ceilf128.h"
+#include "src/__support/macros/properties/types.h"
using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
+#ifdef LIBC_TYPES_HAS_FLOAT128
+LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
+ return static_cast<float128>(math::ceilf128(Float128(x)));
+}
+#else
LLVM_LIBC_FUNCTION(Float128, ceilf128, (Float128 x)) {
return math::ceilf128(x);
}
+#endif // LIBC_TYPES_HAS_FLOAT128
} // namespace LIBC_NAMESPACE_DECL
>From cb289381cb2c7668bb1a5afd6703106085efd760 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sat, 1 Aug 2026 00:02:47 +0530
Subject: [PATCH 23/41] structured and applied suggestions
---
libc/src/__support/math/CMakeLists.txt | 1 -
libc/src/__support/math/ceilf128.h | 13 +------------
libc/src/math/generic/CMakeLists.txt | 2 --
libc/src/math/generic/ceilf128.cpp | 12 +++---------
libc/test/shared/CMakeLists.txt | 2 +-
libc/test/shared/shared_math_constexpr_test.cpp | 6 ++++--
libc/test/src/math/CMakeLists.txt | 1 -
libc/test/src/math/ceilf128_test.cpp | 3 ---
libc/test/src/math/smoke/CMakeLists.txt | 1 -
libc/test/src/math/smoke/ceilf128_test.cpp | 3 ---
libc/utils/MPFRWrapper/CMakeLists.txt | 2 +-
11 files changed, 10 insertions(+), 36 deletions(-)
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 8e168eadf5ba0..db514db61a9df 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -816,7 +816,6 @@ add_header_library(
libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.nearest_integer_operations
libc.src.__support.macros.config
- libc.src.__support.macros.properties.types
)
add_header_library(
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index 32050b9c80c99..cd6af62926c97 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -12,22 +12,11 @@
#include "src/__support/FPUtil/NearestIntegerOperations.h"
#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
-#include "src/__support/macros/properties/types.h"
-
-using LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
namespace math {
-#ifdef LIBC_TYPES_HAS_FLOAT128
-LIBC_INLINE constexpr float128 ceilf128(float128 x) {
- return static_cast<float128>(fputil::ceil(Float128(x)));
-}
-#else
-LIBC_INLINE constexpr Float128 ceilf128(Float128 x) {
- return fputil::ceil(x);
-}
-#endif // LIBC_TYPES_HAS_FLOAT128
+LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index e8552ebf2ac9b..1a81f84db853d 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -162,8 +162,6 @@ add_entrypoint_object(
../ceilf128.h
DEPENDS
libc.src.__support.math.ceilf128
- libc.src.__support.FPUtil.float128
- libc.src.__support.macros.properties.types
)
add_entrypoint_object(
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index 685518ed49d32..6320a791fe036 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -7,22 +7,16 @@
//===----------------------------------------------------------------------===//
#include "src/math/ceilf128.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/__support/math/ceilf128.h"
-#include "src/__support/macros/properties/types.h"
-using LIBC_NAMESPACE::fputil::Float128;
+#ifndef LIBC_TYPES_HAS_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_FLOAT128
namespace LIBC_NAMESPACE_DECL {
-#ifdef LIBC_TYPES_HAS_FLOAT128
LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
- return static_cast<float128>(math::ceilf128(Float128(x)));
-}
-#else
-LLVM_LIBC_FUNCTION(Float128, ceilf128, (Float128 x)) {
return math::ceilf128(x);
}
-#endif // LIBC_TYPES_HAS_FLOAT128
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 48e16e353d45b..cd8cda0fede87 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -528,8 +528,8 @@ add_fp_unittest(
SRCS
shared_math_constexpr_test.cpp
DEPENDS
- libc.src.__support.math.asinbf16
libc.src.__support.FPUtil.float128
+ libc.src.__support.math.asinbf16
libc.src.__support.math.bf16subl
libc.src.__support.math.canonicalize
libc.src.__support.math.canonicalizebf16
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 91b43f84332ce..648f0e0eb402a 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -376,12 +376,14 @@ static_assert(0 == LIBC_NAMESPACE::shared::isnanl(0.0L));
#endif
-// emulated float128
+//===----------------------------------------------------------------------===//
+// Emulated Float128 Tests
+//===----------------------------------------------------------------------===//
static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
//===----------------------------------------------------------------------===//
-// Float128 Tests
+// Built-In Float128 Tests
//===----------------------------------------------------------------------===//
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index fbbbf67774d36..850cf31e8f44f 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -435,7 +435,6 @@ add_fp_unittest(
libc.src.math.ceilf128
libc.src.__support.CPP.algorithm
libc.src.__support.FPUtil.fp_bits
- libc.src.__support.FPUtil.float128
)
add_fp_unittest(
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index accb766e1526d..b60e64bc0c838 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -8,9 +8,6 @@
#include "CeilTest.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/math/ceilf128.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
LIST_CEIL_TESTS(Float128, LIBC_NAMESPACE::ceilf128)
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index 91d76f2c7973c..a42a6e70f773f 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -616,7 +616,6 @@ add_fp_unittest(
CeilTest.h
DEPENDS
libc.src.math.ceilf128
- libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.fp_bits
)
diff --git a/libc/test/src/math/smoke/ceilf128_test.cpp b/libc/test/src/math/smoke/ceilf128_test.cpp
index accb766e1526d..b60e64bc0c838 100644
--- a/libc/test/src/math/smoke/ceilf128_test.cpp
+++ b/libc/test/src/math/smoke/ceilf128_test.cpp
@@ -8,9 +8,6 @@
#include "CeilTest.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/math/ceilf128.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
LIST_CEIL_TESTS(Float128, LIBC_NAMESPACE::ceilf128)
diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index fe328062c2b1c..0b725be062f49 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -15,8 +15,8 @@ if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
libc.src.__support.CPP.string_view
libc.src.__support.CPP.type_traits
libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.cast
+ libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.fp_bits
)
if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
>From 62c9f8edb8b2023281113e4971b9233eb5aac22d Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sat, 1 Aug 2026 00:06:36 +0530
Subject: [PATCH 24/41] nit
---
libc/src/__support/math/ceilf128.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index cd6af62926c97..31b3debb890da 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -13,6 +13,8 @@
#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
+using LIBC_NAMESPACE::fputil::Float128;
+
namespace LIBC_NAMESPACE_DECL {
namespace math {
>From 8d01f964317563357dbac412810a2e099923ea8a Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 6 Aug 2026 20:03:08 +0530
Subject: [PATCH 25/41] nits
---
libc/src/math/ceilf128.h | 6 ++++--
libc/src/math/generic/ceilf128.cpp | 2 +-
libc/test/src/math/smoke/ceilf128_test.cpp | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index 32b69433767b5..6ad7dc7c8918d 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -13,11 +13,13 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-using LIBC_NAMESPACE::fputil::Float128;
+#ifndef LIBC_TYPES_HAS_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_FLOAT128
namespace LIBC_NAMESPACE_DECL {
-Float128 ceilf128(Float128 x);
+float128 ceilf128(float128 x);
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index 6320a791fe036..7b5a9954d9b6a 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -16,7 +16,7 @@ using float128 = LIBC_NAMESPACE::fputil::Float128;
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
- return math::ceilf128(x);
+ return fputil::cast<float128>(math::ceilf128(Float128(x)));
}
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/src/math/smoke/ceilf128_test.cpp b/libc/test/src/math/smoke/ceilf128_test.cpp
index b60e64bc0c838..f0da8258f79bc 100644
--- a/libc/test/src/math/smoke/ceilf128_test.cpp
+++ b/libc/test/src/math/smoke/ceilf128_test.cpp
@@ -10,4 +10,4 @@
#include "src/math/ceilf128.h"
-LIST_CEIL_TESTS(Float128, LIBC_NAMESPACE::ceilf128)
+LIST_CEIL_TESTS(float128, LIBC_NAMESPACE::ceilf128)
>From 90e7c853cd3d78cc21024cc250d558bc756704cb Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 6 Aug 2026 20:21:17 +0530
Subject: [PATCH 26/41] nit
---
libc/test/src/math/ceilf128_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index b60e64bc0c838..f0da8258f79bc 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -10,4 +10,4 @@
#include "src/math/ceilf128.h"
-LIST_CEIL_TESTS(Float128, LIBC_NAMESPACE::ceilf128)
+LIST_CEIL_TESTS(float128, LIBC_NAMESPACE::ceilf128)
>From 7cfb3cb04b572bb486814e72455745b42bffa778 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 01:06:27 +0530
Subject: [PATCH 27/41] nit
---
libc/test/shared/CMakeLists.txt | 1732 +++++++++++++++----------------
1 file changed, 866 insertions(+), 866 deletions(-)
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index cd8cda0fede87..68af6730b1a7e 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -10,874 +10,874 @@ if(LIBC_TEST_SKIP_SHARED_TESTS)
message(STATUS "LIBC_TEST_SKIP_SHARED_MATH_TESTS is set. Skipping libc-shared-tests.")
endif()
else()
-add_fp_unittest(
- shared_math_test
- SUITE
- libc-shared-tests
- SRCS
- shared_math_test.cpp
- DEPENDS
- libc.src.__support.FPUtil.float128
- libc.src.__support.FPUtil.fp_bits
- libc.src.__support.math.acos
- libc.src.__support.math.acosbf16
- libc.src.__support.math.acosf
- libc.src.__support.math.acosf16
- libc.src.__support.math.acoshf
- libc.src.__support.math.acoshf16
- libc.src.__support.math.acospif
- libc.src.__support.math.acospif16
- libc.src.__support.math.asin
- libc.src.__support.math.asinbf16
- libc.src.__support.math.asinf
- libc.src.__support.math.asinf16
- libc.src.__support.math.asinhf
- libc.src.__support.math.asinhf16
- libc.src.__support.math.asinpi
- libc.src.__support.math.asinpif
- libc.src.__support.math.asinpif16
- libc.src.__support.math.atan
- libc.src.__support.math.atan2
- libc.src.__support.math.atan2f
- libc.src.__support.math.atan2f128
- libc.src.__support.math.atan2f16
- libc.src.__support.math.atanbf16
- libc.src.__support.math.atanf
- libc.src.__support.math.atanf16
- libc.src.__support.math.atanhf
- libc.src.__support.math.atanhf16
- libc.src.__support.math.atanpif16
- libc.src.__support.math.bf16add
- libc.src.__support.math.bf16addf
- libc.src.__support.math.bf16addl
- libc.src.__support.math.bf16addf128
- libc.src.__support.math.bf16div
- libc.src.__support.math.bf16divf
- libc.src.__support.math.bf16divf128
- libc.src.__support.math.bf16divl
- libc.src.__support.math.bf16fma
- libc.src.__support.math.bf16fmaf
- libc.src.__support.math.bf16fmaf128
- libc.src.__support.math.bf16fmal
- libc.src.__support.math.bf16mul
- libc.src.__support.math.bf16mulf
- libc.src.__support.math.bf16mulf128
- libc.src.__support.math.bf16mull
- libc.src.__support.math.bf16sub
- libc.src.__support.math.bf16subf
- libc.src.__support.math.bf16subf128
- libc.src.__support.math.bf16subl
- libc.src.__support.math.canonicalize
- libc.src.__support.math.canonicalizebf16
- libc.src.__support.math.canonicalizef
- libc.src.__support.math.canonicalizef128
- libc.src.__support.math.canonicalizef16
- libc.src.__support.math.canonicalizel
- libc.src.__support.math.cbrt
- libc.src.__support.math.cbrtbf16
- libc.src.__support.math.cbrtf
- libc.src.__support.math.cbrtf16
- libc.src.__support.math.ceil
- libc.src.__support.math.ceilbf16
- libc.src.__support.math.ceilf
- libc.src.__support.math.ceilf128
- libc.src.__support.math.ceilf16
- libc.src.__support.math.ceill
- libc.src.__support.math.copysign
- libc.src.__support.math.copysignbf16
- libc.src.__support.math.copysignf
- libc.src.__support.math.copysignf128
- libc.src.__support.math.copysignf16
- libc.src.__support.math.copysignl
- libc.src.__support.math.cos
- libc.src.__support.math.cosf
- libc.src.__support.math.cosf16
- libc.src.__support.math.coshf
- libc.src.__support.math.coshf16
- libc.src.__support.math.cospif
- libc.src.__support.math.cospif16
- libc.src.__support.math.daddf128
- libc.src.__support.math.daddl
- libc.src.__support.math.ddivf128
- libc.src.__support.math.ddivl
- libc.src.__support.math.dfmaf128
- libc.src.__support.math.dfmal
- libc.src.__support.math.dmulf128
- libc.src.__support.math.dmull
- libc.src.__support.math.dsqrtf128
- libc.src.__support.math.dsqrtl
- libc.src.__support.math.dsubf128
- libc.src.__support.math.dsubl
- libc.src.__support.math.exp10m1f
- libc.src.__support.math.exp10m1f16
- libc.src.__support.math.erfcf16
- libc.src.__support.math.erff
- libc.src.__support.math.erff16
- libc.src.__support.math.exp
- libc.src.__support.math.exp2
- libc.src.__support.math.exp2f
- libc.src.__support.math.exp2f16
- libc.src.__support.math.exp2m1f
- libc.src.__support.math.exp2m1f16
- libc.src.__support.math.expm1
- libc.src.__support.math.expm1f
- libc.src.__support.math.expm1f16
- libc.src.__support.math.exp10
- libc.src.__support.math.exp10f
- libc.src.__support.math.exp10f16
- libc.src.__support.math.expf
- libc.src.__support.math.expbf16
- libc.src.__support.math.expf16
- libc.src.__support.math.f16add
- libc.src.__support.math.f16addf
- libc.src.__support.math.f16addf128
- libc.src.__support.math.f16addl
- libc.src.__support.math.f16div
- libc.src.__support.math.f16divf
- libc.src.__support.math.f16divf128
- libc.src.__support.math.f16divl
- libc.src.__support.math.f16fma
- libc.src.__support.math.f16fmaf
- libc.src.__support.math.f16fmaf128
- libc.src.__support.math.f16fmal
- libc.src.__support.math.f16mul
- libc.src.__support.math.f16mulf
- libc.src.__support.math.f16mulf128
- libc.src.__support.math.f16mull
- libc.src.__support.math.f16sqrt
- libc.src.__support.math.f16sqrtf
- libc.src.__support.math.f16sqrtf128
- libc.src.__support.math.f16sqrtl
- libc.src.__support.math.f16sub
- libc.src.__support.math.f16subf
- libc.src.__support.math.f16subf128
- libc.src.__support.math.f16subl
- libc.src.__support.math.fabs
- libc.src.__support.math.fabsbf16
- libc.src.__support.math.fabsf
- libc.src.__support.math.fabsf128
- libc.src.__support.math.fabsf16
- libc.src.__support.math.fabsl
- libc.src.__support.math.fadd
- libc.src.__support.math.faddf128
- libc.src.__support.math.faddl
- libc.src.__support.math.fdim
- libc.src.__support.math.fdimbf16
- libc.src.__support.math.fdimf
- libc.src.__support.math.fdimf128
- libc.src.__support.math.fdimf16
- libc.src.__support.math.fdiml
- libc.src.__support.math.fdiv
- libc.src.__support.math.fdivf128
- libc.src.__support.math.fdivl
- libc.src.__support.math.ffma
- libc.src.__support.math.ffmaf128
- libc.src.__support.math.ffmal
- libc.src.__support.math.floor
- libc.src.__support.math.floorbf16
- libc.src.__support.math.floorf
- libc.src.__support.math.floorf128
- libc.src.__support.math.floorf16
- libc.src.__support.math.floorl
- libc.src.__support.math.fma
- libc.src.__support.math.fmaf
- libc.src.__support.math.fmaf16
- libc.src.__support.math.fmabf16
- libc.src.__support.math.fmax
- libc.src.__support.math.fmaxbf16
- libc.src.__support.math.fmaxf
- libc.src.__support.math.fmaxf128
- libc.src.__support.math.fmaxf16
- libc.src.__support.math.fmaximum
- libc.src.__support.math.fmaximum_mag
- libc.src.__support.math.fmaximum_mag_num
- libc.src.__support.math.fmaximum_mag_numbf16
- libc.src.__support.math.fmaximum_mag_numf
- libc.src.__support.math.fmaximum_mag_numf128
- libc.src.__support.math.fmaximum_mag_numf16
- libc.src.__support.math.fmaximum_mag_numl
- libc.src.__support.math.fmaximum_magbf16
- libc.src.__support.math.fmaximum_magf
- libc.src.__support.math.fmaximum_magf128
- libc.src.__support.math.fmaximum_magf16
- libc.src.__support.math.fmaximum_magl
- libc.src.__support.math.fmaximum_num
- libc.src.__support.math.fmaximum_numbf16
- libc.src.__support.math.fmaximum_numf
- libc.src.__support.math.fmaximum_numf128
- libc.src.__support.math.fmaximum_numf16
- libc.src.__support.math.fmaximum_numl
- libc.src.__support.math.fmaximumbf16
- libc.src.__support.math.fmaximumf
- libc.src.__support.math.fmaximumf128
- libc.src.__support.math.fmaximumf16
- libc.src.__support.math.fmaximuml
- libc.src.__support.math.fmaxl
- libc.src.__support.math.fmin
- libc.src.__support.math.fminbf16
- libc.src.__support.math.fminf
- libc.src.__support.math.fminf128
- libc.src.__support.math.fminf16
- libc.src.__support.math.fminimum
- libc.src.__support.math.fminimum_mag
- libc.src.__support.math.fminimum_mag_num
- libc.src.__support.math.fminimum_mag_numbf16
- libc.src.__support.math.fminimum_mag_numf
- libc.src.__support.math.fminimum_mag_numf128
- libc.src.__support.math.fminimum_mag_numf16
- libc.src.__support.math.fminimum_mag_numl
- libc.src.__support.math.fminimum_magbf16
- libc.src.__support.math.fminimum_magf
- libc.src.__support.math.fminimum_magf128
- libc.src.__support.math.fminimum_magf16
- libc.src.__support.math.fminimum_magl
- libc.src.__support.math.fminimum_num
- libc.src.__support.math.fminimum_numbf16
- libc.src.__support.math.fminimum_numf
- libc.src.__support.math.fminimum_numf128
- libc.src.__support.math.fminimum_numf16
- libc.src.__support.math.fminimum_numl
- libc.src.__support.math.fminimumbf16
- libc.src.__support.math.fminimumf
- libc.src.__support.math.fminimumf128
- libc.src.__support.math.fminimumf16
- libc.src.__support.math.fminimuml
- libc.src.__support.math.fminl
- libc.src.__support.math.fmod
- libc.src.__support.math.fmodbf16
- libc.src.__support.math.fmodf
- libc.src.__support.math.fmodf128
- libc.src.__support.math.fmodf16
- libc.src.__support.math.fmodl
- libc.src.__support.math.fmul
- libc.src.__support.math.fmulf128
- libc.src.__support.math.fmull
- libc.src.__support.math.frexp
- libc.src.__support.math.frexpbf16
- libc.src.__support.math.frexpf
- libc.src.__support.math.frexpf128
- libc.src.__support.math.frexpf16
- libc.src.__support.math.frexpl
- libc.src.__support.math.fromfp
- libc.src.__support.math.fromfpbf16
- libc.src.__support.math.fromfpf
- libc.src.__support.math.fromfpf128
- libc.src.__support.math.fromfpf16
- libc.src.__support.math.fromfpl
- libc.src.__support.math.fromfpx
- libc.src.__support.math.fromfpxbf16
- libc.src.__support.math.fromfpxf
- libc.src.__support.math.fromfpxf128
- libc.src.__support.math.fromfpxf16
- libc.src.__support.math.fromfpxl
- libc.src.__support.math.fsqrt
- libc.src.__support.math.fsqrtf128
- libc.src.__support.math.fsqrtl
- libc.src.__support.math.fsub
- libc.src.__support.math.fsubf128
- libc.src.__support.math.fsubl
- libc.src.__support.math.getpayload
- libc.src.__support.math.getpayloadbf16
- libc.src.__support.math.getpayloadf
- libc.src.__support.math.getpayloadf128
- libc.src.__support.math.getpayloadf16
- libc.src.__support.math.getpayloadl
- libc.src.__support.math.hypot
- libc.src.__support.math.hypotf
- libc.src.__support.math.hypotbf16
- libc.src.__support.math.hypotf16
- libc.src.__support.math.ilogb
- libc.src.__support.math.ilogbbf16
- libc.src.__support.math.ilogbf
- libc.src.__support.math.ilogbf16
- libc.src.__support.math.ilogbf128
- libc.src.__support.math.ilogbl
- libc.src.__support.math.iscanonical
- libc.src.__support.math.iscanonicalbf16
- libc.src.__support.math.iscanonicalf
- libc.src.__support.math.iscanonicalf128
- libc.src.__support.math.iscanonicalf16
- libc.src.__support.math.iscanonicall
- libc.src.__support.math.isnan
- libc.src.__support.math.isnanf
- libc.src.__support.math.isnanf128
- libc.src.__support.math.isnanf16
- libc.src.__support.math.isnanl
- libc.src.__support.math.issignaling
- libc.src.__support.math.issignalingbf16
- libc.src.__support.math.issignalingf
- libc.src.__support.math.issignalingf128
- libc.src.__support.math.issignalingf16
- libc.src.__support.math.issignalingl
- libc.src.__support.math.ldexp
- libc.src.__support.math.ldexpbf16
- libc.src.__support.math.ldexpf
- libc.src.__support.math.ldexpl
- libc.src.__support.math.llogb
- libc.src.__support.math.llogbbf16
- libc.src.__support.math.llrint
- libc.src.__support.math.llrintbf16
- libc.src.__support.math.llrintf
- libc.src.__support.math.llrintf128
- libc.src.__support.math.llrintf16
- libc.src.__support.math.llrintl
- libc.src.__support.math.llround
- libc.src.__support.math.llroundbf16
- libc.src.__support.math.llroundf
- libc.src.__support.math.llroundf128
- libc.src.__support.math.llroundf16
- libc.src.__support.math.llroundl
- libc.src.__support.math.log
- libc.src.__support.math.log10
- libc.src.__support.math.log10f16
- libc.src.__support.math.log10p1f16
- libc.src.__support.math.log10f
- libc.src.__support.math.log1p
- libc.src.__support.math.log1pf
- libc.src.__support.math.log2
- libc.src.__support.math.logb
- libc.src.__support.math.log2f
- libc.src.__support.math.log2f16
- libc.src.__support.math.log2p1f16
- libc.src.__support.math.logbf
- libc.src.__support.math.logbbf16
- libc.src.__support.math.logbf128
- libc.src.__support.math.logbf16
- libc.src.__support.math.logf
- libc.src.__support.math.log_bf16
- libc.src.__support.math.ldexpf
- libc.src.__support.math.ldexpf128
- libc.src.__support.math.ldexpf16
- libc.src.__support.math.lgammaf16
- libc.src.__support.math.llogbf
- libc.src.__support.math.llogbf128
- libc.src.__support.math.llogbf16
- libc.src.__support.math.logbl
- libc.src.__support.math.logf16
- libc.src.__support.math.llogbl
- libc.src.__support.math.lrint
- libc.src.__support.math.lrintbf16
- libc.src.__support.math.lrintf
- libc.src.__support.math.lrintf128
- libc.src.__support.math.lrintf16
- libc.src.__support.math.lrintl
- libc.src.__support.math.lround
- libc.src.__support.math.lroundbf16
- libc.src.__support.math.lroundf
- libc.src.__support.math.lroundf128
- libc.src.__support.math.lroundf16
- libc.src.__support.math.lroundl
- libc.src.__support.math.modf
- libc.src.__support.math.modfbf16
- libc.src.__support.math.modff
- libc.src.__support.math.modff128
- libc.src.__support.math.modff16
- libc.src.__support.math.modfl
- libc.src.__support.math.nan
- libc.src.__support.math.nanbf16
- libc.src.__support.math.nanf
- libc.src.__support.math.nanf128
- libc.src.__support.math.nanf16
- libc.src.__support.math.nanl
- libc.src.__support.math.nearbyint
- libc.src.__support.math.nearbyintbf16
- libc.src.__support.math.nearbyintf
- libc.src.__support.math.nearbyintf128
- libc.src.__support.math.nearbyintf16
- libc.src.__support.math.nearbyintl
- libc.src.__support.math.nextdown
- libc.src.__support.math.nextdownbf16
- libc.src.__support.math.nextdownf
- libc.src.__support.math.nextdownf128
- libc.src.__support.math.nextdownf16
- libc.src.__support.math.nextdownl
- libc.src.__support.math.nextup
- libc.src.__support.math.nextupbf16
- libc.src.__support.math.nextupf
- libc.src.__support.math.nextupf128
- libc.src.__support.math.nextupf16
- libc.src.__support.math.nextupl
- libc.src.__support.math.nexttoward
- libc.src.__support.math.nexttowardbf16
- libc.src.__support.math.nexttowardf
- libc.src.__support.math.nexttowardf16
- libc.src.__support.math.nexttowardl
- libc.src.__support.math.nextafter
- libc.src.__support.math.nextafterbf16
- libc.src.__support.math.nextafterf
- libc.src.__support.math.nextafterf16
- libc.src.__support.math.nextafterl
- libc.src.__support.math.nextafterf128
- libc.src.__support.math.pow
- libc.src.__support.math.powf
- libc.src.__support.math.remainder
- libc.src.__support.math.remainderbf16
- libc.src.__support.math.remainderf
- libc.src.__support.math.remainderf128
- libc.src.__support.math.remainderf16
- libc.src.__support.math.remainderl
- libc.src.__support.math.remquo
- libc.src.__support.math.remquobf16
- libc.src.__support.math.remquof
- libc.src.__support.math.remquof128
- libc.src.__support.math.remquof16
- libc.src.__support.math.remquol
- libc.src.__support.math.rint
- libc.src.__support.math.rintbf16
- libc.src.__support.math.rintf
- libc.src.__support.math.rintf128
- libc.src.__support.math.rintf16
- libc.src.__support.math.rintl
- libc.src.__support.math.round
- libc.src.__support.math.roundbf16
- libc.src.__support.math.roundeven
- libc.src.__support.math.roundevenbf16
- libc.src.__support.math.roundevenf
- libc.src.__support.math.roundevenf128
- libc.src.__support.math.roundevenf16
- libc.src.__support.math.roundevenl
- libc.src.__support.math.roundf
- libc.src.__support.math.roundf128
- libc.src.__support.math.roundf16
- libc.src.__support.math.roundl
- libc.src.__support.math.rsqrtf
- libc.src.__support.math.rsqrtf16
- libc.src.__support.math.scalbln
- libc.src.__support.math.scalblnbf16
- libc.src.__support.math.scalblnf
- libc.src.__support.math.scalblnf128
- libc.src.__support.math.scalblnf16
- libc.src.__support.math.scalblnl
- libc.src.__support.math.scalbn
- libc.src.__support.math.scalbnbf16
- libc.src.__support.math.scalbnf
- libc.src.__support.math.scalbnf128
- libc.src.__support.math.scalbnf16
- libc.src.__support.math.scalbnl
- libc.src.__support.math.setpayload
- libc.src.__support.math.setpayloadbf16
- libc.src.__support.math.setpayloadf
- libc.src.__support.math.setpayloadf128
- libc.src.__support.math.setpayloadf16
- libc.src.__support.math.setpayloadl
- libc.src.__support.math.setpayloadsig
- libc.src.__support.math.setpayloadsigbf16
- libc.src.__support.math.setpayloadsigf
- libc.src.__support.math.setpayloadsigf128
- libc.src.__support.math.setpayloadsigf16
- libc.src.__support.math.setpayloadsigl
- libc.src.__support.math.sqrtf16
- libc.src.__support.math.sin
- libc.src.__support.math.sincos
- libc.src.__support.math.sincosf
- libc.src.__support.math.sinf
- libc.src.__support.math.sinf16
- libc.src.__support.math.sinhf
- libc.src.__support.math.sinhf16
- libc.src.__support.math.sqrtf128
- libc.src.__support.math.sinpif
- libc.src.__support.math.sinpif16
- libc.src.__support.math.sqrt
- libc.src.__support.math.sqrtbf16
- libc.src.__support.math.sqrtf
- libc.src.__support.math.sqrtl
- libc.src.__support.math.tan
- libc.src.__support.math.tanbf16
- libc.src.__support.math.tanf
- libc.src.__support.math.tanf16
- libc.src.__support.math.tanhf
- libc.src.__support.math.tanhf16
- libc.src.__support.math.tanpif
- libc.src.__support.math.tanpif16
- libc.src.__support.math.trunc
- libc.src.__support.math.truncbf16
- libc.src.__support.math.truncf
- libc.src.__support.math.truncf128
- libc.src.__support.math.truncf16
- libc.src.__support.math.truncl
- libc.src.__support.math.ufromfp
- libc.src.__support.math.ufromfpbf16
- libc.src.__support.math.ufromfpf
- libc.src.__support.math.ufromfpf128
- libc.src.__support.math.ufromfpf16
- libc.src.__support.math.ufromfpl
- libc.src.__support.math.ufromfpx
- libc.src.__support.math.ufromfpxbf16
- libc.src.__support.math.ufromfpxf
- libc.src.__support.math.ufromfpxf128
- libc.src.__support.math.ufromfpxf16
- libc.src.__support.math.ufromfpxl
- libc.src.__support.math.totalorder
- libc.src.__support.math.totalorderbf16
- libc.src.__support.math.totalorderf
- libc.src.__support.math.totalorderf128
- libc.src.__support.math.totalorderf16
- libc.src.__support.math.totalorderl
- libc.src.__support.math.totalordermag
- libc.src.__support.math.totalordermagbf16
- libc.src.__support.math.totalordermagf
- libc.src.__support.math.totalordermagf128
- libc.src.__support.math.totalordermagf16
- libc.src.__support.math.totalordermagl
-)
+ add_fp_unittest(
+ shared_math_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_math_test.cpp
+ DEPENDS
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.math.acos
+ libc.src.__support.math.acosbf16
+ libc.src.__support.math.acosf
+ libc.src.__support.math.acosf16
+ libc.src.__support.math.acoshf
+ libc.src.__support.math.acoshf16
+ libc.src.__support.math.acospif
+ libc.src.__support.math.acospif16
+ libc.src.__support.math.asin
+ libc.src.__support.math.asinbf16
+ libc.src.__support.math.asinf
+ libc.src.__support.math.asinf16
+ libc.src.__support.math.asinhf
+ libc.src.__support.math.asinhf16
+ libc.src.__support.math.asinpi
+ libc.src.__support.math.asinpif
+ libc.src.__support.math.asinpif16
+ libc.src.__support.math.atan
+ libc.src.__support.math.atan2
+ libc.src.__support.math.atan2f
+ libc.src.__support.math.atan2f128
+ libc.src.__support.math.atan2f16
+ libc.src.__support.math.atanbf16
+ libc.src.__support.math.atanf
+ libc.src.__support.math.atanf16
+ libc.src.__support.math.atanhf
+ libc.src.__support.math.atanhf16
+ libc.src.__support.math.atanpif16
+ libc.src.__support.math.bf16add
+ libc.src.__support.math.bf16addf
+ libc.src.__support.math.bf16addl
+ libc.src.__support.math.bf16addf128
+ libc.src.__support.math.bf16div
+ libc.src.__support.math.bf16divf
+ libc.src.__support.math.bf16divf128
+ libc.src.__support.math.bf16divl
+ libc.src.__support.math.bf16fma
+ libc.src.__support.math.bf16fmaf
+ libc.src.__support.math.bf16fmaf128
+ libc.src.__support.math.bf16fmal
+ libc.src.__support.math.bf16mul
+ libc.src.__support.math.bf16mulf
+ libc.src.__support.math.bf16mulf128
+ libc.src.__support.math.bf16mull
+ libc.src.__support.math.bf16sub
+ libc.src.__support.math.bf16subf
+ libc.src.__support.math.bf16subf128
+ libc.src.__support.math.bf16subl
+ libc.src.__support.math.canonicalize
+ libc.src.__support.math.canonicalizebf16
+ libc.src.__support.math.canonicalizef
+ libc.src.__support.math.canonicalizef128
+ libc.src.__support.math.canonicalizef16
+ libc.src.__support.math.canonicalizel
+ libc.src.__support.math.cbrt
+ libc.src.__support.math.cbrtbf16
+ libc.src.__support.math.cbrtf
+ libc.src.__support.math.cbrtf16
+ libc.src.__support.math.ceil
+ libc.src.__support.math.ceilbf16
+ libc.src.__support.math.ceilf
+ libc.src.__support.math.ceilf128
+ libc.src.__support.math.ceilf16
+ libc.src.__support.math.ceill
+ libc.src.__support.math.copysign
+ libc.src.__support.math.copysignbf16
+ libc.src.__support.math.copysignf
+ libc.src.__support.math.copysignf128
+ libc.src.__support.math.copysignf16
+ libc.src.__support.math.copysignl
+ libc.src.__support.math.cos
+ libc.src.__support.math.cosf
+ libc.src.__support.math.cosf16
+ libc.src.__support.math.coshf
+ libc.src.__support.math.coshf16
+ libc.src.__support.math.cospif
+ libc.src.__support.math.cospif16
+ libc.src.__support.math.daddf128
+ libc.src.__support.math.daddl
+ libc.src.__support.math.ddivf128
+ libc.src.__support.math.ddivl
+ libc.src.__support.math.dfmaf128
+ libc.src.__support.math.dfmal
+ libc.src.__support.math.dmulf128
+ libc.src.__support.math.dmull
+ libc.src.__support.math.dsqrtf128
+ libc.src.__support.math.dsqrtl
+ libc.src.__support.math.dsubf128
+ libc.src.__support.math.dsubl
+ libc.src.__support.math.exp10m1f
+ libc.src.__support.math.exp10m1f16
+ libc.src.__support.math.erfcf16
+ libc.src.__support.math.erff
+ libc.src.__support.math.erff16
+ libc.src.__support.math.exp
+ libc.src.__support.math.exp2
+ libc.src.__support.math.exp2f
+ libc.src.__support.math.exp2f16
+ libc.src.__support.math.exp2m1f
+ libc.src.__support.math.exp2m1f16
+ libc.src.__support.math.expm1
+ libc.src.__support.math.expm1f
+ libc.src.__support.math.expm1f16
+ libc.src.__support.math.exp10
+ libc.src.__support.math.exp10f
+ libc.src.__support.math.exp10f16
+ libc.src.__support.math.expf
+ libc.src.__support.math.expbf16
+ libc.src.__support.math.expf16
+ libc.src.__support.math.f16add
+ libc.src.__support.math.f16addf
+ libc.src.__support.math.f16addf128
+ libc.src.__support.math.f16addl
+ libc.src.__support.math.f16div
+ libc.src.__support.math.f16divf
+ libc.src.__support.math.f16divf128
+ libc.src.__support.math.f16divl
+ libc.src.__support.math.f16fma
+ libc.src.__support.math.f16fmaf
+ libc.src.__support.math.f16fmaf128
+ libc.src.__support.math.f16fmal
+ libc.src.__support.math.f16mul
+ libc.src.__support.math.f16mulf
+ libc.src.__support.math.f16mulf128
+ libc.src.__support.math.f16mull
+ libc.src.__support.math.f16sqrt
+ libc.src.__support.math.f16sqrtf
+ libc.src.__support.math.f16sqrtf128
+ libc.src.__support.math.f16sqrtl
+ libc.src.__support.math.f16sub
+ libc.src.__support.math.f16subf
+ libc.src.__support.math.f16subf128
+ libc.src.__support.math.f16subl
+ libc.src.__support.math.fabs
+ libc.src.__support.math.fabsbf16
+ libc.src.__support.math.fabsf
+ libc.src.__support.math.fabsf128
+ libc.src.__support.math.fabsf16
+ libc.src.__support.math.fabsl
+ libc.src.__support.math.fadd
+ libc.src.__support.math.faddf128
+ libc.src.__support.math.faddl
+ libc.src.__support.math.fdim
+ libc.src.__support.math.fdimbf16
+ libc.src.__support.math.fdimf
+ libc.src.__support.math.fdimf128
+ libc.src.__support.math.fdimf16
+ libc.src.__support.math.fdiml
+ libc.src.__support.math.fdiv
+ libc.src.__support.math.fdivf128
+ libc.src.__support.math.fdivl
+ libc.src.__support.math.ffma
+ libc.src.__support.math.ffmaf128
+ libc.src.__support.math.ffmal
+ libc.src.__support.math.floor
+ libc.src.__support.math.floorbf16
+ libc.src.__support.math.floorf
+ libc.src.__support.math.floorf128
+ libc.src.__support.math.floorf16
+ libc.src.__support.math.floorl
+ libc.src.__support.math.fma
+ libc.src.__support.math.fmaf
+ libc.src.__support.math.fmaf16
+ libc.src.__support.math.fmabf16
+ libc.src.__support.math.fmax
+ libc.src.__support.math.fmaxbf16
+ libc.src.__support.math.fmaxf
+ libc.src.__support.math.fmaxf128
+ libc.src.__support.math.fmaxf16
+ libc.src.__support.math.fmaximum
+ libc.src.__support.math.fmaximum_mag
+ libc.src.__support.math.fmaximum_mag_num
+ libc.src.__support.math.fmaximum_mag_numbf16
+ libc.src.__support.math.fmaximum_mag_numf
+ libc.src.__support.math.fmaximum_mag_numf128
+ libc.src.__support.math.fmaximum_mag_numf16
+ libc.src.__support.math.fmaximum_mag_numl
+ libc.src.__support.math.fmaximum_magbf16
+ libc.src.__support.math.fmaximum_magf
+ libc.src.__support.math.fmaximum_magf128
+ libc.src.__support.math.fmaximum_magf16
+ libc.src.__support.math.fmaximum_magl
+ libc.src.__support.math.fmaximum_num
+ libc.src.__support.math.fmaximum_numbf16
+ libc.src.__support.math.fmaximum_numf
+ libc.src.__support.math.fmaximum_numf128
+ libc.src.__support.math.fmaximum_numf16
+ libc.src.__support.math.fmaximum_numl
+ libc.src.__support.math.fmaximumbf16
+ libc.src.__support.math.fmaximumf
+ libc.src.__support.math.fmaximumf128
+ libc.src.__support.math.fmaximumf16
+ libc.src.__support.math.fmaximuml
+ libc.src.__support.math.fmaxl
+ libc.src.__support.math.fmin
+ libc.src.__support.math.fminbf16
+ libc.src.__support.math.fminf
+ libc.src.__support.math.fminf128
+ libc.src.__support.math.fminf16
+ libc.src.__support.math.fminimum
+ libc.src.__support.math.fminimum_mag
+ libc.src.__support.math.fminimum_mag_num
+ libc.src.__support.math.fminimum_mag_numbf16
+ libc.src.__support.math.fminimum_mag_numf
+ libc.src.__support.math.fminimum_mag_numf128
+ libc.src.__support.math.fminimum_mag_numf16
+ libc.src.__support.math.fminimum_mag_numl
+ libc.src.__support.math.fminimum_magbf16
+ libc.src.__support.math.fminimum_magf
+ libc.src.__support.math.fminimum_magf128
+ libc.src.__support.math.fminimum_magf16
+ libc.src.__support.math.fminimum_magl
+ libc.src.__support.math.fminimum_num
+ libc.src.__support.math.fminimum_numbf16
+ libc.src.__support.math.fminimum_numf
+ libc.src.__support.math.fminimum_numf128
+ libc.src.__support.math.fminimum_numf16
+ libc.src.__support.math.fminimum_numl
+ libc.src.__support.math.fminimumbf16
+ libc.src.__support.math.fminimumf
+ libc.src.__support.math.fminimumf128
+ libc.src.__support.math.fminimumf16
+ libc.src.__support.math.fminimuml
+ libc.src.__support.math.fminl
+ libc.src.__support.math.fmod
+ libc.src.__support.math.fmodbf16
+ libc.src.__support.math.fmodf
+ libc.src.__support.math.fmodf128
+ libc.src.__support.math.fmodf16
+ libc.src.__support.math.fmodl
+ libc.src.__support.math.fmul
+ libc.src.__support.math.fmulf128
+ libc.src.__support.math.fmull
+ libc.src.__support.math.frexp
+ libc.src.__support.math.frexpbf16
+ libc.src.__support.math.frexpf
+ libc.src.__support.math.frexpf128
+ libc.src.__support.math.frexpf16
+ libc.src.__support.math.frexpl
+ libc.src.__support.math.fromfp
+ libc.src.__support.math.fromfpbf16
+ libc.src.__support.math.fromfpf
+ libc.src.__support.math.fromfpf128
+ libc.src.__support.math.fromfpf16
+ libc.src.__support.math.fromfpl
+ libc.src.__support.math.fromfpx
+ libc.src.__support.math.fromfpxbf16
+ libc.src.__support.math.fromfpxf
+ libc.src.__support.math.fromfpxf128
+ libc.src.__support.math.fromfpxf16
+ libc.src.__support.math.fromfpxl
+ libc.src.__support.math.fsqrt
+ libc.src.__support.math.fsqrtf128
+ libc.src.__support.math.fsqrtl
+ libc.src.__support.math.fsub
+ libc.src.__support.math.fsubf128
+ libc.src.__support.math.fsubl
+ libc.src.__support.math.getpayload
+ libc.src.__support.math.getpayloadbf16
+ libc.src.__support.math.getpayloadf
+ libc.src.__support.math.getpayloadf128
+ libc.src.__support.math.getpayloadf16
+ libc.src.__support.math.getpayloadl
+ libc.src.__support.math.hypot
+ libc.src.__support.math.hypotf
+ libc.src.__support.math.hypotbf16
+ libc.src.__support.math.hypotf16
+ libc.src.__support.math.ilogb
+ libc.src.__support.math.ilogbbf16
+ libc.src.__support.math.ilogbf
+ libc.src.__support.math.ilogbf16
+ libc.src.__support.math.ilogbf128
+ libc.src.__support.math.ilogbl
+ libc.src.__support.math.iscanonical
+ libc.src.__support.math.iscanonicalbf16
+ libc.src.__support.math.iscanonicalf
+ libc.src.__support.math.iscanonicalf128
+ libc.src.__support.math.iscanonicalf16
+ libc.src.__support.math.iscanonicall
+ libc.src.__support.math.isnan
+ libc.src.__support.math.isnanf
+ libc.src.__support.math.isnanf128
+ libc.src.__support.math.isnanf16
+ libc.src.__support.math.isnanl
+ libc.src.__support.math.issignaling
+ libc.src.__support.math.issignalingbf16
+ libc.src.__support.math.issignalingf
+ libc.src.__support.math.issignalingf128
+ libc.src.__support.math.issignalingf16
+ libc.src.__support.math.issignalingl
+ libc.src.__support.math.ldexp
+ libc.src.__support.math.ldexpbf16
+ libc.src.__support.math.ldexpf
+ libc.src.__support.math.ldexpl
+ libc.src.__support.math.llogb
+ libc.src.__support.math.llogbbf16
+ libc.src.__support.math.llrint
+ libc.src.__support.math.llrintbf16
+ libc.src.__support.math.llrintf
+ libc.src.__support.math.llrintf128
+ libc.src.__support.math.llrintf16
+ libc.src.__support.math.llrintl
+ libc.src.__support.math.llround
+ libc.src.__support.math.llroundbf16
+ libc.src.__support.math.llroundf
+ libc.src.__support.math.llroundf128
+ libc.src.__support.math.llroundf16
+ libc.src.__support.math.llroundl
+ libc.src.__support.math.log
+ libc.src.__support.math.log10
+ libc.src.__support.math.log10f16
+ libc.src.__support.math.log10p1f16
+ libc.src.__support.math.log10f
+ libc.src.__support.math.log1p
+ libc.src.__support.math.log1pf
+ libc.src.__support.math.log2
+ libc.src.__support.math.logb
+ libc.src.__support.math.log2f
+ libc.src.__support.math.log2f16
+ libc.src.__support.math.log2p1f16
+ libc.src.__support.math.logbf
+ libc.src.__support.math.logbbf16
+ libc.src.__support.math.logbf128
+ libc.src.__support.math.logbf16
+ libc.src.__support.math.logf
+ libc.src.__support.math.log_bf16
+ libc.src.__support.math.ldexpf
+ libc.src.__support.math.ldexpf128
+ libc.src.__support.math.ldexpf16
+ libc.src.__support.math.lgammaf16
+ libc.src.__support.math.llogbf
+ libc.src.__support.math.llogbf128
+ libc.src.__support.math.llogbf16
+ libc.src.__support.math.logbl
+ libc.src.__support.math.logf16
+ libc.src.__support.math.llogbl
+ libc.src.__support.math.lrint
+ libc.src.__support.math.lrintbf16
+ libc.src.__support.math.lrintf
+ libc.src.__support.math.lrintf128
+ libc.src.__support.math.lrintf16
+ libc.src.__support.math.lrintl
+ libc.src.__support.math.lround
+ libc.src.__support.math.lroundbf16
+ libc.src.__support.math.lroundf
+ libc.src.__support.math.lroundf128
+ libc.src.__support.math.lroundf16
+ libc.src.__support.math.lroundl
+ libc.src.__support.math.modf
+ libc.src.__support.math.modfbf16
+ libc.src.__support.math.modff
+ libc.src.__support.math.modff128
+ libc.src.__support.math.modff16
+ libc.src.__support.math.modfl
+ libc.src.__support.math.nan
+ libc.src.__support.math.nanbf16
+ libc.src.__support.math.nanf
+ libc.src.__support.math.nanf128
+ libc.src.__support.math.nanf16
+ libc.src.__support.math.nanl
+ libc.src.__support.math.nearbyint
+ libc.src.__support.math.nearbyintbf16
+ libc.src.__support.math.nearbyintf
+ libc.src.__support.math.nearbyintf128
+ libc.src.__support.math.nearbyintf16
+ libc.src.__support.math.nearbyintl
+ libc.src.__support.math.nextdown
+ libc.src.__support.math.nextdownbf16
+ libc.src.__support.math.nextdownf
+ libc.src.__support.math.nextdownf128
+ libc.src.__support.math.nextdownf16
+ libc.src.__support.math.nextdownl
+ libc.src.__support.math.nextup
+ libc.src.__support.math.nextupbf16
+ libc.src.__support.math.nextupf
+ libc.src.__support.math.nextupf128
+ libc.src.__support.math.nextupf16
+ libc.src.__support.math.nextupl
+ libc.src.__support.math.nexttoward
+ libc.src.__support.math.nexttowardbf16
+ libc.src.__support.math.nexttowardf
+ libc.src.__support.math.nexttowardf16
+ libc.src.__support.math.nexttowardl
+ libc.src.__support.math.nextafter
+ libc.src.__support.math.nextafterbf16
+ libc.src.__support.math.nextafterf
+ libc.src.__support.math.nextafterf16
+ libc.src.__support.math.nextafterl
+ libc.src.__support.math.nextafterf128
+ libc.src.__support.math.pow
+ libc.src.__support.math.powf
+ libc.src.__support.math.remainder
+ libc.src.__support.math.remainderbf16
+ libc.src.__support.math.remainderf
+ libc.src.__support.math.remainderf128
+ libc.src.__support.math.remainderf16
+ libc.src.__support.math.remainderl
+ libc.src.__support.math.remquo
+ libc.src.__support.math.remquobf16
+ libc.src.__support.math.remquof
+ libc.src.__support.math.remquof128
+ libc.src.__support.math.remquof16
+ libc.src.__support.math.remquol
+ libc.src.__support.math.rint
+ libc.src.__support.math.rintbf16
+ libc.src.__support.math.rintf
+ libc.src.__support.math.rintf128
+ libc.src.__support.math.rintf16
+ libc.src.__support.math.rintl
+ libc.src.__support.math.round
+ libc.src.__support.math.roundbf16
+ libc.src.__support.math.roundeven
+ libc.src.__support.math.roundevenbf16
+ libc.src.__support.math.roundevenf
+ libc.src.__support.math.roundevenf128
+ libc.src.__support.math.roundevenf16
+ libc.src.__support.math.roundevenl
+ libc.src.__support.math.roundf
+ libc.src.__support.math.roundf128
+ libc.src.__support.math.roundf16
+ libc.src.__support.math.roundl
+ libc.src.__support.math.rsqrtf
+ libc.src.__support.math.rsqrtf16
+ libc.src.__support.math.scalbln
+ libc.src.__support.math.scalblnbf16
+ libc.src.__support.math.scalblnf
+ libc.src.__support.math.scalblnf128
+ libc.src.__support.math.scalblnf16
+ libc.src.__support.math.scalblnl
+ libc.src.__support.math.scalbn
+ libc.src.__support.math.scalbnbf16
+ libc.src.__support.math.scalbnf
+ libc.src.__support.math.scalbnf128
+ libc.src.__support.math.scalbnf16
+ libc.src.__support.math.scalbnl
+ libc.src.__support.math.setpayload
+ libc.src.__support.math.setpayloadbf16
+ libc.src.__support.math.setpayloadf
+ libc.src.__support.math.setpayloadf128
+ libc.src.__support.math.setpayloadf16
+ libc.src.__support.math.setpayloadl
+ libc.src.__support.math.setpayloadsig
+ libc.src.__support.math.setpayloadsigbf16
+ libc.src.__support.math.setpayloadsigf
+ libc.src.__support.math.setpayloadsigf128
+ libc.src.__support.math.setpayloadsigf16
+ libc.src.__support.math.setpayloadsigl
+ libc.src.__support.math.sqrtf16
+ libc.src.__support.math.sin
+ libc.src.__support.math.sincos
+ libc.src.__support.math.sincosf
+ libc.src.__support.math.sinf
+ libc.src.__support.math.sinf16
+ libc.src.__support.math.sinhf
+ libc.src.__support.math.sinhf16
+ libc.src.__support.math.sqrtf128
+ libc.src.__support.math.sinpif
+ libc.src.__support.math.sinpif16
+ libc.src.__support.math.sqrt
+ libc.src.__support.math.sqrtbf16
+ libc.src.__support.math.sqrtf
+ libc.src.__support.math.sqrtl
+ libc.src.__support.math.tan
+ libc.src.__support.math.tanbf16
+ libc.src.__support.math.tanf
+ libc.src.__support.math.tanf16
+ libc.src.__support.math.tanhf
+ libc.src.__support.math.tanhf16
+ libc.src.__support.math.tanpif
+ libc.src.__support.math.tanpif16
+ libc.src.__support.math.trunc
+ libc.src.__support.math.truncbf16
+ libc.src.__support.math.truncf
+ libc.src.__support.math.truncf128
+ libc.src.__support.math.truncf16
+ libc.src.__support.math.truncl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
+ libc.src.__support.math.totalorder
+ libc.src.__support.math.totalorderbf16
+ libc.src.__support.math.totalorderf
+ libc.src.__support.math.totalorderf128
+ libc.src.__support.math.totalorderf16
+ libc.src.__support.math.totalorderl
+ libc.src.__support.math.totalordermag
+ libc.src.__support.math.totalordermagbf16
+ libc.src.__support.math.totalordermagf
+ libc.src.__support.math.totalordermagf128
+ libc.src.__support.math.totalordermagf16
+ libc.src.__support.math.totalordermagl
+ )
-add_fp_unittest(
- shared_math_constexpr_test
- SUITE
- libc-shared-tests
- SRCS
- shared_math_constexpr_test.cpp
- DEPENDS
- libc.src.__support.FPUtil.float128
- libc.src.__support.math.asinbf16
- libc.src.__support.math.bf16subl
- libc.src.__support.math.canonicalize
- libc.src.__support.math.canonicalizebf16
- libc.src.__support.math.canonicalizef
- libc.src.__support.math.canonicalizef128
- libc.src.__support.math.canonicalizef16
- libc.src.__support.math.canonicalizel
- libc.src.__support.math.ceil
- libc.src.__support.math.ceilbf16
- libc.src.__support.math.ceilf
- libc.src.__support.math.ceilf128
- libc.src.__support.math.ceilf16
- libc.src.__support.math.ceill
- libc.src.__support.math.copysign
- libc.src.__support.math.copysignbf16
- libc.src.__support.math.copysignf
- libc.src.__support.math.copysignf128
- libc.src.__support.math.copysignf16
- libc.src.__support.math.copysignl
- libc.src.__support.math.ddivf128
- libc.src.__support.math.ddivl
- libc.src.__support.math.dmulf128
- libc.src.__support.math.dmull
- libc.src.__support.math.dsqrtf128
- libc.src.__support.math.f16add
- libc.src.__support.math.f16addf
- libc.src.__support.math.f16addf128
- libc.src.__support.math.f16addl
- libc.src.__support.math.fadd
- libc.src.__support.math.faddf128
- libc.src.__support.math.faddl
- libc.src.__support.math.fdim
- libc.src.__support.math.fdimbf16
- libc.src.__support.math.fdimf
- libc.src.__support.math.fdimf128
- libc.src.__support.math.fdimf16
- libc.src.__support.math.fdiml
- libc.src.__support.math.fdiv
- libc.src.__support.math.fdivf128
- libc.src.__support.math.fdivl
- libc.src.__support.math.floor
- libc.src.__support.math.floorbf16
- libc.src.__support.math.floorf
- libc.src.__support.math.floorf128
- libc.src.__support.math.floorf16
- libc.src.__support.math.floorl
- libc.src.__support.math.fabs
- libc.src.__support.math.fabsbf16
- libc.src.__support.math.fabsf
- libc.src.__support.math.fabsf128
- libc.src.__support.math.fabsf16
- libc.src.__support.math.fabsl
- libc.src.__support.math.fmaximum
- libc.src.__support.math.fmaximum_mag
- libc.src.__support.math.fmaximum_mag_num
- libc.src.__support.math.fmaximum_mag_numbf16
- libc.src.__support.math.fmaximum_mag_numf
- libc.src.__support.math.fmaximum_mag_numf128
- libc.src.__support.math.fmaximum_mag_numf16
- libc.src.__support.math.fmaximum_mag_numl
- libc.src.__support.math.fmaximum_magbf16
- libc.src.__support.math.fmaximum_magf
- libc.src.__support.math.fmaximum_magf128
- libc.src.__support.math.fmaximum_magf16
- libc.src.__support.math.fmaximum_magl
- libc.src.__support.math.fmaximum_num
- libc.src.__support.math.fmaximum_numbf16
- libc.src.__support.math.fmaximum_numf
- libc.src.__support.math.fmaximum_numf128
- libc.src.__support.math.fmaximum_numf16
- libc.src.__support.math.fmaximum_numl
- libc.src.__support.math.fmaximumbf16
- libc.src.__support.math.fmaximumf
- libc.src.__support.math.fmaximumf128
- libc.src.__support.math.fmaximumf16
- libc.src.__support.math.fmaximuml
- libc.src.__support.math.fmin
- libc.src.__support.math.fminbf16
- libc.src.__support.math.fminf
- libc.src.__support.math.fminf128
- libc.src.__support.math.fminf16
- libc.src.__support.math.fminimum
- libc.src.__support.math.fminimum_mag
- libc.src.__support.math.fminimum_mag_num
- libc.src.__support.math.fminimum_mag_numbf16
- libc.src.__support.math.fminimum_mag_numf
- libc.src.__support.math.fminimum_mag_numf128
- libc.src.__support.math.fminimum_mag_numf16
- libc.src.__support.math.fminimum_mag_numl
- libc.src.__support.math.fminimum_magbf16
- libc.src.__support.math.fminimum_magf
- libc.src.__support.math.fminimum_magf128
- libc.src.__support.math.fminimum_magf16
- libc.src.__support.math.fminimum_magl
- libc.src.__support.math.fminimum_num
- libc.src.__support.math.fminimum_numbf16
- libc.src.__support.math.fminimum_numf
- libc.src.__support.math.fminimum_numf128
- libc.src.__support.math.fminimum_numf16
- libc.src.__support.math.fminimum_numl
- libc.src.__support.math.fminimumbf16
- libc.src.__support.math.fminimumf
- libc.src.__support.math.fminimumf128
- libc.src.__support.math.fminimumf16
- libc.src.__support.math.fminimuml
- libc.src.__support.math.fminl
- libc.src.__support.math.fmod
- libc.src.__support.math.fmodbf16
- libc.src.__support.math.fmodf
- libc.src.__support.math.fmodf128
- libc.src.__support.math.fmodf16
- libc.src.__support.math.fmodl
- libc.src.__support.math.fmul
- libc.src.__support.math.fmulf128
- libc.src.__support.math.fmull
- libc.src.__support.math.frexp
- libc.src.__support.math.frexpbf16
- libc.src.__support.math.frexpl
- libc.src.__support.math.fromfp
- libc.src.__support.math.fromfpbf16
- libc.src.__support.math.fromfpf
- libc.src.__support.math.fromfpf128
- libc.src.__support.math.fromfpf16
- libc.src.__support.math.fromfpl
- libc.src.__support.math.fromfpx
- libc.src.__support.math.fromfpxbf16
- libc.src.__support.math.fromfpxf
- libc.src.__support.math.fromfpxf128
- libc.src.__support.math.fromfpxf16
- libc.src.__support.math.fromfpxl
- libc.src.__support.math.fsub
- libc.src.__support.math.fsubf128
- libc.src.__support.math.fsubl
- libc.src.__support.math.getpayload
- libc.src.__support.math.getpayloadbf16
- libc.src.__support.math.getpayloadf
- libc.src.__support.math.getpayloadf128
- libc.src.__support.math.getpayloadf16
- libc.src.__support.math.getpayloadl
- libc.src.__support.math.iscanonical
- libc.src.__support.math.iscanonicalbf16
- libc.src.__support.math.iscanonicalf
- libc.src.__support.math.iscanonicalf128
- libc.src.__support.math.iscanonicalf16
- libc.src.__support.math.iscanonicall
- libc.src.__support.math.isnan
- libc.src.__support.math.isnanf
- libc.src.__support.math.isnanf128
- libc.src.__support.math.isnanf16
- libc.src.__support.math.isnanl
- libc.src.__support.math.issignaling
- libc.src.__support.math.issignalingbf16
- libc.src.__support.math.issignalingf
- libc.src.__support.math.issignalingf128
- libc.src.__support.math.issignalingf16
- libc.src.__support.math.issignalingl
- libc.src.__support.math.ldexp
- libc.src.__support.math.ldexpbf16
- libc.src.__support.math.ldexpl
- libc.src.__support.math.llogbbf16
- libc.src.__support.math.llrint
- libc.src.__support.math.llrintbf16
- libc.src.__support.math.llrintf
- libc.src.__support.math.llrintf128
- libc.src.__support.math.llrintf16
- libc.src.__support.math.llrintl
- libc.src.__support.math.llround
- libc.src.__support.math.llroundbf16
- libc.src.__support.math.llroundf
- libc.src.__support.math.llroundf128
- libc.src.__support.math.llroundf16
- libc.src.__support.math.llroundl
- libc.src.__support.math.log
- libc.src.__support.math.logbbf16
- libc.src.__support.math.ilogbbf16
- libc.src.__support.math.lrint
- libc.src.__support.math.lrintbf16
- libc.src.__support.math.lrintf
- libc.src.__support.math.lrintf128
- libc.src.__support.math.lrintf16
- libc.src.__support.math.lrintl
- libc.src.__support.math.lround
- libc.src.__support.math.lroundbf16
- libc.src.__support.math.lroundf
- libc.src.__support.math.lroundf128
- libc.src.__support.math.lroundf16
- libc.src.__support.math.lroundl
- libc.src.__support.math.modf
- libc.src.__support.math.modfbf16
- libc.src.__support.math.modff
- libc.src.__support.math.modff128
- libc.src.__support.math.modff16
- libc.src.__support.math.modfl
- libc.src.__support.math.nan
- libc.src.__support.math.nanbf16
- libc.src.__support.math.nanf
- libc.src.__support.math.nanf128
- libc.src.__support.math.nanf16
- libc.src.__support.math.nanl
- libc.src.__support.math.nearbyint
- libc.src.__support.math.nearbyintbf16
- libc.src.__support.math.nearbyintf
- libc.src.__support.math.nearbyintf128
- libc.src.__support.math.nearbyintf16
- libc.src.__support.math.nearbyintl
- libc.src.__support.math.nextafter
- libc.src.__support.math.nextafterbf16
- libc.src.__support.math.nextafterf
- libc.src.__support.math.nextafterf16
- libc.src.__support.math.nextafterl
- libc.src.__support.math.nextafterf128
- libc.src.__support.math.remainder
- libc.src.__support.math.remainderbf16
- libc.src.__support.math.remainderf
- libc.src.__support.math.remainderf128
- libc.src.__support.math.remainderf16
- libc.src.__support.math.remainderl
- libc.src.__support.math.remquo
- libc.src.__support.math.remquobf16
- libc.src.__support.math.remquof
- libc.src.__support.math.remquof128
- libc.src.__support.math.remquof16
- libc.src.__support.math.remquol
- libc.src.__support.math.rint
- libc.src.__support.math.rintbf16
- libc.src.__support.math.rintf
- libc.src.__support.math.rintf128
- libc.src.__support.math.rintf16
- libc.src.__support.math.rintl
- libc.src.__support.math.round
- libc.src.__support.math.roundbf16
- libc.src.__support.math.roundeven
- libc.src.__support.math.roundevenbf16
- libc.src.__support.math.roundevenf
- libc.src.__support.math.roundevenf128
- libc.src.__support.math.roundevenf16
- libc.src.__support.math.roundevenl
- libc.src.__support.math.roundf
- libc.src.__support.math.roundf128
- libc.src.__support.math.roundf16
- libc.src.__support.math.roundl
- libc.src.__support.math.scalbln
- libc.src.__support.math.scalblnbf16
- libc.src.__support.math.scalblnf
- libc.src.__support.math.scalblnf128
- libc.src.__support.math.scalblnf16
- libc.src.__support.math.scalblnl
- libc.src.__support.math.scalbn
- libc.src.__support.math.scalbnbf16
- libc.src.__support.math.scalbnf
- libc.src.__support.math.scalbnf128
- libc.src.__support.math.scalbnf16
- libc.src.__support.math.scalbnl
- libc.src.__support.math.setpayload
- libc.src.__support.math.setpayloadbf16
- libc.src.__support.math.setpayloadf
- libc.src.__support.math.setpayloadf128
- libc.src.__support.math.setpayloadf16
- libc.src.__support.math.setpayloadl
- libc.src.__support.math.sqrtl
- libc.src.__support.math.trunc
- libc.src.__support.math.truncbf16
- libc.src.__support.math.truncf
- libc.src.__support.math.truncf128
- libc.src.__support.math.truncf16
- libc.src.__support.math.truncl
- libc.src.__support.math.ufromfp
- libc.src.__support.math.ufromfpbf16
- libc.src.__support.math.ufromfpf
- libc.src.__support.math.ufromfpf128
- libc.src.__support.math.ufromfpf16
- libc.src.__support.math.ufromfpl
- libc.src.__support.math.ufromfpx
- libc.src.__support.math.ufromfpxbf16
- libc.src.__support.math.ufromfpxf
- libc.src.__support.math.ufromfpxf128
- libc.src.__support.math.ufromfpxf16
- libc.src.__support.math.ufromfpxl
- libc.src.__support.math.totalorder
- libc.src.__support.math.totalorderbf16
- libc.src.__support.math.totalorderf
- libc.src.__support.math.totalorderf128
- libc.src.__support.math.totalorderf16
- libc.src.__support.math.totalorderl
- libc.src.__support.math.totalordermag
- libc.src.__support.math.totalordermagbf16
- libc.src.__support.math.totalordermagf
- libc.src.__support.math.totalordermagf128
- libc.src.__support.math.totalordermagf16
- libc.src.__support.math.totalordermagl
-)
-endif() # LIBC_TEST_SKIP_SHARED_MATH_TESTS
+ add_fp_unittest(
+ shared_math_constexpr_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_math_constexpr_test.cpp
+ DEPENDS
+ libc.src.__support.FPUtil.float128
+ libc.src.__support.math.asinbf16
+ libc.src.__support.math.bf16subl
+ libc.src.__support.math.canonicalize
+ libc.src.__support.math.canonicalizebf16
+ libc.src.__support.math.canonicalizef
+ libc.src.__support.math.canonicalizef128
+ libc.src.__support.math.canonicalizef16
+ libc.src.__support.math.canonicalizel
+ libc.src.__support.math.ceil
+ libc.src.__support.math.ceilbf16
+ libc.src.__support.math.ceilf
+ libc.src.__support.math.ceilf128
+ libc.src.__support.math.ceilf16
+ libc.src.__support.math.ceill
+ libc.src.__support.math.copysign
+ libc.src.__support.math.copysignbf16
+ libc.src.__support.math.copysignf
+ libc.src.__support.math.copysignf128
+ libc.src.__support.math.copysignf16
+ libc.src.__support.math.copysignl
+ libc.src.__support.math.ddivf128
+ libc.src.__support.math.ddivl
+ libc.src.__support.math.dmulf128
+ libc.src.__support.math.dmull
+ libc.src.__support.math.dsqrtf128
+ libc.src.__support.math.f16add
+ libc.src.__support.math.f16addf
+ libc.src.__support.math.f16addf128
+ libc.src.__support.math.f16addl
+ libc.src.__support.math.fadd
+ libc.src.__support.math.faddf128
+ libc.src.__support.math.faddl
+ libc.src.__support.math.fdim
+ libc.src.__support.math.fdimbf16
+ libc.src.__support.math.fdimf
+ libc.src.__support.math.fdimf128
+ libc.src.__support.math.fdimf16
+ libc.src.__support.math.fdiml
+ libc.src.__support.math.fdiv
+ libc.src.__support.math.fdivf128
+ libc.src.__support.math.fdivl
+ libc.src.__support.math.floor
+ libc.src.__support.math.floorbf16
+ libc.src.__support.math.floorf
+ libc.src.__support.math.floorf128
+ libc.src.__support.math.floorf16
+ libc.src.__support.math.floorl
+ libc.src.__support.math.fabs
+ libc.src.__support.math.fabsbf16
+ libc.src.__support.math.fabsf
+ libc.src.__support.math.fabsf128
+ libc.src.__support.math.fabsf16
+ libc.src.__support.math.fabsl
+ libc.src.__support.math.fmaximum
+ libc.src.__support.math.fmaximum_mag
+ libc.src.__support.math.fmaximum_mag_num
+ libc.src.__support.math.fmaximum_mag_numbf16
+ libc.src.__support.math.fmaximum_mag_numf
+ libc.src.__support.math.fmaximum_mag_numf128
+ libc.src.__support.math.fmaximum_mag_numf16
+ libc.src.__support.math.fmaximum_mag_numl
+ libc.src.__support.math.fmaximum_magbf16
+ libc.src.__support.math.fmaximum_magf
+ libc.src.__support.math.fmaximum_magf128
+ libc.src.__support.math.fmaximum_magf16
+ libc.src.__support.math.fmaximum_magl
+ libc.src.__support.math.fmaximum_num
+ libc.src.__support.math.fmaximum_numbf16
+ libc.src.__support.math.fmaximum_numf
+ libc.src.__support.math.fmaximum_numf128
+ libc.src.__support.math.fmaximum_numf16
+ libc.src.__support.math.fmaximum_numl
+ libc.src.__support.math.fmaximumbf16
+ libc.src.__support.math.fmaximumf
+ libc.src.__support.math.fmaximumf128
+ libc.src.__support.math.fmaximumf16
+ libc.src.__support.math.fmaximuml
+ libc.src.__support.math.fmin
+ libc.src.__support.math.fminbf16
+ libc.src.__support.math.fminf
+ libc.src.__support.math.fminf128
+ libc.src.__support.math.fminf16
+ libc.src.__support.math.fminimum
+ libc.src.__support.math.fminimum_mag
+ libc.src.__support.math.fminimum_mag_num
+ libc.src.__support.math.fminimum_mag_numbf16
+ libc.src.__support.math.fminimum_mag_numf
+ libc.src.__support.math.fminimum_mag_numf128
+ libc.src.__support.math.fminimum_mag_numf16
+ libc.src.__support.math.fminimum_mag_numl
+ libc.src.__support.math.fminimum_magbf16
+ libc.src.__support.math.fminimum_magf
+ libc.src.__support.math.fminimum_magf128
+ libc.src.__support.math.fminimum_magf16
+ libc.src.__support.math.fminimum_magl
+ libc.src.__support.math.fminimum_num
+ libc.src.__support.math.fminimum_numbf16
+ libc.src.__support.math.fminimum_numf
+ libc.src.__support.math.fminimum_numf128
+ libc.src.__support.math.fminimum_numf16
+ libc.src.__support.math.fminimum_numl
+ libc.src.__support.math.fminimumbf16
+ libc.src.__support.math.fminimumf
+ libc.src.__support.math.fminimumf128
+ libc.src.__support.math.fminimumf16
+ libc.src.__support.math.fminimuml
+ libc.src.__support.math.fminl
+ libc.src.__support.math.fmod
+ libc.src.__support.math.fmodbf16
+ libc.src.__support.math.fmodf
+ libc.src.__support.math.fmodf128
+ libc.src.__support.math.fmodf16
+ libc.src.__support.math.fmodl
+ libc.src.__support.math.fmul
+ libc.src.__support.math.fmulf128
+ libc.src.__support.math.fmull
+ libc.src.__support.math.frexp
+ libc.src.__support.math.frexpbf16
+ libc.src.__support.math.frexpl
+ libc.src.__support.math.fromfp
+ libc.src.__support.math.fromfpbf16
+ libc.src.__support.math.fromfpf
+ libc.src.__support.math.fromfpf128
+ libc.src.__support.math.fromfpf16
+ libc.src.__support.math.fromfpl
+ libc.src.__support.math.fromfpx
+ libc.src.__support.math.fromfpxbf16
+ libc.src.__support.math.fromfpxf
+ libc.src.__support.math.fromfpxf128
+ libc.src.__support.math.fromfpxf16
+ libc.src.__support.math.fromfpxl
+ libc.src.__support.math.fsub
+ libc.src.__support.math.fsubf128
+ libc.src.__support.math.fsubl
+ libc.src.__support.math.getpayload
+ libc.src.__support.math.getpayloadbf16
+ libc.src.__support.math.getpayloadf
+ libc.src.__support.math.getpayloadf128
+ libc.src.__support.math.getpayloadf16
+ libc.src.__support.math.getpayloadl
+ libc.src.__support.math.iscanonical
+ libc.src.__support.math.iscanonicalbf16
+ libc.src.__support.math.iscanonicalf
+ libc.src.__support.math.iscanonicalf128
+ libc.src.__support.math.iscanonicalf16
+ libc.src.__support.math.iscanonicall
+ libc.src.__support.math.isnan
+ libc.src.__support.math.isnanf
+ libc.src.__support.math.isnanf128
+ libc.src.__support.math.isnanf16
+ libc.src.__support.math.isnanl
+ libc.src.__support.math.issignaling
+ libc.src.__support.math.issignalingbf16
+ libc.src.__support.math.issignalingf
+ libc.src.__support.math.issignalingf128
+ libc.src.__support.math.issignalingf16
+ libc.src.__support.math.issignalingl
+ libc.src.__support.math.ldexp
+ libc.src.__support.math.ldexpbf16
+ libc.src.__support.math.ldexpl
+ libc.src.__support.math.llogbbf16
+ libc.src.__support.math.llrint
+ libc.src.__support.math.llrintbf16
+ libc.src.__support.math.llrintf
+ libc.src.__support.math.llrintf128
+ libc.src.__support.math.llrintf16
+ libc.src.__support.math.llrintl
+ libc.src.__support.math.llround
+ libc.src.__support.math.llroundbf16
+ libc.src.__support.math.llroundf
+ libc.src.__support.math.llroundf128
+ libc.src.__support.math.llroundf16
+ libc.src.__support.math.llroundl
+ libc.src.__support.math.log
+ libc.src.__support.math.logbbf16
+ libc.src.__support.math.ilogbbf16
+ libc.src.__support.math.lrint
+ libc.src.__support.math.lrintbf16
+ libc.src.__support.math.lrintf
+ libc.src.__support.math.lrintf128
+ libc.src.__support.math.lrintf16
+ libc.src.__support.math.lrintl
+ libc.src.__support.math.lround
+ libc.src.__support.math.lroundbf16
+ libc.src.__support.math.lroundf
+ libc.src.__support.math.lroundf128
+ libc.src.__support.math.lroundf16
+ libc.src.__support.math.lroundl
+ libc.src.__support.math.modf
+ libc.src.__support.math.modfbf16
+ libc.src.__support.math.modff
+ libc.src.__support.math.modff128
+ libc.src.__support.math.modff16
+ libc.src.__support.math.modfl
+ libc.src.__support.math.nan
+ libc.src.__support.math.nanbf16
+ libc.src.__support.math.nanf
+ libc.src.__support.math.nanf128
+ libc.src.__support.math.nanf16
+ libc.src.__support.math.nanl
+ libc.src.__support.math.nearbyint
+ libc.src.__support.math.nearbyintbf16
+ libc.src.__support.math.nearbyintf
+ libc.src.__support.math.nearbyintf128
+ libc.src.__support.math.nearbyintf16
+ libc.src.__support.math.nearbyintl
+ libc.src.__support.math.nextafter
+ libc.src.__support.math.nextafterbf16
+ libc.src.__support.math.nextafterf
+ libc.src.__support.math.nextafterf16
+ libc.src.__support.math.nextafterl
+ libc.src.__support.math.nextafterf128
+ libc.src.__support.math.remainder
+ libc.src.__support.math.remainderbf16
+ libc.src.__support.math.remainderf
+ libc.src.__support.math.remainderf128
+ libc.src.__support.math.remainderf16
+ libc.src.__support.math.remainderl
+ libc.src.__support.math.remquo
+ libc.src.__support.math.remquobf16
+ libc.src.__support.math.remquof
+ libc.src.__support.math.remquof128
+ libc.src.__support.math.remquof16
+ libc.src.__support.math.remquol
+ libc.src.__support.math.rint
+ libc.src.__support.math.rintbf16
+ libc.src.__support.math.rintf
+ libc.src.__support.math.rintf128
+ libc.src.__support.math.rintf16
+ libc.src.__support.math.rintl
+ libc.src.__support.math.round
+ libc.src.__support.math.roundbf16
+ libc.src.__support.math.roundeven
+ libc.src.__support.math.roundevenbf16
+ libc.src.__support.math.roundevenf
+ libc.src.__support.math.roundevenf128
+ libc.src.__support.math.roundevenf16
+ libc.src.__support.math.roundevenl
+ libc.src.__support.math.roundf
+ libc.src.__support.math.roundf128
+ libc.src.__support.math.roundf16
+ libc.src.__support.math.roundl
+ libc.src.__support.math.scalbln
+ libc.src.__support.math.scalblnbf16
+ libc.src.__support.math.scalblnf
+ libc.src.__support.math.scalblnf128
+ libc.src.__support.math.scalblnf16
+ libc.src.__support.math.scalblnl
+ libc.src.__support.math.scalbn
+ libc.src.__support.math.scalbnbf16
+ libc.src.__support.math.scalbnf
+ libc.src.__support.math.scalbnf128
+ libc.src.__support.math.scalbnf16
+ libc.src.__support.math.scalbnl
+ libc.src.__support.math.setpayload
+ libc.src.__support.math.setpayloadbf16
+ libc.src.__support.math.setpayloadf
+ libc.src.__support.math.setpayloadf128
+ libc.src.__support.math.setpayloadf16
+ libc.src.__support.math.setpayloadl
+ libc.src.__support.math.sqrtl
+ libc.src.__support.math.trunc
+ libc.src.__support.math.truncbf16
+ libc.src.__support.math.truncf
+ libc.src.__support.math.truncf128
+ libc.src.__support.math.truncf16
+ libc.src.__support.math.truncl
+ libc.src.__support.math.ufromfp
+ libc.src.__support.math.ufromfpbf16
+ libc.src.__support.math.ufromfpf
+ libc.src.__support.math.ufromfpf128
+ libc.src.__support.math.ufromfpf16
+ libc.src.__support.math.ufromfpl
+ libc.src.__support.math.ufromfpx
+ libc.src.__support.math.ufromfpxbf16
+ libc.src.__support.math.ufromfpxf
+ libc.src.__support.math.ufromfpxf128
+ libc.src.__support.math.ufromfpxf16
+ libc.src.__support.math.ufromfpxl
+ libc.src.__support.math.totalorder
+ libc.src.__support.math.totalorderbf16
+ libc.src.__support.math.totalorderf
+ libc.src.__support.math.totalorderf128
+ libc.src.__support.math.totalorderf16
+ libc.src.__support.math.totalorderl
+ libc.src.__support.math.totalordermag
+ libc.src.__support.math.totalordermagbf16
+ libc.src.__support.math.totalordermagf
+ libc.src.__support.math.totalordermagf128
+ libc.src.__support.math.totalordermagf16
+ libc.src.__support.math.totalordermagl
+ )
+ endif() # LIBC_TEST_SKIP_SHARED_MATH_TESTS
-add_fp_unittest(
- shared_builtins_test
- SUITE
- libc-shared-tests
- SRCS
- shared_builtins_test.cpp
- DEPENDS
- libc.src.__support.builtins.adddf3
- libc.src.__support.builtins.addsf3
- libc.src.__support.builtins.addtf3
- libc.src.__support.builtins.divdf3
- libc.src.__support.builtins.divsf3
- libc.src.__support.builtins.divtf3
- libc.src.__support.builtins.extenddftf2
- libc.src.__support.builtins.extendsfdf2
- libc.src.__support.builtins.extendsftf2
- libc.src.__support.builtins.extendxftf2
- libc.src.__support.builtins.fixdfdi
- libc.src.__support.builtins.fixdfsi
- libc.src.__support.builtins.fixdfti
- libc.src.__support.builtins.fixsfdi
- libc.src.__support.builtins.fixsfsi
- libc.src.__support.builtins.fixsfti
- libc.src.__support.builtins.fixunsdfdi
- libc.src.__support.builtins.fixunsdfsi
- libc.src.__support.builtins.fixunsdfti
- libc.src.__support.builtins.fixunssfdi
- libc.src.__support.builtins.fixunssfsi
- libc.src.__support.builtins.fixunssfti
- libc.src.__support.builtins.floatdidf
- libc.src.__support.builtins.floatdisf
- libc.src.__support.builtins.floatsidf
- libc.src.__support.builtins.floatsisf
- libc.src.__support.builtins.floattidf
- libc.src.__support.builtins.floattisf
- libc.src.__support.builtins.floatundidf
- libc.src.__support.builtins.floatundisf
- libc.src.__support.builtins.floatunsidf
- libc.src.__support.builtins.floatunsisf
- libc.src.__support.builtins.floatuntidf
- libc.src.__support.builtins.floatuntisf
- libc.src.__support.builtins.muldf3
- libc.src.__support.builtins.mulsf3
- libc.src.__support.builtins.multf3
- libc.src.__support.builtins.negdf3
- libc.src.__support.builtins.negsf3
- libc.src.__support.builtins.subdf3
- libc.src.__support.builtins.subsf3
- libc.src.__support.builtins.subtf3
- libc.src.__support.builtins.truncdfsf2
- libc.src.__support.builtins.trunctfdf2
- libc.src.__support.builtins.trunctfsf2
- libc.src.__support.builtins.trunctfxf2
- libc.src.__support.uint128
-)
+ add_fp_unittest(
+ shared_builtins_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_builtins_test.cpp
+ DEPENDS
+ libc.src.__support.builtins.adddf3
+ libc.src.__support.builtins.addsf3
+ libc.src.__support.builtins.addtf3
+ libc.src.__support.builtins.divdf3
+ libc.src.__support.builtins.divsf3
+ libc.src.__support.builtins.divtf3
+ libc.src.__support.builtins.extenddftf2
+ libc.src.__support.builtins.extendsfdf2
+ libc.src.__support.builtins.extendsftf2
+ libc.src.__support.builtins.extendxftf2
+ libc.src.__support.builtins.fixdfdi
+ libc.src.__support.builtins.fixdfsi
+ libc.src.__support.builtins.fixdfti
+ libc.src.__support.builtins.fixsfdi
+ libc.src.__support.builtins.fixsfsi
+ libc.src.__support.builtins.fixsfti
+ libc.src.__support.builtins.fixunsdfdi
+ libc.src.__support.builtins.fixunsdfsi
+ libc.src.__support.builtins.fixunsdfti
+ libc.src.__support.builtins.fixunssfdi
+ libc.src.__support.builtins.fixunssfsi
+ libc.src.__support.builtins.fixunssfti
+ libc.src.__support.builtins.floatdidf
+ libc.src.__support.builtins.floatdisf
+ libc.src.__support.builtins.floatsidf
+ libc.src.__support.builtins.floatsisf
+ libc.src.__support.builtins.floattidf
+ libc.src.__support.builtins.floattisf
+ libc.src.__support.builtins.floatundidf
+ libc.src.__support.builtins.floatundisf
+ libc.src.__support.builtins.floatunsidf
+ libc.src.__support.builtins.floatunsisf
+ libc.src.__support.builtins.floatuntidf
+ libc.src.__support.builtins.floatuntisf
+ libc.src.__support.builtins.muldf3
+ libc.src.__support.builtins.mulsf3
+ libc.src.__support.builtins.multf3
+ libc.src.__support.builtins.negdf3
+ libc.src.__support.builtins.negsf3
+ libc.src.__support.builtins.subdf3
+ libc.src.__support.builtins.subsf3
+ libc.src.__support.builtins.subtf3
+ libc.src.__support.builtins.truncdfsf2
+ libc.src.__support.builtins.trunctfdf2
+ libc.src.__support.builtins.trunctfsf2
+ libc.src.__support.builtins.trunctfxf2
+ libc.src.__support.uint128
+ )
add_fp_unittest(
shared_str_to_num_test
>From 531414d62440299fd6e187ea9554f7fbc83adfa6 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 01:08:39 +0530
Subject: [PATCH 28/41] nit
---
libc/test/shared/CMakeLists.txt | 112 ++++++++++++++++----------------
1 file changed, 56 insertions(+), 56 deletions(-)
diff --git a/libc/test/shared/CMakeLists.txt b/libc/test/shared/CMakeLists.txt
index 68af6730b1a7e..74eda7cdaf065 100644
--- a/libc/test/shared/CMakeLists.txt
+++ b/libc/test/shared/CMakeLists.txt
@@ -821,63 +821,63 @@ else()
libc.src.__support.math.totalordermagf16
libc.src.__support.math.totalordermagl
)
- endif() # LIBC_TEST_SKIP_SHARED_MATH_TESTS
+endif() # LIBC_TEST_SKIP_SHARED_MATH_TESTS
- add_fp_unittest(
- shared_builtins_test
- SUITE
- libc-shared-tests
- SRCS
- shared_builtins_test.cpp
- DEPENDS
- libc.src.__support.builtins.adddf3
- libc.src.__support.builtins.addsf3
- libc.src.__support.builtins.addtf3
- libc.src.__support.builtins.divdf3
- libc.src.__support.builtins.divsf3
- libc.src.__support.builtins.divtf3
- libc.src.__support.builtins.extenddftf2
- libc.src.__support.builtins.extendsfdf2
- libc.src.__support.builtins.extendsftf2
- libc.src.__support.builtins.extendxftf2
- libc.src.__support.builtins.fixdfdi
- libc.src.__support.builtins.fixdfsi
- libc.src.__support.builtins.fixdfti
- libc.src.__support.builtins.fixsfdi
- libc.src.__support.builtins.fixsfsi
- libc.src.__support.builtins.fixsfti
- libc.src.__support.builtins.fixunsdfdi
- libc.src.__support.builtins.fixunsdfsi
- libc.src.__support.builtins.fixunsdfti
- libc.src.__support.builtins.fixunssfdi
- libc.src.__support.builtins.fixunssfsi
- libc.src.__support.builtins.fixunssfti
- libc.src.__support.builtins.floatdidf
- libc.src.__support.builtins.floatdisf
- libc.src.__support.builtins.floatsidf
- libc.src.__support.builtins.floatsisf
- libc.src.__support.builtins.floattidf
- libc.src.__support.builtins.floattisf
- libc.src.__support.builtins.floatundidf
- libc.src.__support.builtins.floatundisf
- libc.src.__support.builtins.floatunsidf
- libc.src.__support.builtins.floatunsisf
- libc.src.__support.builtins.floatuntidf
- libc.src.__support.builtins.floatuntisf
- libc.src.__support.builtins.muldf3
- libc.src.__support.builtins.mulsf3
- libc.src.__support.builtins.multf3
- libc.src.__support.builtins.negdf3
- libc.src.__support.builtins.negsf3
- libc.src.__support.builtins.subdf3
- libc.src.__support.builtins.subsf3
- libc.src.__support.builtins.subtf3
- libc.src.__support.builtins.truncdfsf2
- libc.src.__support.builtins.trunctfdf2
- libc.src.__support.builtins.trunctfsf2
- libc.src.__support.builtins.trunctfxf2
- libc.src.__support.uint128
- )
+add_fp_unittest(
+ shared_builtins_test
+ SUITE
+ libc-shared-tests
+ SRCS
+ shared_builtins_test.cpp
+ DEPENDS
+ libc.src.__support.builtins.adddf3
+ libc.src.__support.builtins.addsf3
+ libc.src.__support.builtins.addtf3
+ libc.src.__support.builtins.divdf3
+ libc.src.__support.builtins.divsf3
+ libc.src.__support.builtins.divtf3
+ libc.src.__support.builtins.extenddftf2
+ libc.src.__support.builtins.extendsfdf2
+ libc.src.__support.builtins.extendsftf2
+ libc.src.__support.builtins.extendxftf2
+ libc.src.__support.builtins.fixdfdi
+ libc.src.__support.builtins.fixdfsi
+ libc.src.__support.builtins.fixdfti
+ libc.src.__support.builtins.fixsfdi
+ libc.src.__support.builtins.fixsfsi
+ libc.src.__support.builtins.fixsfti
+ libc.src.__support.builtins.fixunsdfdi
+ libc.src.__support.builtins.fixunsdfsi
+ libc.src.__support.builtins.fixunsdfti
+ libc.src.__support.builtins.fixunssfdi
+ libc.src.__support.builtins.fixunssfsi
+ libc.src.__support.builtins.fixunssfti
+ libc.src.__support.builtins.floatdidf
+ libc.src.__support.builtins.floatdisf
+ libc.src.__support.builtins.floatsidf
+ libc.src.__support.builtins.floatsisf
+ libc.src.__support.builtins.floattidf
+ libc.src.__support.builtins.floattisf
+ libc.src.__support.builtins.floatundidf
+ libc.src.__support.builtins.floatundisf
+ libc.src.__support.builtins.floatunsidf
+ libc.src.__support.builtins.floatunsisf
+ libc.src.__support.builtins.floatuntidf
+ libc.src.__support.builtins.floatuntisf
+ libc.src.__support.builtins.muldf3
+ libc.src.__support.builtins.mulsf3
+ libc.src.__support.builtins.multf3
+ libc.src.__support.builtins.negdf3
+ libc.src.__support.builtins.negsf3
+ libc.src.__support.builtins.subdf3
+ libc.src.__support.builtins.subsf3
+ libc.src.__support.builtins.subtf3
+ libc.src.__support.builtins.truncdfsf2
+ libc.src.__support.builtins.trunctfdf2
+ libc.src.__support.builtins.trunctfsf2
+ libc.src.__support.builtins.trunctfxf2
+ libc.src.__support.uint128
+)
add_fp_unittest(
shared_str_to_num_test
>From e8760ed6cffd7b1521c801d97dd47d5fd77d9869 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 01:14:44 +0530
Subject: [PATCH 29/41] update guard
---
libc/src/math/generic/ceilf128.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index 7b5a9954d9b6a..a557d0d24629f 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -9,9 +9,9 @@
#include "src/math/ceilf128.h"
#include "src/__support/math/ceilf128.h"
-#ifndef LIBC_TYPES_HAS_FLOAT128
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
using float128 = LIBC_NAMESPACE::fputil::Float128;
-#endif // LIBC_TYPES_HAS_FLOAT128
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
namespace LIBC_NAMESPACE_DECL {
>From b7cc5e39018d1b2665125ee6e0b361eaf9aaccfe Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 01:19:15 +0530
Subject: [PATCH 30/41] udpate guards
---
libc/src/math/ceilf128.h | 4 ++--
libc/utils/MPFRWrapper/MPCommon.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index 6ad7dc7c8918d..c0e9dfdd54574 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -13,9 +13,9 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-#ifndef LIBC_TYPES_HAS_FLOAT128
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
using float128 = LIBC_NAMESPACE::fputil::Float128;
-#endif // LIBC_TYPES_HAS_FLOAT128
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 96e1d35b7777a..8d7c132281784 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -22,7 +22,7 @@ using LIBC_NAMESPACE::fputil::Float128;
#include "mpfr_inc.h"
-#ifdef LIBC_TYPES_HAS_FLOAT128
+#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
extern "C" {
int mpfr_set_float128(mpfr_ptr, float128, mpfr_rnd_t);
float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
>From aa8813b231883eaabc2f1a275b41d7c66380e124 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 02:58:01 +0530
Subject: [PATCH 31/41] test: arm
---
libc/config/linux/arm/entrypoints.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 2d517cb6cf20a..1adbb04bb4cbe 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -365,6 +365,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
>From 14f158e659867a2c12eda0bb737fd04e6a2f4844 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 03:16:20 +0530
Subject: [PATCH 32/41] add entrypoints
---
libc/config/darwin/x86_64/entrypoints.txt | 1 +
libc/config/gpu/amdgpu/entrypoints.txt | 1 +
libc/config/gpu/nvptx/entrypoints.txt | 1 +
libc/config/linux/riscv/entrypoints.txt | 1 +
libc/config/windows/entrypoints.txt | 1 +
5 files changed, 5 insertions(+)
diff --git a/libc/config/darwin/x86_64/entrypoints.txt b/libc/config/darwin/x86_64/entrypoints.txt
index 18184e8136a9e..136d5a458d484 100644
--- a/libc/config/darwin/x86_64/entrypoints.txt
+++ b/libc/config/darwin/x86_64/entrypoints.txt
@@ -123,6 +123,7 @@ set(TARGET_LIBM_ENTRYPOINTS
#libc.src.math.copysignl
#libc.src.math.ceil
#libc.src.math.ceilf
+ #libc.src.math.ceilf128
#libc.src.math.ceill
#libc.src.math.coshf
#libc.src.math.cosf
diff --git a/libc/config/gpu/amdgpu/entrypoints.txt b/libc/config/gpu/amdgpu/entrypoints.txt
index f94a6edd69759..12783aa4e5316 100644
--- a/libc/config/gpu/amdgpu/entrypoints.txt
+++ b/libc/config/gpu/amdgpu/entrypoints.txt
@@ -322,6 +322,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
diff --git a/libc/config/gpu/nvptx/entrypoints.txt b/libc/config/gpu/nvptx/entrypoints.txt
index 3c52dd8437daa..5820448e06663 100644
--- a/libc/config/gpu/nvptx/entrypoints.txt
+++ b/libc/config/gpu/nvptx/entrypoints.txt
@@ -318,6 +318,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index b807410fbb12b..a552bddd06b67 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -597,6 +597,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
diff --git a/libc/config/windows/entrypoints.txt b/libc/config/windows/entrypoints.txt
index 5333bc4042070..142b83e71efe6 100644
--- a/libc/config/windows/entrypoints.txt
+++ b/libc/config/windows/entrypoints.txt
@@ -166,6 +166,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.copysignl
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.cos
libc.src.math.cosf
>From f673aeed7bcf9448908bc1ef1948ac66b608404d Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Wed, 12 Aug 2026 13:58:09 +0530
Subject: [PATCH 33/41] chore: entrypoints
---
libc/config/baremetal/aarch64/entrypoints.txt | 2 +-
libc/config/baremetal/arm/entrypoints.txt | 2 +-
libc/config/baremetal/riscv/entrypoints.txt | 2 +-
libc/config/darwin/aarch64/entrypoints.txt | 2 +-
libc/config/freebsd/x86_64/entrypoints.txt | 2 +-
libc/config/linux/aarch64/entrypoints.txt | 2 +-
libc/config/linux/x86_64/entrypoints.txt | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libc/config/baremetal/aarch64/entrypoints.txt b/libc/config/baremetal/aarch64/entrypoints.txt
index 6c9733799f010..81958d224f70d 100644
--- a/libc/config/baremetal/aarch64/entrypoints.txt
+++ b/libc/config/baremetal/aarch64/entrypoints.txt
@@ -371,6 +371,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
@@ -732,7 +733,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
# math.h C23 _Float128 entrypoints
libc.src.math.atan2f128
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
diff --git a/libc/config/baremetal/arm/entrypoints.txt b/libc/config/baremetal/arm/entrypoints.txt
index a6b0dc50d0305..ee3ec63132cc2 100644
--- a/libc/config/baremetal/arm/entrypoints.txt
+++ b/libc/config/baremetal/arm/entrypoints.txt
@@ -383,6 +383,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
@@ -743,7 +744,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
# math.h C23 _Float128 entrypoints
libc.src.math.atan2f128
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
diff --git a/libc/config/baremetal/riscv/entrypoints.txt b/libc/config/baremetal/riscv/entrypoints.txt
index 4423bbad287e7..c9f7c042bf4a8 100644
--- a/libc/config/baremetal/riscv/entrypoints.txt
+++ b/libc/config/baremetal/riscv/entrypoints.txt
@@ -379,6 +379,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
@@ -740,7 +741,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
# math.h C23 _Float128 entrypoints
libc.src.math.atan2f128
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
diff --git a/libc/config/darwin/aarch64/entrypoints.txt b/libc/config/darwin/aarch64/entrypoints.txt
index 7e2f5d12a4ea5..0ca00419a916c 100644
--- a/libc/config/darwin/aarch64/entrypoints.txt
+++ b/libc/config/darwin/aarch64/entrypoints.txt
@@ -190,6 +190,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
@@ -552,7 +553,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
# math.h C23 _Float128 entrypoints
libc.src.math.atan2f128
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
diff --git a/libc/config/freebsd/x86_64/entrypoints.txt b/libc/config/freebsd/x86_64/entrypoints.txt
index 23ad71602708c..2223504718444 100644
--- a/libc/config/freebsd/x86_64/entrypoints.txt
+++ b/libc/config/freebsd/x86_64/entrypoints.txt
@@ -134,6 +134,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.copysignl
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.cos
libc.src.math.cosf
@@ -491,7 +492,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
libc.src.math.atan2f128
libc.src.math.atan2l
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index f1fc1fe67a268..1c6e3f54c35e9 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -528,6 +528,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
@@ -879,7 +880,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
# math.h C23 _Float128 entrypoints
libc.src.math.atan2f128
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 7ffb4f8d706f0..61c6cb3cad99f 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -602,6 +602,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.cbrtbf16
libc.src.math.ceil
libc.src.math.ceilf
+ libc.src.math.ceilf128
libc.src.math.ceill
libc.src.math.copysign
libc.src.math.copysignf
@@ -974,7 +975,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
libc.src.math.atan2f128
libc.src.math.atan2l
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
>From 44d9f552a4e5744e9b0b7a6afbb762dc1d5c23ef Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 13 Aug 2026 21:58:24 +0530
Subject: [PATCH 34/41] remove global using
---
libc/shared/math/ceilf128.h | 3 ---
libc/src/__support/math/ceilf128.h | 4 +---
libc/src/math/generic/ceilf128.cpp | 4 ----
.../shared/shared_math_constexpr_test.cpp | 22 +++++++++----------
libc/test/shared/shared_math_test.cpp | 10 ++++-----
5 files changed, 16 insertions(+), 27 deletions(-)
diff --git a/libc/shared/math/ceilf128.h b/libc/shared/math/ceilf128.h
index d7fe00fe86a3e..397c343fe6ff0 100644
--- a/libc/shared/math/ceilf128.h
+++ b/libc/shared/math/ceilf128.h
@@ -10,11 +10,8 @@
#define LLVM_LIBC_SHARED_MATH_CEILF128_H
#include "shared/libc_common.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/__support/math/ceilf128.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
namespace LIBC_NAMESPACE_DECL {
namespace shared {
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index 31b3debb890da..ec1b6aab806ae 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -13,11 +13,9 @@
#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
namespace LIBC_NAMESPACE_DECL {
namespace math {
-
+using LIBC_NAMESPACE::fputil::Float128;
LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
} // namespace math
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index a557d0d24629f..f040ade8848af 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -9,10 +9,6 @@
#include "src/math/ceilf128.h"
#include "src/__support/math/ceilf128.h"
-#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
-using float128 = LIBC_NAMESPACE::fputil::Float128;
-#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 648f0e0eb402a..688aaa8f861a5 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -201,7 +201,7 @@ static_assert(3.0f16 == LIBC_NAMESPACE::shared::f16addf(1.0f, 2.0f));
// TODO: make available after long double problem is fixed
#if 0
-static_assert(3.0f16 == LIBC_NAMESPACE::shared::f16addl(1.0L, 2.0L));
+LIBC_TYPES_HAS_FLOAT128AMESPACE::shared::f16addl(1.0L, 2.0L));
#endif
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
static_assert(3.0f16 ==
@@ -377,13 +377,13 @@ static_assert(0 == LIBC_NAMESPACE::shared::isnanl(0.0L));
#endif
//===----------------------------------------------------------------------===//
-// Emulated Float128 Tests
-//===----------------------------------------------------------------------===//
+// Emulated Float128
+// TeLIBC_TYPES_HAS_FLOAT128-------------------------------------------------===//
static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
//===----------------------------------------------------------------------===//
-// Built-In Float128 Tests
+// Native Float128 Tests
//===----------------------------------------------------------------------===//
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
@@ -501,13 +501,13 @@ static_assert(float128(0.0) == LIBC_NAMESPACE::shared::rintf128(float128(0.0)));
static_assert(1 == LIBC_NAMESPACE::shared::iscanonicalf128(float128(0.0)));
static_assert(0 == LIBC_NAMESPACE::shared::isnanf128(float128(0.0)));
static_assert(0.0 == LIBC_NAMESPACE::shared::issignalingf128(float128(0.0)));
-static_assert(1 == [] {
- const char arg{};
- return LIBC_NAMESPACE::fputil::FPBits<float128>(
- LIBC_NAMESPACE::shared::nanf128(&arg))
- .is_nan();
-}());
-static_assert(float128(0.0) ==
+static_assert(1 ==
+ [] {
+ const char arg{};
+ return LIBC_NAMESPACE::fputil::FPBits<float128>(
+ LIBC_NAMESPACE::shared::nanf128(&arg))
+ .is_nan();
+ }() LIBC_TYPES_HAS_FLOAT128 ==
LIBC_NAMESPACE::shared::roundf128(float128(0.0)));
static_assert(float128(0.0) ==
LIBC_NAMESPACE::shared::roundevenf128(float128(0.0)));
diff --git a/libc/test/shared/shared_math_test.cpp b/libc/test/shared/shared_math_test.cpp
index 802205d4ff974..8850deda1c805 100644
--- a/libc/test/shared/shared_math_test.cpp
+++ b/libc/test/shared/shared_math_test.cpp
@@ -7,9 +7,12 @@
//===----------------------------------------------------------------------===//
#include "shared/math.h"
+#include "src/__support/FPUtil/float128.h"
#include "test/UnitTest/FPMatcher.h"
#include "test/UnitTest/Test.h"
+using LIBC_NAMESPACE::fputil::Float128;
+
#ifdef LIBC_TYPES_HAS_FLOAT16
TEST(LlvmLibcSharedMathTest, AllFloat16) {
@@ -576,12 +579,7 @@ TEST(LlvmLibcSharedMathTest, AllLongDouble) {
#endif // LIBC_TYPES_LONG_DOUBLE_IS_DOUBLE_DOUBLE
-// Emulated float128
-// TODO: style
-#include "src/__support/FPUtil/float128.h"
-
-using LIBC_NAMESPACE::fputil::Float128;
-
+// Emulated float128 tests
TEST(LlvmLibcSharedMathTest, AllEmuFloat128) {
EXPECT_FP_EQ(Float128(0.0), LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
}
>From 7b584da3e3cae0a58a9f694b89125d1228139693 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 13 Aug 2026 22:23:28 +0530
Subject: [PATCH 35/41] rever mpfr changes
---
libc/utils/MPFRWrapper/CMakeLists.txt | 2 --
libc/utils/MPFRWrapper/MPCommon.cpp | 7 -------
libc/utils/MPFRWrapper/MPCommon.h | 27 ++-------------------------
libc/utils/MPFRWrapper/MPFRUtils.cpp | 13 -------------
4 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt
index 0b725be062f49..73151c61a7fcc 100644
--- a/libc/utils/MPFRWrapper/CMakeLists.txt
+++ b/libc/utils/MPFRWrapper/CMakeLists.txt
@@ -16,7 +16,6 @@ if(LIBC_TESTS_CAN_USE_MPFR OR LIBC_TESTS_CAN_USE_MPC)
libc.src.__support.CPP.type_traits
libc.src.__support.FPUtil.bfloat16
libc.src.__support.FPUtil.cast
- libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.fp_bits
)
if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH})
@@ -45,7 +44,6 @@ if(LIBC_TESTS_CAN_USE_MPFR)
libc.src.__support.CPP.array
libc.src.__support.CPP.stringstream
libc.src.__support.FPUtil.bfloat16
- libc.src.__support.FPUtil.float128
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.fpbits_str
LibcTest.unit
diff --git a/libc/utils/MPFRWrapper/MPCommon.cpp b/libc/utils/MPFRWrapper/MPCommon.cpp
index b3d0b3ca77122..2422bcf45222f 100644
--- a/libc/utils/MPFRWrapper/MPCommon.cpp
+++ b/libc/utils/MPFRWrapper/MPCommon.cpp
@@ -11,12 +11,9 @@
#include "src/__support/CPP/string_view.h"
#include "src/__support/FPUtil/bfloat16.h"
#include "src/__support/FPUtil/cast.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
namespace LIBC_NAMESPACE_DECL {
namespace testing {
namespace mpfr {
@@ -653,10 +650,6 @@ template <> bfloat16 MPFRNumber::as<bfloat16>() const {
return fputil::cast<bfloat16>(mpfr_get_flt(value, mpfr_rounding));
}
-template <> Float128 MPFRNumber::as<Float128>() const {
- return fputil::cast<Float128>(mpfr_get_float128(value, mpfr_rounding));
-}
-
} // namespace mpfr
} // namespace testing
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/utils/MPFRWrapper/MPCommon.h b/libc/utils/MPFRWrapper/MPCommon.h
index 8d7c132281784..38fd15fcc956c 100644
--- a/libc/utils/MPFRWrapper/MPCommon.h
+++ b/libc/utils/MPFRWrapper/MPCommon.h
@@ -13,25 +13,17 @@
#include "src/__support/CPP/string.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/FPBits.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
#include "test/UnitTest/RoundingModeUtils.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
#include "mpfr_inc.h"
-#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
+#ifdef LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE
extern "C" {
int mpfr_set_float128(mpfr_ptr, float128, mpfr_rnd_t);
float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
}
-#else
-extern "C" {
-int mpfr_set_float128(mpfr_ptr, Float128, mpfr_rnd_t);
-Float128 mpfr_get_float128(mpfr_srcptr, mpfr_rnd_t);
-}
#endif
namespace LIBC_NAMESPACE_DECL {
@@ -77,10 +69,6 @@ template <> struct ExtraPrecision<bfloat16> {
static constexpr unsigned int VALUE = 64;
};
-template <> struct ExtraPrecision<Float128> {
- static constexpr unsigned int VALUE = 512;
-};
-
// If the ulp tolerance is less than or equal to 0.5, we would check that the
// result is rounded correctly with respect to the rounding mode by using the
// same precision as the inputs.
@@ -174,17 +162,6 @@ class MPFRNumber {
}
#endif // LIBC_TYPES_FLOAT128_IS_NOT_LONG_DOUBLE
- template <typename XType,
- cpp::enable_if_t<cpp::is_same_v<Float128, XType>, int> = 0>
- explicit MPFRNumber(XType x,
- unsigned int precision = ExtraPrecision<XType>::VALUE,
- RoundingMode rounding = RoundingMode::Nearest)
- : mpfr_precision(precision),
- mpfr_rounding(get_mpfr_rounding_mode(rounding)) {
- mpfr_init2(value, mpfr_precision);
- mpfr_set_float128(value, x, mpfr_rounding);
- }
-
template <typename XType,
cpp::enable_if_t<cpp::is_integral_v<XType>, int> = 0>
explicit MPFRNumber(XType x,
@@ -314,7 +291,7 @@ class MPFRNumber {
if (FPBits<T>(input).is_subnormal())
++inputExponent;
- if (thisAsT * input < T(0) || thisExponent == inputExponent) {
+ if (thisAsT * input < 0 || thisExponent == inputExponent) {
MPFRNumber inputMPFR(input);
mpfr_sub(inputMPFR.value, value, inputMPFR.value, MPFR_RNDN);
mpfr_abs(inputMPFR.value, inputMPFR.value, MPFR_RNDN);
diff --git a/libc/utils/MPFRWrapper/MPFRUtils.cpp b/libc/utils/MPFRWrapper/MPFRUtils.cpp
index fd390abf56645..bc32b11466e5a 100644
--- a/libc/utils/MPFRWrapper/MPFRUtils.cpp
+++ b/libc/utils/MPFRWrapper/MPFRUtils.cpp
@@ -12,13 +12,10 @@
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/stringstream.h"
#include "src/__support/FPUtil/bfloat16.h"
-#include "src/__support/FPUtil/float128.h"
#include "src/__support/FPUtil/fpbits_str.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-using LIBC_NAMESPACE::fputil::Float128;
-
namespace LIBC_NAMESPACE_DECL {
namespace testing {
namespace mpfr {
@@ -291,12 +288,6 @@ template void explain_unary_operation_single_output_error(Operation op,
bfloat16, bfloat16,
double, RoundingMode);
-// Emulated Float128 is always available regardless of native float128 support.
-template void explain_unary_operation_single_output_error(Operation op,
- fputil::Float128,
- fputil::Float128,
- double, RoundingMode);
-
template <typename T>
void explain_unary_operation_two_outputs_error(
Operation op, T input, const BinaryOutput<T> &libc_result,
@@ -589,10 +580,6 @@ template bool compare_unary_operation_single_output(Operation, float128,
template bool compare_unary_operation_single_output(Operation, bfloat16,
bfloat16, double,
RoundingMode);
-// Emulated Float128
-template bool compare_unary_operation_single_output(Operation, fputil::Float128,
- fputil::Float128, double,
- RoundingMode);
template <typename T>
bool compare_unary_operation_two_outputs(Operation op, T input,
>From 180e9e9f502e5ceb074be4be18ac513fc16a8148 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 13 Aug 2026 22:30:40 +0530
Subject: [PATCH 36/41] nits
---
libc/src/math/ceilf128.h | 3 +--
.../test/shared/shared_math_constexpr_test.cpp | 18 +++++++++---------
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index c0e9dfdd54574..f20f59d5ef66a 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -13,12 +13,11 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
+namespace LIBC_NAMESPACE_DECL {
#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
using float128 = LIBC_NAMESPACE::fputil::Float128;
#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
-namespace LIBC_NAMESPACE_DECL {
-
float128 ceilf128(float128 x);
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 688aaa8f861a5..80249ba18c5c8 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -201,7 +201,7 @@ static_assert(3.0f16 == LIBC_NAMESPACE::shared::f16addf(1.0f, 2.0f));
// TODO: make available after long double problem is fixed
#if 0
-LIBC_TYPES_HAS_FLOAT128AMESPACE::shared::f16addl(1.0L, 2.0L));
+static_assert(3.0f16 == LIBC_NAMESPACE::shared::f16addl(1.0L, 2.0L));
#endif
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
static_assert(3.0f16 ==
@@ -383,7 +383,7 @@ static_assert(0 == LIBC_NAMESPACE::shared::isnanl(0.0L));
static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
//===----------------------------------------------------------------------===//
-// Native Float128 Tests
+// Built-In Float128 Tests
//===----------------------------------------------------------------------===//
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
@@ -501,13 +501,13 @@ static_assert(float128(0.0) == LIBC_NAMESPACE::shared::rintf128(float128(0.0)));
static_assert(1 == LIBC_NAMESPACE::shared::iscanonicalf128(float128(0.0)));
static_assert(0 == LIBC_NAMESPACE::shared::isnanf128(float128(0.0)));
static_assert(0.0 == LIBC_NAMESPACE::shared::issignalingf128(float128(0.0)));
-static_assert(1 ==
- [] {
- const char arg{};
- return LIBC_NAMESPACE::fputil::FPBits<float128>(
- LIBC_NAMESPACE::shared::nanf128(&arg))
- .is_nan();
- }() LIBC_TYPES_HAS_FLOAT128 ==
+static_assert(1 == [] {
+ const char arg{};
+ return LIBC_NAMESPACE::fputil::FPBits<float128>(
+ LIBC_NAMESPACE::shared::nanf128(&arg))
+ .is_nan();
+}());
+static_assert(float128(0.0) ==
LIBC_NAMESPACE::shared::roundf128(float128(0.0)));
static_assert(float128(0.0) ==
LIBC_NAMESPACE::shared::roundevenf128(float128(0.0)));
>From 6f5f72288cb3982d8664c43c859da4c5b67b85d4 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 13 Aug 2026 22:32:50 +0530
Subject: [PATCH 37/41] nits:entrypoints
---
libc/config/linux/riscv/entrypoints.txt | 1 -
1 file changed, 1 deletion(-)
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index a552bddd06b67..4acae85ec2c1c 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -970,7 +970,6 @@ if(LIBC_TYPES_HAS_NATIVE_FLOAT128)
libc.src.math.atan2f128
libc.src.math.atan2l
libc.src.math.canonicalizef128
- libc.src.math.ceilf128
libc.src.math.copysignf128
libc.src.math.daddf128
libc.src.math.ddivf128
>From fe9c58699d6e91a42b86faa46b07e84dd5d2788a Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 13 Aug 2026 22:45:28 +0530
Subject: [PATCH 38/41] nits
---
libc/src/__support/math/ceilf128.h | 2 +-
libc/src/math/ceilf128.h | 1 +
libc/src/math/generic/ceilf128.cpp | 2 ++
libc/test/shared/shared_math_constexpr_test.cpp | 6 +++---
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index ec1b6aab806ae..612aa5a73d91a 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -16,8 +16,8 @@
namespace LIBC_NAMESPACE_DECL {
namespace math {
using LIBC_NAMESPACE::fputil::Float128;
-LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
+LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/src/math/ceilf128.h b/libc/src/math/ceilf128.h
index f20f59d5ef66a..23e8c703b80fa 100644
--- a/libc/src/math/ceilf128.h
+++ b/libc/src/math/ceilf128.h
@@ -14,6 +14,7 @@
#include "src/__support/macros/properties/types.h"
namespace LIBC_NAMESPACE_DECL {
+
#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
using float128 = LIBC_NAMESPACE::fputil::Float128;
#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index f040ade8848af..df0e326066ba1 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -11,6 +11,8 @@
namespace LIBC_NAMESPACE_DECL {
+using LIBC_NAMESPACE::fputil::Float128;
+
LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
return fputil::cast<float128>(math::ceilf128(Float128(x)));
}
diff --git a/libc/test/shared/shared_math_constexpr_test.cpp b/libc/test/shared/shared_math_constexpr_test.cpp
index 80249ba18c5c8..6f9df85f3bb1c 100644
--- a/libc/test/shared/shared_math_constexpr_test.cpp
+++ b/libc/test/shared/shared_math_constexpr_test.cpp
@@ -377,13 +377,13 @@ static_assert(0 == LIBC_NAMESPACE::shared::isnanl(0.0L));
#endif
//===----------------------------------------------------------------------===//
-// Emulated Float128
-// TeLIBC_TYPES_HAS_FLOAT128-------------------------------------------------===//
+// Emulated Float128 Tests
+//===----------------------------------------------------------------------===//
static_assert(Float128(0.0) == LIBC_NAMESPACE::shared::ceilf128(Float128(0.0)));
//===----------------------------------------------------------------------===//
-// Built-In Float128 Tests
+// Native Float128 Tests
//===----------------------------------------------------------------------===//
#ifdef LIBC_TYPES_HAS_NATIVE_FLOAT128
>From 0e1dea103f17224d45acd0ec4fc5db609ae41b03 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Thu, 13 Aug 2026 23:05:56 +0530
Subject: [PATCH 39/41] add alias in test files
---
libc/test/src/math/CMakeLists.txt | 1 +
libc/test/src/math/ceilf128_test.cpp | 6 +++++-
libc/test/src/math/smoke/CMakeLists.txt | 1 +
libc/test/src/math/smoke/ceilf128_test.cpp | 6 +++++-
4 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 850cf31e8f44f..fbbbf67774d36 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -435,6 +435,7 @@ add_fp_unittest(
libc.src.math.ceilf128
libc.src.__support.CPP.algorithm
libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.float128
)
add_fp_unittest(
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index f0da8258f79bc..2547e38256270 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -7,7 +7,11 @@
//===----------------------------------------------------------------------===//
#include "CeilTest.h"
-
+#include "src/__support/FPUtil/float128.h"
#include "src/math/ceilf128.h"
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
+
LIST_CEIL_TESTS(float128, LIBC_NAMESPACE::ceilf128)
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index a42a6e70f773f..a793455174cf2 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -617,6 +617,7 @@ add_fp_unittest(
DEPENDS
libc.src.math.ceilf128
libc.src.__support.FPUtil.fp_bits
+ libc.src.__support.FPUtil.float128
)
add_fp_unittest(
diff --git a/libc/test/src/math/smoke/ceilf128_test.cpp b/libc/test/src/math/smoke/ceilf128_test.cpp
index f0da8258f79bc..2547e38256270 100644
--- a/libc/test/src/math/smoke/ceilf128_test.cpp
+++ b/libc/test/src/math/smoke/ceilf128_test.cpp
@@ -7,7 +7,11 @@
//===----------------------------------------------------------------------===//
#include "CeilTest.h"
-
+#include "src/__support/FPUtil/float128.h"
#include "src/math/ceilf128.h"
+#ifndef LIBC_TYPES_HAS_NATIVE_FLOAT128
+using float128 = LIBC_NAMESPACE::fputil::Float128;
+#endif // LIBC_TYPES_HAS_NATIVE_FLOAT128
+
LIST_CEIL_TESTS(float128, LIBC_NAMESPACE::ceilf128)
>From 6686c946e690726e2427ec45878b658ae8246162 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sat, 15 Aug 2026 02:06:30 +0530
Subject: [PATCH 40/41] nits
---
libc/src/__support/math/ceilf128.h | 2 ++
libc/test/src/math/CMakeLists.txt | 2 +-
libc/test/src/math/ceilf128_test.cpp | 1 +
libc/test/src/math/smoke/CMakeLists.txt | 2 +-
4 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libc/src/__support/math/ceilf128.h b/libc/src/__support/math/ceilf128.h
index 612aa5a73d91a..47f3fbbd86a95 100644
--- a/libc/src/__support/math/ceilf128.h
+++ b/libc/src/__support/math/ceilf128.h
@@ -15,9 +15,11 @@
namespace LIBC_NAMESPACE_DECL {
namespace math {
+
using LIBC_NAMESPACE::fputil::Float128;
LIBC_INLINE constexpr Float128 ceilf128(Float128 x) { return fputil::ceil(x); }
+
} // namespace math
} // namespace LIBC_NAMESPACE_DECL
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index fbbbf67774d36..bf337783bfe23 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -434,8 +434,8 @@ add_fp_unittest(
DEPENDS
libc.src.math.ceilf128
libc.src.__support.CPP.algorithm
- libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.fp_bits
)
add_fp_unittest(
diff --git a/libc/test/src/math/ceilf128_test.cpp b/libc/test/src/math/ceilf128_test.cpp
index 2547e38256270..ba5a768610a65 100644
--- a/libc/test/src/math/ceilf128_test.cpp
+++ b/libc/test/src/math/ceilf128_test.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "CeilTest.h"
+
#include "src/__support/FPUtil/float128.h"
#include "src/math/ceilf128.h"
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index a793455174cf2..91d76f2c7973c 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -616,8 +616,8 @@ add_fp_unittest(
CeilTest.h
DEPENDS
libc.src.math.ceilf128
- libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.float128
+ libc.src.__support.FPUtil.fp_bits
)
add_fp_unittest(
>From b83767995089dbd0375fdf26d34bcf37a5e33471 Mon Sep 17 00:00:00 2001
From: Sukumarsawant <sawantsukumar at gmail.com>
Date: Sat, 15 Aug 2026 22:49:59 +0530
Subject: [PATCH 41/41] replace with bit_cast
---
libc/src/math/generic/CMakeLists.txt | 1 +
libc/src/math/generic/ceilf128.cpp | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 1a81f84db853d..80c2053066f16 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -161,6 +161,7 @@ add_entrypoint_object(
HDRS
../ceilf128.h
DEPENDS
+ libc.src.__support.CPP.bit
libc.src.__support.math.ceilf128
)
diff --git a/libc/src/math/generic/ceilf128.cpp b/libc/src/math/generic/ceilf128.cpp
index df0e326066ba1..5737f887db220 100644
--- a/libc/src/math/generic/ceilf128.cpp
+++ b/libc/src/math/generic/ceilf128.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "src/math/ceilf128.h"
+#include "src/__support/CPP/bit.h"
#include "src/__support/math/ceilf128.h"
namespace LIBC_NAMESPACE_DECL {
@@ -14,7 +15,7 @@ namespace LIBC_NAMESPACE_DECL {
using LIBC_NAMESPACE::fputil::Float128;
LLVM_LIBC_FUNCTION(float128, ceilf128, (float128 x)) {
- return fputil::cast<float128>(math::ceilf128(Float128(x)));
+ return cpp::bit_cast<float128>(math::ceilf128(cpp::bit_cast<Float128>(x)));
}
} // namespace LIBC_NAMESPACE_DECL
More information about the libc-commits
mailing list