On Fri, 15 Jan 2021, Artur Tarassow wrote:
Ok, let me elaborate on this:
Julia throws "TypeError: non-boolean (Missing) used in boolean context"
<julia>
foo = missing
actual = 0
if foo
actual += 1
end
println(actual)
</julia
True, but if you substitute "NaN" for "missing" Julia follows IEEE
rules:
x = NaN
if x < 0
println("true")
else
println("false")
end
gives "false".
Hmm. In gretl we don't have a distinction between missing and NaN.
Historically in gretl both the intent and the actuality were that we
treated "if x < 0" and similar as indeterminate, and therefore an
error, for missing x. This got broken in 2018 and I think it would
make sense to re-establish it. But... back then we treated "x == 0"
and "x != 0" in the same way (indeterminate), while now there's a
fairly strong pull from IEEE in the other direction.
Allin