explicit cast

This commit is contained in:
Francois Perrad 2018-12-01 08:33:02 +01:00
parent 6d4026d582
commit d7b7dfee53

View File

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