Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
trs
Commits
dd5f8afc
Commit
dd5f8afc
authored
Feb 28, 2012
by
Sander Mathijs van Veen
Browse files
Options
Browse Files
Download
Plain Diff
Fixed merge conflict in TODO list.
parents
5acc67df
1813271c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
TODO
TODO
+14
-1
src/rules/numerics.py
src/rules/numerics.py
+2
-0
No files found.
TODO
View file @
dd5f8afc
# vim: set fileencoding=utf-8 :
- Fix BisonSyntaxError location tracking.
- Sort polynom by its exponents?
...
...
@@ -70,7 +72,6 @@ Division of 0 by 1 reduces to 0.
>>> @
2 / 7 + 4 / 11
- Cancel terms before multiplying constants: (3 * ...) / (3 * ...) -> ... / ...
>>> (7/3)*(3/5)
7 / 3 * (3 / 5)
...
...
@@ -89,3 +90,15 @@ Division of 0 by 1 reduces to 0.
>>> @
7 / 5
- filter_duplicates does not seem to work anymore...
- Fix error while parsing unicode PI:
>>> sin(1/2 * pi)
sin(1 / 2 * π)
>>> @
unknown char � ignored.
unknown char � ignored.
ERROR: 41.7-41.8: "syntax error, unexpected TIMES" near "*".
ERROR: 41.14-41.15: "syntax error, unexpected RPAREN" near ")".
- No matches for sin(pi), sin(2pi), sin(4pi), etc...
src/rules/numerics.py
View file @
dd5f8afc
...
...
@@ -114,10 +114,12 @@ def match_divide_numerics(node):
if
1
<
gcd
<=
nv
:
# 2 / 4 -> 1 / 2
# TODO: Test with negations!
return
[
P
(
node
,
reduce_fraction_constants
,
(
gcd
,))]
if
nv
>
dv
:
# 4 / 3 -> 1 + 1 / 3
# TODO: Test with negations!
return
[
P
(
node
,
fraction_to_int_fraction
,
((
nv
-
mod
)
/
dv
,
mod
,
dv
))]
elif
n
.
is_numeric
()
and
d
.
is_numeric
():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment