[libc-commits] [libc] [llvm] Reland "[libc][math] Refactor fmaximum_mag_num family to header-only" (PR #194194)

Muhammad Bassiouni via libc-commits libc-commits at lists.llvm.org
Sat Apr 25 16:44:25 PDT 2026


================
@@ -33,10 +33,10 @@ LIBC_INLINE constexpr T abs(T x) {
 namespace internal {
 
 template <typename T>
-LIBC_INLINE cpp::enable_if_t<cpp::is_floating_point_v<T>, T> max(T x, T y) {
+LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_floating_point_v<T>, T>
+constexpr_max(T x, T y) {
   FPBits<T> x_bits(x);
   FPBits<T> y_bits(y);
-
   // To make sure that fmax(+0, -0) == +0 == fmax(-0, +0), whenever x and y
----------------
bassiounix wrote:

```suggestion

  // To make sure that fmax(+0, -0) == +0 == fmax(-0, +0), whenever x and y
```

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


More information about the libc-commits mailing list