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:

And

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

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

b0:(a0 and (not a1) and (not a2))or((not a0) and (not a1) and a2)or(a0 and a1 and a2)or ((not a0) and a1 and (not a2));
b1:(a0 and (not a1) and (not a2)) or ((not a0) and a1 and a2);
b2: a2 and a0;
b3: a2 and a1;
b0, a0=false,a1=false,a2=false;
b1, a0=false,a1=false,a2=false;
b2, a0=false,a1=false,a2=false;
b3, a0=false,a1=false,a2=false;
b0, a0=true,a1=false,a2=false;
b1, a0=true,a1=false,a2=false;
b2, a0=true,a1=false,a2=false;
b3, a0=true,a1=false,a2=false;
b0, a0=false,a1=true,a2=false;
b1, a0=false,a1=true,a2=false;
b2, a0=false,a1=true,a2=false;
b3, a0=false,a1=true,a2=false;

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

The global flag prederror governs the behavior of and when an evaluated operand cannot be determined to be true or false. and 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.

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

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

(%o1)                                true
(%i2) 

Related Examples

and-if-labels-lambda-let-not-or

:lisp (defun emit-+ (...

:lisp (defun emit-* (...

:lisp (defun emit-pow...

Calculate

and-or

x: ((not a) and (not ...

Calculate

and-or

b0 = (not a1) or ((no...

b0, a0=false,a1=false...

Calculate

and-or

F0: (I0 and (not I3))...

F0, I0=false, I1=fals...

F0, I0=true, I1=false...

Calculate

and

f: (a or (not c) or b...

Calculate

and-false-or

g:(x1 and (notx2)) or...

g, x1=true, x2=true, ...

g, x1=true, x2=true, ...

Calculate

and

g: (a or f) and ( b o...

g, a = true, b = fals...

Calculate

and-equal-part-reveal

ans: ((equal(x , ( (%...

reveal(ans,1);

part(ans,1);

Calculate

and-block-floor-length-print

delit(c,d):=block([j:...

delit(2,6);

Calculate

and-or

b0:(not a1) or ((not ...

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

b2: a2 and a0;

Calculate