Commit 41f9f744 authored by Taddeus Kroes's avatar Taddeus Kroes

Added some TODO's to numeric rules.

parent 4378743c
...@@ -114,10 +114,12 @@ def match_divide_numerics(node): ...@@ -114,10 +114,12 @@ def match_divide_numerics(node):
if 1 < gcd <= nv: if 1 < gcd <= nv:
# 2 / 4 -> 1 / 2 # 2 / 4 -> 1 / 2
# TODO: Test with negations!
return [P(node, reduce_fraction_constants, (gcd,))] return [P(node, reduce_fraction_constants, (gcd,))]
if nv > dv: if nv > dv:
# 4 / 3 -> 1 + 1 / 3 # 4 / 3 -> 1 + 1 / 3
# TODO: Test with negations!
return [P(node, fraction_to_int_fraction, return [P(node, fraction_to_int_fraction,
((nv - mod) / dv, mod, dv))] ((nv - mod) / dv, mod, dv))]
elif n.is_numeric() and d.is_numeric(): elif n.is_numeric() and d.is_numeric():
......
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