charat SciMax Toolbox charfun2

SciMax Toolbox >> charfun

charfun

Maxima Function

Calling Sequence

charfun (p)

Description

Return 0 when the predicate p evaluates to false; return 1 when the predicate evaluates to true. When the predicate evaluates to something other than true or false (unknown), return a noun form.

Examples:

(%i1) charfun (x < 1);
(%o1)                    charfun(x < 1)
(%i2) subst (x = -1, %);
(%o2)                           1
(%i3) e : charfun ('"and" (-1 < x, x < 1))$
(%i4) [subst (x = -1, e), subst (x = 0, e), subst (x = 1, e)];
(%o4)                       [0, 1, 0]
charat SciMax Toolbox charfun2