forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-38998: Allow construct RIF element from question-style string
As in the title. It allows you to say e.g. `RIF("1.23?2e-5")`. Partially handles sagemath#36797. (only for real case. Complex case is not handled yet, but in principle it should not be too difficult.) (I don't see any disadvantage of allowing this, it's backwards compatible) Issue: currently ``` sage: RIF("10", base=37) 37 sage: ZZ("10", base=37) [error] ``` should this inconsistency be fixed? If so how? [Edit: actually the rule of conversion should probably follow [string to mpfr conversion rule](https://www.mpfr.org/mpfr-current/mpfr.html#index- mpfr_005fstrtofr) or [string to mpz conversion rule](https://gmplib.org/manual/Assigning-Integers) ] ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. (there's no documentation change, but should we explicitly mention the feature? I think the feature to construct from `[a..b]` isn't explicitly mentioned either…?) ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> sagemath#39001 URL: sagemath#38998 Reported by: user202729 Reviewer(s): Travis Scrimshaw
- Loading branch information
Showing
3 changed files
with
251 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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