[libc-commits] [libc] [libc][complex] Implement different flavors of the `cproj` function (PR #119722)

Shourya Goel via libc-commits libc-commits at lists.llvm.org
Tue Dec 17 09:16:45 PST 2024


================
@@ -77,5 +79,17 @@ template <typename T> LIBC_INLINE constexpr T conjugate(T c) {
   return cpp::bit_cast<T>(c_c);
 }
 
+template <typename T> LIBC_INLINE constexpr T project(T c) {
+  Complex<make_real_t<T>> c_c = cpp::bit_cast<Complex<make_real_t<T>>>(c);
----------------
Sh0g0-1758 wrote:

added an alias, that should make the impl less crowded. 

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


More information about the libc-commits mailing list