We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a4e781 commit 55f3f57Copy full SHA for 55f3f57
libc/src/math/generic/expxf16.h
@@ -240,10 +240,10 @@ template <bool IsSinh> LIBC_INLINE float16 eval_sinh_or_cosh(float16 x) {
240
int x_hi_mid_p = static_cast<int>(kf);
241
int x_hi_mid_m = -x_hi_mid_p;
242
243
- int x_hi_p = x_hi_mid_p >> 5;
244
- int x_hi_m = x_hi_mid_m >> 5;
245
- int x_mid_p = x_hi_mid_p & 0x1f;
246
- int x_mid_m = x_hi_mid_m & 0x1f;
+ unsigned x_hi_p = static_cast<unsigned>(x_hi_mid_p) >> 5;
+ unsigned x_hi_m = static_cast<unsigned>(x_hi_mid_m) >> 5;
+ unsigned x_mid_p = static_cast<unsigned>(x_hi_mid_p) & 0x1f;
+ unsigned x_mid_m = static_cast<unsigned>(x_hi_mid_m) & 0x1f;
247
248
uint32_t exp2_hi_mid_bits_p =
249
EXP2_MID_5_BITS[x_mid_p] +
0 commit comments