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

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Dec 15 23:59:50 PST 2021


sivachandra added inline comments.


================
Comment at: libc/src/math/generic/common_constants.h:17
+
+// Lookup table for (1/f) where f = 1 + n*2^(-7), n = 0..127.
+static constexpr double ONE_OVER_F[128] = {
----------------
When you have large common global data, a better approach would be to put them in an object library like this: https://github.com/llvm/llvm-project/blob/main/libc/src/math/generic/CMakeLists.txt#L49.

And then use it as a dep for all users.


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