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

L0: (a3 and a2 and (n...

L1: (a1 and a0) or (a...

L2: ((not a3) and a1 ...

Calculate

or-true

f:(W and not Y) or (n...

f,W=false,X=false,Y=f...

f,W=false,X=false,Y=f...

Calculate

or

f:(a1 and a2) or (a0 ...

f,a2=false,a1=false,a...

f,a2=true,a1=false,a0...

Calculate

or

X:((A and F) or (B an...

Y:((C and D) or (A an...

X, A=false, B=true, C...

Calculate

or-true

L1:(A and C) or (A an...

L1,A=false,B=false,C=...

L1,A=false,B=false,C=...

Calculate

or

f: (not a3 and a1 and...

f,a3=false,a2=false,a...

Calculate

or

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

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

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

Calculate

or-true

eq001 :(not a and b a...

eq001, a = false, b =...

eq001, a = false, b =...

Calculate

or

s2:(A1 and not A2 and...

s2,A1 = false, A2 = f...

s2,A1 = true, A2 = fa...

Calculate

or-true

f1:(a0 and a3) or (a0...

f1,a3=false,a2=false,...

f1,a3=false,a2=false,...

Calculate