Consider
Clear[x];
x = 2;
x < 2.9 || x > 3.1
This yields
True
So, everything is o. k. (interesting) But when you replace || by or, the result becomes really interesting:
Clear[x];
x = 2;
x < 2.9 or x > 3.1
yields
2 < 5.8 or && 5.8 or > 3.1
What the heck is going on? I presume that the following is happening:
or
is different fromOR
(that is, from||
), since Mathematica is case-sensitive.- Thus,
or
is an other operator, perhaps a bitwise or or something like this???
I am interested in how exactly the strange value is generated. That is, if or
is a bitwise operation, how do the left and right sides look "in bits" and how does or
work on these bits? Any help is greatly appreciated.
Or
; youror
is an undefined variable, as so humorously pointed out below. $\endgroup$Or[x < 2.9, x > 3.1]
or(x < 2.9) ~Or~ (x > 3.1)
$\endgroup$