Skip to content

Conversation

@ayush9398
Copy link
Contributor

This partially solves issue #141

  • Added property reduced in the Expression class.
  • Added a class method, get_reduced() to simplify the expression.
  • If the expression is simplified to a single token, the class type changes from Expression to appropriate Function class.

@8hantanu
Copy link
Member

8hantanu commented Apr 21, 2019

Can you add some tests for the above?
Also, note you might need to add an extra check if the expression needs to be simplified.
For example, when solving for y in x - 2yz + 1= 0 the resultant expression y=-0.5*((-1.0-x)/z) can be reduced but must not be reduced.

@ayush9398
Copy link
Contributor Author

Hey @8hantanu , I have added the test function.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants