[libc-commits] [libc] [libc][NFC] Clean up conversion warnings in math function implementations. (PR #74697)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Thu Dec 7 08:34:04 PST 2023
================
@@ -769,7 +769,7 @@ LLVM_LIBC_FUNCTION(double, log, (double x)) {
// Range reduction for log(x_m):
// For each x_m, we would like to find r such that:
// -2^-8 <= r * x_m - 1 < 2^-7
- int shifted = x_u >> 45;
+ int shifted = static_cast<int>(x_u >> 45);
----------------
nickdesaulniers wrote:
I'm not sure the explicit static_cast improves readability or correctness, here or below. You could drop them I suspect. But I don't feel strongly either way.
https://github.com/llvm/llvm-project/pull/74697
More information about the libc-commits
mailing list