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

Shourya Goel via libc-commits libc-commits at lists.llvm.org
Fri Mar 22 03:50:40 PDT 2024


================
@@ -501,6 +501,10 @@ struct FPRepSem<FPType::X86_Binary80, RetT>
                        Significand::msb() | (Significand::msb() >> 1) |
                            Significand(v)));
   }
+  LIBC_INLINE static constexpr RetT get_canonical_val(Sign sign = Sign::POS,
+                                                      StorageType v = 0) {
+    return RetT(encode(sign, Exponent::min(), Significand(v)));
+  }
----------------
Sh0g0-1758 wrote:

done. 

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


More information about the libc-commits mailing list