bitwise operation on unsigned

This commit is contained in:
Francois Perrad 2018-11-28 10:51:30 +01:00
parent d1b52524f1
commit f186e7bd83

View File

@ -24,7 +24,7 @@ int mp_set_double(mp_int *a, double b)
} cast; } cast;
cast.dbl = b; cast.dbl = b;
exp = (int)(cast.bits >> 52) & 0x7FF; exp = (unsigned)(cast.bits >> 52) & 0x7FFU;
frac = (cast.bits & ((1ULL << 52) - 1ULL)) | (1ULL << 52); frac = (cast.bits & ((1ULL << 52) - 1ULL)) | (1ULL << 52);
if (exp == 0x7FF) { /* +-inf, NaN */ if (exp == 0x7FF) { /* +-inf, NaN */