Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Or

-- Operator: or The logical disjunction operator. or is an n-ary infix operator; its operands are Boolean expressions, and its result is a Boolean value.

or forces evaluation (like is) of one or more operands, and may force evaluation of all operands.

e:(x1 and not x2) or (x1 and x3) or (not x2 and x3) or (not x1 and not x2 and not x4) or (not x1 and x3 and x4);
  e, x1=true, x2=true, x3= true, x4= true;
e, x1=true, x2=true, x3= true, x4= false;
e, x1=true, x2=true, x3= false, x4= true;
e, x1=true, x2=true, x3= false, x4= false;
e, x1=true, x2=false, x3= true, x4= true;
e, x1=true, x2=false, x3= true, x4= false;
e, x1=true, x2=false, x3= false, x4= true;
e, x1=true, x2=false, x3= false, x4= false;
e, x1=false, x2=true, x3= true, x4= true;
e, x1=false, x2=true, x3= true, x4= false;
e, x1=false, x2=true, x3= false, x4= true;
e, x1=false, x2=true, x3= false, x4= false;
e, x1=false, x2=false, x3= true, x4= true;
e, x1=false, x2=false, x3= true, x4= false;
e, x1=false, x2=false, x3= false, x4= true;
e, x1=false, x2=false, x3= false, x4= false;

Operands are evaluated in the order in which they appear. or evaluates only as many of its operands as necessary to determine the result. If any operand is true, the result is true and no further operands are evaluated.

The global flag prederror governs the behavior of or when an evaluated operand cannot be determined to be true or false. or prints an error message when prederror is true. Otherwise, operands which do not evaluate to true or false are accepted, and the result is a Boolean expression.

or is not commutative: a or b might not be equal to b or a due to the treatment of indeterminate operands.

There are also some inexact matches for or. Try ?? or to see them.

(%o1)                                true
(%i2) 

Related Examples

or

Not(x1 and x2) or (no...

Calculate

or

o0: (not a and not b ...

o1: (not a and b and ...

o2: (not a and not b ...

Calculate

or

f: (h and not c) or (...

f,h=false,c=true,p=true;

f,h=true,c=false,p=fa...

Calculate

or-true

ol1: is1 and not is2 ...

ol1, is1=false,is2=fa...

ol1, is1=false,is2=fa...

Calculate

or-true

y: (not b and c) or (...

y, b=false, c=false;

y, b=false, c=true;

Calculate

or

x_3:(a_3 and a_2) or ...

x_2:(a_3 and a_2) or ...

Calculate

or-true

b1:(not a0 and a1) or...

b1, a0=false,a1=false...

b1, a0=false,a1=false...

Calculate

or

b2: (A2 and A1 and (n...

b2= b21 or b22 or b23;

b2, A0 = false,A1 = t...

Calculate

or-true

f:(not A and B and C)...

f,A=false,B=false,C=f...

f,A=false,B=false,C=t...

Calculate

or

x:(a and f) or (b and...

x, a = false, b = tru...

Calculate