Closed
Conversation
* Added new rounding mode: round_nearest_even: round to nearest tying to even. * Modified round_digits to accomodate for this new mode.
* Wrote abs_rounding function. * Replaced part of the code in to_str with a call to round_digits. * Added tests for different kinds of rounding in test_convert.py
* Add new symbol, 'M', for rounding to nearest with tying away from zero. * Replaced part of the code in format_mpf with a call to abs_rounding * Added tests for the M rounding mode.
* Add new symbol, 'Y', for rounding away from zero. * Added tests for the Y rounding mode.
* The default for the rounding parameter is None. * If rounding is None, a DeprecationWarning is raised; the rounding part of the code executes legacy code * Else, the new round_digits function is called
* Made all the dunder methods that call to_str to include the rounding parameter obtained from context. This is to avoid the new deprecation warning in to_str.
Modified the call to to_str in mpc_to_str to include the rounding parameter taken from context.
Collaborator
Author
|
Successful for the Diofant. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.