[libc-commits] [libc] [libc][math][c23] Implement canonicalize functions (PR #85940)

via libc-commits libc-commits at lists.llvm.org
Thu Mar 21 08:40:54 PDT 2024


================
@@ -73,6 +75,20 @@ LIBC_INLINE T fdim(T x, T y) {
   return (x > y ? x - y : 0);
 }
 
+template <typename T, cpp::enable_if_t<cpp::is_floating_point_v<T>, int> = 0>
+LIBC_INLINE T canonicalize(T *cx, const T *x) {
----------------
lntue wrote:

Change the parameter types to `T& c` and `const T &x`.  Update the call sites accordingly.

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


More information about the libc-commits mailing list