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.

i:(not b and not c) or (not a and b and not c) or (not a and not b and c and d) or (a and not b and c and not d);
i,a=false,b=false,c=false,d=false;
i,a=true,b=false,c=false,d=false;
i,a=false,b=true,c=false,d=false;
i,a=false,b=false,c=true,d=false;
i,a=false,b=false,c=false,d=true;
i,a=true,b=true,c=false,d=false;
i,a=true,b=false,c=true,d=false;
i,a=true,b=false,c=false,d=true;
i,a=false,b=true,c=true,d=false;
i,a=false,b=true,c=false,d=true;
i;
a=false,b=false,c=true,d=true;
i,a=true,b=true,c=true,d=false;
i,a=true,b=true,c=false,d=true;
i,a=true,b=false,c=true,d=true;
i,a=false,b=true,c=true,d=true;
i,a=true,b=true,c=true,d=true;

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-true

x: a0 and b1;

n: not a1 and b0;

y: a1 and b0;

Calculate

or

output1 = (not A and ...

output2 = (not A and ...

output3 = (not A and ...

Calculate

or

f:(A and not C) or (n...

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

Calculate

or-true

b2:(a2 and not a1 and...

b2,a3=false,a2=false,...

b2,a3=false,a2=false,...

Calculate

or

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

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

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

Calculate

or-true

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

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

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

Calculate

or

l0: (not a2 and not a...

l0, a3=false, a2=fals...

Calculate

or

f:(E and F) or (D and...

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

Calculate

or-true

s0: (a1) or (a2) or (...

s1: (a0 and a3) or (a...

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

Calculate

or

w:(d and e) or (d and...

w,a=true,b=false,c=fa...

w,a=true,b=false,c=fa...

Calculate