|
@@ -1,4 +1,4 @@
|
|
|
-from ..node import OP_ADD, OP_MUL, OP_DIV, OP_POW, OP_NEG
|
|
|
|
|
|
|
+from ..node import OP_ADD, OP_MUL, OP_DIV, OP_POW, OP_NEG, OP_SIN, OP_COS
|
|
|
from .groups import match_combine_groups
|
|
from .groups import match_combine_groups
|
|
|
from .factors import match_expand
|
|
from .factors import match_expand
|
|
|
from .powers import match_add_exponents, match_subtract_exponents, \
|
|
from .powers import match_add_exponents, match_subtract_exponents, \
|
|
@@ -12,10 +12,11 @@ from .fractions import match_constant_division, match_add_constant_fractions, \
|
|
|
from .negation import match_negated_factor, match_negate_polynome, \
|
|
from .negation import match_negated_factor, match_negate_polynome, \
|
|
|
match_negated_division
|
|
match_negated_division
|
|
|
from .sort import match_sort_multiplicants
|
|
from .sort import match_sort_multiplicants
|
|
|
|
|
+from .goniometry import match_add_quadrants, match_negated_parameter
|
|
|
|
|
|
|
|
RULES = {
|
|
RULES = {
|
|
|
OP_ADD: [match_add_numerics, match_add_constant_fractions,
|
|
OP_ADD: [match_add_numerics, match_add_constant_fractions,
|
|
|
- match_combine_groups],
|
|
|
|
|
|
|
+ match_combine_groups, match_add_quadrants],
|
|
|
OP_MUL: [match_multiply_numerics, match_expand, match_add_exponents,
|
|
OP_MUL: [match_multiply_numerics, match_expand, match_add_exponents,
|
|
|
match_expand_and_add_fractions, match_multiply_zero,
|
|
match_expand_and_add_fractions, match_multiply_zero,
|
|
|
match_negated_factor, match_multiply_one,
|
|
match_negated_factor, match_multiply_one,
|
|
@@ -26,4 +27,6 @@ RULES = {
|
|
|
match_remove_negative_exponent, match_exponent_to_root,
|
|
match_remove_negative_exponent, match_exponent_to_root,
|
|
|
match_extend_exponent, match_constant_exponent],
|
|
match_extend_exponent, match_constant_exponent],
|
|
|
OP_NEG: [match_negate_polynome],
|
|
OP_NEG: [match_negate_polynome],
|
|
|
|
|
+ OP_SIN: [match_negated_parameter],
|
|
|
|
|
+ OP_COS: [match_negated_parameter],
|
|
|
}
|
|
}
|