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

fix(stdlib): Properly handle extremely large integer bases in Number.(**) #1950

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

spotandjake
Copy link
Member

@spotandjake spotandjake commented Jan 2, 2024

This pr cleans up a tiny bit in Number.pow it also fixes a small edge case mistake, and adds a regression test.

edit:
The bug was introduced during the refactor to use early return, for extremely high powers done on floating point bases we were previously returning the z variable which is an internal variable rather than output which caused the awnsers to be incorrect.

@spotandjake spotandjake added the documentation Issues related to documentation. label Jan 2, 2024
@spotandjake spotandjake self-assigned this Jan 2, 2024
@phated
Copy link
Member

phated commented Jan 20, 2024

@spotandjake can you please update the PR title to be a fix(stdlib) and explain the bug you fixed. Bug fixes never get hidden in a chore

@spotandjake spotandjake changed the title chore(stdlib): Cleanup Number.(**) function fix(stdlib)!: Fix behavour of Number.(**) with regard to extremely high integer bases Jan 22, 2024
@spotandjake spotandjake changed the title fix(stdlib)!: Fix behavour of Number.(**) with regard to extremely high integer bases fix(stdlib)!: Fix behavour of Number.(**) with regard to extremely large integer bases Jan 22, 2024
@spotandjake
Copy link
Member Author

@spotandjake can you please update the PR title to be a fix(stdlib) and explain the bug you fixed. Bug fixes never get hidden in a chore

made that change

@phated phated changed the title fix(stdlib)!: Fix behavour of Number.(**) with regard to extremely large integer bases fix(stdlib): Fix behavour of Number.(**) with regard to extremely large integer bases Jan 25, 2024
@phated phated changed the title fix(stdlib): Fix behavour of Number.(**) with regard to extremely large integer bases fix(stdlib): Properly handle extremely large integer bases in Number.(**) Jan 25, 2024
@phated phated added this pull request to the merge queue Jan 25, 2024
Merged via the queue into grain-lang:main with commit 84c076f Jan 25, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issues related to documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants