-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Overflow condition and negative argument for 'ibin' #18973
Conversation
✅ Hi, I am the SymPy bot (v158). I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like: This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.6. Note: This comment will be updated with the latest check if you edit the pull request. You need to reload the page to see it. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
@smichr Could you please suggest some changes? My doctest is failing continuously. |
@smichr Got it sir. Working on it. |
@smichr Could you please go through the changes? Travis is not working. |
Closed by mistake. Sorry. |
@smichr Work here is almost done. I am getting an error for using n.bitlength(). Could you help me out? |
OK, now 2 tests would be good: |
Yes sir. On it. |
@smichr Sir, with due respect, the Update iterables.py you committed was throwing a travis error so I corrected it. I hope it is fine with you. Could you please correct the ibin(-0.5)? I think that is the last work left in this PR. |
@smichr Sir, please help me with the ibin(-0.5) condition. |
I see: the Note how raises is used to test statements - see last changes. |
@smichr Sir, the error persists. Is it fine if we remove the -0.5 test and go back to the 2 test which was working fine? |
Codecov Report
@@ Coverage Diff @@
## master #18973 +/- ##
=============================================
- Coverage 75.784% 75.759% -0.026%
=============================================
Files 647 648 +1
Lines 168657 168803 +146
Branches 39745 39791 +46
=============================================
+ Hits 127816 127884 +68
- Misses 35279 35353 +74
- Partials 5562 5566 +4 |
getting an overflow answer when you are trying not to do so is...not working ;-) It should be ready to go now. |
It would be good to clean up the commit history:
|
@smichr I am trying to do this but since your commits are there as well, my terminal is constantly throwing an error. Moreover, the commits help the reviewer walk through the changes made. Is it okay if we merge this PR as it is? |
@smichr Sir, I tried again but the issue persists. Please can we merge this PR? |
go ahead and post the errors |
Any easy way to make a single commit from the current state is the following:
then cherrypick the last commit from my |
fatal: ambiguous argument 'head~2': unknown revision or path not in the working tree. |
Let me try to manually do the changes in my file and then push |
That should probably be 'HEAD~2' if your system is sensitive to the case of characters in file names. |
Commit 2 Commit 3 "All" condition incorporated n condition implemented Tests added Value error Bugs fixed Changes required
Overflow condition and negative argument for 'ibin'
References to other Issues or PRs
Fixes #18963
Brief description of what is fixed or changed
Currently, sympy.utilitities.iterables.ibin passes silently, returning all bits of a number even if the requested bit length is too small. The user can omit the bits argument to get all bits; they should be warned if they request a certain length and the number has more than that many bits since this could indicate a logical error in their code. e.g. 3 bits are required but the user-specified 2 bits
Also, a negative argument is given error condition
Other comments
Release Notes