Logical functions
In arguments and results of logical functions 1 stands for TRUE, 0 stands for FALSE.
Function |
Value |
Value of |
is |
or(a,b) |
Logical "OR" |
or(0,1), or(1,0), or(1,1) |
1 |
or(0,0) |
0 |
||
and(a,b) |
Logical "AND" |
and(0,0), and(0,1), and(1,0) |
0 |
and(1,1) |
1 |
||
not(a) |
Logical "NOT" |
not(1) |
0 |
not(0) |
1 |
You can use logical and comparison function to construct graphs, defined by
different formulas for different parts of domain. For example,
and(ge(x,0),le(x,1))
presents a function, equal to 1 if x in [0,1], and 0 otherwise.