Online Algebra Calculator
Many of users do not use powerful Maxima computer algebra system for systematic work, but for ad hoc algebraic calculations – equations, functions, matrixes, etc. only. To do this job, it is not useful to download the whole application from a web site.
Function: charfun (<p>) 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] There are also some inexact matches for charfun. Try ?? charfun to see them.
(%o1) true (%i2)