Skip to content
Snippets Groups Projects
Commit eb260889 authored by Sander Mathijs van Veen's avatar Sander Mathijs van Veen
Browse files

Enabled Taddeus' power match and rewrite rules.

parent 5fc4e7c1
No related branches found
No related tags found
No related merge requests found
from ..node import OP_ADD, OP_MUL
from ..node import OP_ADD, OP_MUL, OP_DIV, OP_POW
from .poly import match_combine_polynomes, match_expand
from .powers import match_add_exponents, match_subtract_exponents, \
match_multiply_exponents, match_duplicate_exponent, \
match_remove_negative_exponent, match_exponent_to_root
RULES = {
OP_ADD: [match_combine_polynomes],
OP_MUL: [match_expand],
#OP_MUL: [match_expand, match_add_exponents],
#OP_DIV: [match_subtract_exponents],
#OP_POW: [match_multiply_exponents, match_duplicate_exponent, \
# match_remove_negative_exponent, match_exponent_to_root],
OP_MUL: [match_expand, match_add_exponents],
OP_DIV: [match_subtract_exponents],
OP_POW: [match_multiply_exponents, match_duplicate_exponent, \
match_remove_negative_exponent, match_exponent_to_root],
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment