[libc-commits] [libc] [llvm] [libc] Add `next_toward_inf` fo `FPBits` (PR #80654)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Mon Feb 5 02:29:03 PST 2024


================
@@ -435,6 +445,13 @@ struct FPRepSem : public FPStorage<fp_type> {
   LIBC_INLINE constexpr bool is_normal() const {
     return is_finite() && !is_subnormal();
   }
+
+  // Modifiers
+  LIBC_INLINE constexpr void next_toward_inf() {
----------------
gchatelet wrote:

We will construct an `FPRep` and depending on `condition` we will return it as-is or the `next_toward_inf` value.
We _could_ return a new value instead of modifying it.

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


More information about the libc-commits mailing list