[libc-commits] [libc] [libc][math][c23] add c23 floating point fmaximum and fminimum fns (PR #86016)
Job Henandez Lara via libc-commits
libc-commits at lists.llvm.org
Wed Mar 20 15:25:01 PDT 2024
================
@@ -58,6 +58,130 @@ LIBC_INLINE T fmax(T x, T y) {
}
}
+template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
+LIBC_INLINE T fmaximum(T x, T y) {
+ FPBits<T> bitx(x), bity(y);
+
+ if (bitx.is_nan()) {
----------------
Jobhdez wrote:
I will fix it. thanks
https://github.com/llvm/llvm-project/pull/86016
More information about the libc-commits
mailing list