[libc-commits] [PATCH] D157449: [libc] Fix final conversion warnings

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Aug 8 15:57:37 PDT 2023


lntue added inline comments.


================
Comment at: libc/src/math/generic/tanhf.cpp:59
 
     const double SIGNS[2][2] = {{1.0f, -0x1.0p-25f}, {-1.0f, 0x1.0p-25f}};
 
----------------
mcgrathr wrote:
> The literals here use the `f` suffix to have `float` type, but then the variable is `double`.
> Should the variable just be `float`? And I wonder too why it's not constexpr.
> 
+1, this should be declared as `constexpr float`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157449



More information about the libc-commits mailing list