On 6-1-2018 18:02, Mark Rotteveel wrote:
I just bought a copy of SQL:2016-2, and it says nothing about Infinity and NaN (or sNaN) for DECFLOAT (nor does it for double or float for that matter).

I wonder if that means those values are not allowed and should instead raise an exception when inserted, or the result of a calculation.

Not allowing +/-Infinity, +/-NaN, +/-sNaN for DECFLOAT seems to be supported by the rules of 6.29 <numeric value expression>:

"""
6) If the most specific type of the result of an arithmetic operation is approximate numeric and the exponent of the approximate mathematical result of the operation is not within the implementation-defined exponent range for the declared type of the result, then an exception condition is raised: data exception — numeric value out of range.

7) If the most specific type MST of the result of an arithmetic operation is the decimal floating point type, then the result is an implementation-defined value IV of MST such that no other value of MST is strictly between IV and the mathematical result MR of the operation. If the exponent of IV is not within the implementation-defined exponent range for MST, then an exception condition is raised: data exception —
numeric value out of range.
"""

--
Mark Rotteveel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to