Skip to content

fix(int128): Use all 16 decimal digits to represent int128 min/max in double number correctly #8633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/common/cvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3169,10 +3169,10 @@ Int128 CVT_get_int128(const dsc* desc, SSHORT scale, DecimalStatus decSt, ErrorF
Decimal128 tmp;
double d, eps;

static const double I128_MIN_dbl = -1.701411834604692e+38;
static const double I128_MAX_dbl = 1.701411834604692e+38;
static const double I128_MIN_dbl = -1.7014118346046923e+38;
static const double I128_MAX_dbl = 1.7014118346046921e+38;
static const CDecimal128 I128_MIN_dcft("-1.701411834604692317316873037158841E+38", decSt);
static const CDecimal128 I128_MAX_dcft("1.701411834604692317316873037158841E+38", decSt);
static const CDecimal128 I128_MAX_dcft( "1.701411834604692317316873037158841E+38", decSt);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why whitespace?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To look in line with I128_MIN_dcft, like it's done with I128_MIN_dbl and I128_MAX_dbl

static const CDecimal128 DecFlt_05("0.5", decSt);

// adjust exact numeric values to same scaling
Expand Down
Loading