[Scilab-Dev] or(%nan) ==%F ?

Samuel Gougeon sgougeon at free.fr
Tue Apr 12 13:59:12 CEST 2016


Le 12/04/2016 13:36, Samuel Gougeon a écrit :
> Hello,
>
> I am wondering about the following answers:
>
> --> s = %nan;
> --> or(s)
>  ans  =
>   F
>
> --> and(s)
>  ans  =
>   T
>
> With this last answer, we have a case such that although all entries 
> are false -- otherwiseor() would answer %T--, and()applied to them is 
> True.
>
> Is there a reason for that, or is it a bug?
>
> This behavior was already present in Scilab 4.1.2 and is still here in 
> Scilab 6.0-b1
.
The title of my post was and(%nan)==%T, while the strange thing is 
rather that or(%nan)==%F.
Indeed, s being a real with unknown value,
prob(s==0)/prob(s~=0) = 0, in such a way that or(%nan) should rather be %T

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20160412/de22164c/attachment.htm>


More information about the dev mailing list