You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DECFLOAT: subtraction Num1 - Num2 leads to "Decimal float overflow" if Num2 is specified in scientific notation and less than max double ( 1.7976931348623157e308 ) [CORE6238]
#6482
SQL> select (d -1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
SQL> select (d - 1e0) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
Result:
Statement failed, SQLSTATE = 22003
Decimal float overflow. The exponent of a result is greater than the magnitude allowed.
PS.
It seems that MINIMAL abs value in scientific notation that can be subtracted from 9.99e+6144 is 0x 7FEF FFFF FFFF FFFF, i.e. 1.7976931348623157e308 (max double):
SQL> select (d-1.79769314e308) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
9.999999999999999999999999999999998E+6144
=== vs ===
SQL> select (d-1.79769313e308) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
Statement failed, SQLSTATE = 22003
Decimal float overflow. The exponent of a result is greater than the magnitude allowed.
Submitted by: @pavel-zotov
Example-1:
SQL> select (d -1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
Result: 9.999999999999999999999999999999998E+6144 // OK, Expected
Example-2:
SQL> select (d - 1e0) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
Result:
Statement failed, SQLSTATE = 22003
Decimal float overflow. The exponent of a result is greater than the magnitude allowed.
PS.
It seems that MINIMAL abs value in scientific notation that can be subtracted from 9.99e+6144 is 0x 7FEF FFFF FFFF FFFF, i.e. 1.7976931348623157e308 (max double):
SQL> select (d-1.79769314e308) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
9.999999999999999999999999999999998E+6144
=== vs ===
SQL> select (d-1.79769313e308) from (select 9.999999999999999999999999999999998E+6144 d from rdb$database);
Statement failed, SQLSTATE = 22003
Decimal float overflow. The exponent of a result is greater than the magnitude allowed.
Commits: 0ef5a1a 9e6c6d0
The text was updated successfully, but these errors were encountered: