On Fri, 15 Jan 2021, Riccardo (Jack) Lucchetti wrote:
On Fri, 15 Jan 2021, Allin Cottrell wrote:
> Following C-library rules one could say that comparisons of the sort z < x,
> z
>> x, z <= x, z >= y should all give FALSE/0 rather than NA if one or more of
> {z, x} are NA. I'm not sure if we want that.
Or we could just print the string "Schrödinger!".
Nice one!
Unless there are any strong objections, for gretl 2021a I propose to
revert to the status quo prior to breakage. That means that all
comparisons involving NA (including equals and not-equals) will give
NA, and if this arises in the context of an "if" test an error will
be flagged.
We can debate this later, but briefly here's my thinking on why this
is at least defensible. The IEEE rules for comparisons involving
NaNs are consistent and arguably correct when we're dealing with
true "Not-a-Number", as can arise from a failed calculation such as
taking the log of a negative number. But they're not very intuitive,
and -- more important -- it's not at all clear that they're the
right approach for handling primary NAs (missing values in a
dataset).
(Note, this is without prejudice to the application of IEEE rules
for arithmetic invoving NaNs, it's specific to boolean comparisons.)
Allin