Previous Up Next

5.1.4  Logical operators

Booleans can be combined to form new booleans. For example with and, the statement “bool1 and bool2” is true if both bool1 and bool2 are true, otherwise the statement is false.

Xcas has the standard boolean operators, as follows (a and b are two booleans):

Examples

1>=0 or 1<0
     
1           
1>=0 xor 1>0
     
0           
1>=0 and 1>0
     
1           
not(0==0)
     
0           

Previous Up Next