1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed constant initializer

An expression using `static const` value seems not considered as
`static const` by Visual C.
This commit is contained in:
Nobuyoshi Nakada 2020-05-04 00:27:14 +09:00
parent dfbbd94ec1
commit 41e547e60c
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

View file

@ -88,7 +88,7 @@ int_pair_to_real_exclusive(uint32_t a, uint32_t b)
static const int a_shift = DBL_MANT_DIG < 64 ?
(64-DBL_MANT_DIG)/2 : 0;
static const int b_shift = DBL_MANT_DIG < 64 ?
(64-DBL_MANT_DIG)-a_shift : 0;
(65-DBL_MANT_DIG)/2 : 0;
a >>= a_shift;
b >>= b_shift;
return (a*(double)(1ul<<(32-b_shift))+b)*dbl_reduce_scale;