Function: inpart (<expr>, <n_1>, ..., <n_k>) is similar to
part but works on the internal representation of the expression rather than the displayed form and thus may be faster since no formatting is done. Care should be taken with respect to the order of subexpressions in sums and products (since the order of variables in the internal form is often different from that in the displayed form) and in dealing with unary minus, subtraction, and division (since these operators are removed from the expression).
part (x+y, 0) or
inpart (x+y, 0) yield
+, though in order to refer to the operator it must be enclosed in
"s. For example
... if inpart (%o9,0) = "+" then ....
(%i1) x + y + w*z; (%o1) w z + y + x (%i2) inpart (%, 3, 2); (%o2) z (%i3) part (%th (2), 1, 2); (%o3) z (%i4) limit (f(x)^g(x+1), x, 0, minus); g(x + 1) (%o4) limit f(x) x -> 0- (%i5) inpart (%, 1, 2); (%o5) g(x + 1)
There are also some inexact matches for
?? inpart to see them.
(%o1) true (%i2)