[libc-commits] [libc] [llvm] [libc] Move printf long double to simple calc (PR #75414)

via libc-commits libc-commits at lists.llvm.org
Tue Jan 2 11:36:02 PST 2024


================
@@ -152,15 +157,17 @@ LIBC_INLINE constexpr uint32_t ceil_log10_pow2(const uint32_t e) {
   return log10_pow2(e) + 1;
 }
 
+LIBC_INLINE constexpr uint32_t div_ceil(const uint32_t num,
+                                        const uint32_t denom) {
+  return (num + (denom - 1)) / denom;
----------------
michaelrj-google wrote:

It definitely is, look at this godbolt link: https://godbolt.org/z/czh87M61b

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


More information about the libc-commits mailing list