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 converting Big* to U/Int128 #11978

Closed
BlobCodes opened this issue Apr 6, 2022 · 0 comments · Fixed by #13562
Closed

Allow converting Big* to U/Int128 #11978

BlobCodes opened this issue Apr 6, 2022 · 0 comments · Fixed by #13562

Comments

@BlobCodes
Copy link
Contributor

Feature Request

It would be useful to allow converting a BigInt (and other Big objects) into a U/Int128.
This is already possible for all other primitive integers:

BigFloat.new("1").to_u64 #=> 1
BigFloat.new("1").to_u128 #=> undefined method 'to_u128' for BigFloat
BigInt.new("1").to_i128! #=> undefined method 'to_i128!' for BigInt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants