Added additional possibility messages.

parent b76e0386
......@@ -138,9 +138,7 @@ def add_exponents(root, args):
return nary_node('*', scope)
#MESSAGES[add_exponents] = _('Add the exponents of {1[0]} and {1[1]}, which'
# ' will reduce to {1[0][0]}^({1[0][1]} + {1[1][1]}).')
MESSAGES[add_exponents] = _('Add the exponents of {1} and {2}, which'
MESSAGES[add_exponents] = _('Add the exponents {1} and {2}, which'
' will reduce to {1[0]}^({1[1]} + {2[1]}).')
......@@ -153,6 +151,10 @@ def subtract_exponents(root, args):
return a ** (p - q)
MESSAGES[subtract_exponents] = _('Substract the exponents {1} and {2},'
' which will reduce to {1[0]}^({1[1]} - {2[1]}).')
def multiply_exponents(root, args):
"""
(a^p)^q -> a^(pq)
......@@ -162,6 +164,10 @@ def multiply_exponents(root, args):
return a ** (p * q)
MESSAGES[multiply_exponents] = _('Multiply the exponents {1} and {2},'
' which will reduce to {1[0]}^({1[1]} * {2[1]}).')
def duplicate_exponent(root, args):
"""
(ab)^p -> a^p * b^p
......@@ -176,6 +182,10 @@ def duplicate_exponent(root, args):
return result
MESSAGES[duplicate_exponent] = _('Duplicate the exponents {1} and {2},'
' which will reduce to {1[0]}^({1[1]} * {2[1]}).')
def remove_negative_exponent(root, args):
"""
a^-p -> 1 / a^p
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment