If you have a decfloat column with a NaN (or sNaN) value, then selects with a condition on that column will fail with the error below during fetch.

====
*** IBPP::SQLException ***
Context: Statement::Fetch
Message: isc_dsql_fetch failed.

SQL Message : -901
Unsuccessful execution caused by system error that does not preclude successful execution of subsequent statements

Engine Code    : 335545141
Engine Message :
Decimal float invalid operation. An indeterminant error occurred during an operation.
====

I would suggest that instead comparison with a NaN (or sNaN) would always be false (even if the value compared to is NaN!), as is the case in most programming languages when comparing double NaN.

And similar to NULL, checking for NaN would require something like IS NaN (or maybe a ISNAN(..)). The only question is do we need to discern between +/- NaN and +/- sNaN in these cases?

What do you think?

--
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