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

Fix to the missing parentheses issue #380 #385

Merged
merged 2 commits into from
Feb 1, 2015

Conversation

Sumith1896
Copy link
Contributor

printing: fix to the missing parentheses issue #380
Example:

In[1]: (Integer(3)/2)**(Integer(1)/2)

Before fix-Out[1]: 3/2^(1/2)
After fix-Out[1]:(3/2)^(1/2)

Added 3 more tests in test_printing.cpp to test the fix.

In[1]: (Integer(23))*((Integer(5)/2)**(Integer(1)/2))*((Integer(7)/3)**(Integer(1)/2))
Out[1]: 23*(7/3)^(1/2)*(5/2)^(1/2)

In[2]: ((symbols('x')/2)**(Integer(1)/2))
Out[2]: ((1/2)*x)^(1/2)

In [3]: (Integer(3)/2)**(Integer(1)/3)
Out[3]: (3/2)^(1/3) 

Fixed the missing parentheses issue in printing

Example:
In[1]: (Integer(3)/2)**(Integer(1)/2)
Before fix-Out[1]: 3/2^(1/2)
After fix-Out[1]:(3/2)^(1/2)
Added 3 tests after the fix of the printing issue of missing parentheses.

Example:
In[1]: (Integer(3)/2)**(Integer(1)/2)
Out[1]: (3/2)^(1/2)
@certik
Copy link
Contributor

certik commented Feb 1, 2015

That looks great, thanks!

certik added a commit that referenced this pull request Feb 1, 2015
Fix to the missing parentheses issue #380
@certik certik merged commit 516b8d0 into symengine:master Feb 1, 2015
@certik
Copy link
Contributor

certik commented Feb 1, 2015

@Sumith1896 what is your full name, so that we can put it to AUTHORS?

@Sumith1896
Copy link
Contributor Author

@certik It is just Sumith,that's it even in official records.Hope that's not a problem.

@certik
Copy link
Contributor

certik commented Feb 1, 2015

No problem at all, I was just checking. I've added you in #386.

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