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

Make the lexer accept scientific notation #1456

Merged
merged 2 commits into from
Jul 17, 2023
Merged

Conversation

vkleen
Copy link
Contributor

@vkleen vkleen commented Jul 17, 2023

Since we were alread using malachite's scientific notation parser for parsing numbers, the only thing stopping #1361 was the lexer not supporting scientific notation. This would technically be a breaking change, since previously f 1e6 would be parsed as f applied to the number 1 and the variable e6, while now it would be parsed as f applied to one million. I hope that nobody relies on this behaviour but it's worth considering, given our (informal, for now) stability guarantee.

@vkleen vkleen requested a review from yannham July 17, 2023 12:33
@github-actions github-actions bot temporarily deployed to pull request July 17, 2023 12:38 Inactive
Copy link
Member

@yannham yannham left a comment

Choose a reason for hiding this comment

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

Might be worth a documentation update. The fact that we are currently parsing 1e6 as 1 e6 is both useless and should be considered a bug in the current implementation (not very pressing, but still), so I don't think it should be part of the informal backward compatibility guarantee.

@github-actions github-actions bot temporarily deployed to pull request July 17, 2023 14:21 Inactive
@vkleen vkleen enabled auto-merge July 17, 2023 14:22
@vkleen vkleen added this pull request to the merge queue Jul 17, 2023
Merged via the queue into master with commit da07e3e Jul 17, 2023
4 checks passed
@vkleen vkleen deleted the feat/scientific-notation branch July 17, 2023 15:24
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