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

Allow underscores in big"[float]" #43346

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Conversation

ettersi
Copy link
Contributor

@ettersi ettersi commented Dec 6, 2021

Fixes #40368

@ettersi
Copy link
Contributor Author

ettersi commented Dec 6, 2021

I believe the failing test is unrelated to this PR and related to #43125 instead.

@test big"1_0_0_0" == BigInt(1000)
@test_throws ArgumentError big"1_0_0_0_"
@test_throws ArgumentError big"_1_0_0_0"

@test big"1_0.2_5" == BigFloat(10.25)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do these tests belong in int.jl? I guess it doesn't really matter...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. It's a consequence of the big"[float]" code being in base/int.jl, which was true already before this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough. Not worth fixing.

@oscardssmith oscardssmith added bignums BigInt and BigFloat maths Mathematical functions merge me PR is reviewed. Merge when all tests are passing and removed merge me PR is reviewed. Merge when all tests are passing labels Dec 6, 2021
@oscardssmith oscardssmith merged commit db1d2f5 into JuliaLang:master Dec 6, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bignums BigInt and BigFloat maths Mathematical functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Underscores in big_str macro for floats
2 participants