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

Support arbitrary precision input in cw_convert_base for supported radix. #373

Conversation

paolomorandini
Copy link
Contributor

This change introduces the use of BigInt (arbitrary precision integer numbers) in cw_convert_base.
BigInt will be used for supported radix (2,8,10,16) else the function will default to parseInt which can safely represent integer numbers within approximately +/- 2^53.

Copy link

@arotenberg-google arotenberg-google left a comment

Choose a reason for hiding this comment

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

Can we just do a manual conversion? At least for the case where we currently fall back to parseInt, so that we have identical behavior across all bases and not behavior that works for large magnitude integers for some bases and not others.

@danieldeleo danieldeleo merged commit 62cdffd into GoogleCloudPlatform:master Jul 19, 2023
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.

3 participants