Skip to content

Commit

Permalink
faster
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn committed Oct 29, 2024
1 parent 64b5f9b commit 9b34a96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ydb/library/yql/public/decimal/yql_decimal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,12 @@ TInt128 FromStringEx(const TStringBuf& str, ui8 precision, ui8 scale) {

if (!std::isdigit(*p))
return Err();

return r;
}

if (const auto e = exp > 0 ? std::max(0, s - p) : std::min(0, s)) {
if (r && IsNormal(r)) {
if (r) {
if (exp > 0)
return Mul(r, GetDivider(+e));
if (exp < 0)
Expand Down

0 comments on commit 9b34a96

Please sign in to comment.