Skip to content

Commit 253f0f4

Browse files
Artyom IvanovAlexPeshkoff
authored andcommitted
fix(int128): Use all 16 decimal digits to represent int128 min/max in double correctly
1 parent 98a1628 commit 253f0f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/cvt.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3174,10 +3174,10 @@ Int128 CVT_get_int128(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorF
31743174
Decimal128 tmp;
31753175
double d, eps;
31763176

3177-
static const double I128_MIN_dbl = -1.701411834604692e+38;
3178-
static const double I128_MAX_dbl = 1.701411834604692e+38;
3177+
static const double I128_MIN_dbl = -1.7014118346046923e+38;
3178+
static const double I128_MAX_dbl = 1.7014118346046921e+38;
31793179
static const CDecimal128 I128_MIN_dcft("-1.701411834604692317316873037158841E+38", decSt);
3180-
static const CDecimal128 I128_MAX_dcft("1.701411834604692317316873037158841E+38", decSt);
3180+
static const CDecimal128 I128_MAX_dcft( "1.701411834604692317316873037158841E+38", decSt);
31813181
static const CDecimal128 DecFlt_05("0.5", decSt);
31823182

31833183
// adjust exact numeric values to same scaling

0 commit comments

Comments
 (0)