Comparison functions
In results of comparisons 1 stands for TRUE, 0 stands for FALSE.
Arguments of comparison functions are numbers. Comparison functions
are listed in the table.
Function |
Value |
lt(a,b) |
1, if a is less then b, otherwise 0 |
le(a,b) |
1, if a is less or equal then b, otherwise 0 |
gt(a,b) |
1, if a is greater then b, otherwise 0 |
ge(a,b) |
1, if a is greater or equal then b, otherwise 0 |
eq(a,b) |
1, if a is equal to b, otherwise 0 |
ne(a,b) |
1, if a is not equal to b, otherwise 0 |
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.