Or: Difference between revisions
Jump to navigation
Jump to search
(→Extended definition: Split the description for integers and non-integers) |
(Move GCD into a dedicated page) |
||
Line 1: | Line 1: | ||
{{Built-in|Or|∨}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if at least one of the two arguments is true: it returns 1 if at least one side is 1 and 0 if both are 0. It represents the [[wikipedia:logical disjunction|logical disjunction]] in Boolean logic. | {{Built-in|Or|∨}} is a [[dyadic]] [[scalar function|scalar]] [[boolean function]] which tests if at least one of the two arguments is true: it returns 1 if at least one side is 1 and 0 if both are 0. It represents the [[wikipedia:logical disjunction|logical disjunction]] in Boolean logic. In many APLs, Or is a special case of the [[GCD]] function. | ||
{|class=wikitable | {|class=wikitable | ||
Line 28: | Line 28: | ||
0 | 0 | ||
</source> | </source> | ||
== External links == | == External links == |
Revision as of 14:47, 1 June 2020
∨
|
Or (∨
) is a dyadic scalar boolean function which tests if at least one of the two arguments is true: it returns 1 if at least one side is 1 and 0 if both are 0. It represents the logical disjunction in Boolean logic. In many APLs, Or is a special case of the GCD function.
∨ |
0 |
1
|
---|---|---|
0
|
0 |
1
|
1
|
1 |
1
|
Examples
The following shows all possible combinations of inputs as a Boolean function.
0 0 1 1 ∨ 0 1 0 1 0 1 1 1
When combined with Reduce, Or can be used to test if some value in a Boolean vector is true.
∨/ 0 0 1 0 1 1 ∨/ 0 0 0 0 0 0