Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement simple constant folder #11

Closed
vgvassilev opened this issue Jun 16, 2014 · 2 comments
Closed

Implement simple constant folder #11

vgvassilev opened this issue Jun 16, 2014 · 2 comments
Assignees
Milestone

Comments

@vgvassilev
Copy link
Owner

The chained rule of differentiation produces a lot of trivial constants to fold. For example:
return 1 + (0) + (1) + (0) + (1).

@vgvassilev vgvassilev added this to the GSoC14 End milestone Aug 6, 2014
vgvassilev added a commit that referenced this issue Aug 13, 2014
More robust implementation of the trivial folding. I.e now it can fold floating
points, not only literals. Also handles the cases:

  0 * smth or smth * 0 == 0
  1 * smth or smth * 1 == smth
  smth +- 0 == smth
  0 / smth == 0

We need proper tests for those cases.
@vgvassilev
Copy link
Owner Author

We need to make the tests compatible with constant folder turned on and turned off. For debugging purpuses in future it may be better to turn off the folder.

@vgvassilev
Copy link
Owner Author

The constant folding facility is there and I'd consider that completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants