Reduction rules for MathObject Formulas

From WeBWorK
(Difference between revisions)
Jump to: navigation, search
Sam (Talk | contribs)
(New page: MathObjects reduces mathematical expressions according to a set of reduction rules. These control which expressions are reduced. <!-- table body generated with: grep -hr 'Parser::reduce' ...)
Newer edit →

Revision as of 22:21, 19 March 2008

MathObjects reduces mathematical expressions according to a set of reduction rules. These control which expressions are reduced.


Rule Reduction
0><x 0
0-x -x
0/x 0
0.x 0
0*x 0
0+x x
1^x 1
1*x x
-a-bi -(a+bi)
fn*x x*fn
-n If the number is negative, factor it out and try using that in the reductions of the parent objects.
V_n If the right-hand side is constant and the left is a list extract the given coordinate(s). Return empty lists if we run past the end of the coordinates. Return a simpler extraction if a portion of the extraction can be performed.
x^0 1
x><0 0
x-0 x
x.0 0
x*0 0
x+0 x
-(-x) x
+x x
x^(-1) 1/x
x/1 x
x*1 x
-x=n x=-n
x*n n*x
-x=-y x=y
(-x)><y x><-y
(-x)-y -(x+y)
(-x)/y -(x/y)
(-x).y -(x.y)
(-x)*y -(x*y)
(-x)+y y-x
x><(-y) -(x><y)
x-(-y) x+y
x/(-y) -(x/y)
x.(-y) -(x.y)
x*(-y) -(x*y)
x+(-y) x-y
follow us