[libc-commits] [PATCH] D118093: [libc] Implement log10f correctly rounded for all rounding modes.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jan 24 22:01:48 PST 2022


sivachandra accepted this revision.
sivachandra added a comment.
This revision is now accepted and ready to land.

LGTM but please wait for approval from others.



================
Comment at: libc/src/math/generic/log10f.cpp:134
+    return 10.0f;
+  case 0x4f134f83U:
+    if (fputil::get_round() == FE_UPWARD)
----------------
Nit: Does it make sense to add a comment telling the reader about the decimal value?


================
Comment at: libc/test/src/math/log10f_test.cpp:35
+  constexpr int N = 12;
+  constexpr uint32_t INPUTS[N] = {0x41200000U, 0x42c80000U, 0x447a0000U,
+                                  0x461c4000U, 0x47c35000U, 0x49742400U,
----------------
Nit: Can you add a comment telling the reader what these numbers correspond to?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118093



More information about the libc-commits mailing list