[libc-commits] [PATCH] D115828: [libc] Implement correctly rounded log2f based on RLIBM library.

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Dec 20 14:56:51 PST 2021


michaelrj accepted this revision.
michaelrj added a comment.

LGTM with nits from a formatting perspective.



================
Comment at: libc/src/math/generic/log2f.cpp:121
+  xbits.set_unbiased_exponent(0x7F);
+  int fIndex = xbits.get_mantissa() >> 16;
+
----------------
this variable doesn't match the new formatting rules (should be `f_index`).


================
Comment at: libc/test/src/math/log2f_test.cpp:43
+TEST(LlvmLibcLog2fTest, InFloatRange) {
+  constexpr uint32_t count = 1000000;
+  constexpr uint32_t step = UINT32_MAX / count;
----------------
These are constexpr and should be capitalized (so `COUNT` and `STEP`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115828/new/

https://reviews.llvm.org/D115828



More information about the libc-commits mailing list