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

Expose unchecked shift methods #131

Closed
oscbyspro opened this issue Jun 10, 2023 · 2 comments
Closed

Expose unchecked shift methods #131

oscbyspro opened this issue Jun 10, 2023 · 2 comments
Labels
addition oh, so shiny!
Milestone

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Jun 10, 2023

I've already exposed them in Numberick, but I aught to do it here as well. It's probably more important here because it's not possible to efficiently mask non-powers-of-two. See (#130).

@oscbyspro oscbyspro added the addition oh, so shiny! label Jun 10, 2023
@oscbyspro oscbyspro added this to the v3.0.0 milestone Jun 10, 2023
@oscbyspro
Copy link
Owner Author

oscbyspro commented Jun 10, 2023

Hm. I suppose I managed to precondition these methods in Numberick whereas bounds checking is much worse here.

@oscbyspro
Copy link
Owner Author

oscbyspro commented Jun 12, 2023

mutating func bitshiftLeftSmart(by: Int)
func bitshiftedLeftSmart(by: Int) -> Self

mutating func bitshiftLeftUnchecked(by: Int)
func bitshiftedLeftUnchecked(by: Int) -> Self

mutating func bitshiftLeftUnchecked(words: Int, bits: Int)
func bitshiftedLeftUnchecked(words: Int, bits: Int) -> Self
mutating func bitshiftRightSmart(by: Int)
func bitshiftedRightSmart(by: Int) -> Self

mutating func bitshiftRightUnchecked(by: Int)
func bitshiftedRightUnchecked(by: Int) -> Self

mutating func bitshiftRightUnchecked(words: Int, bits: Int)
func bitshiftedRightUnchecked(words: Int, bits: Int) -> Self

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition oh, so shiny!
Projects
None yet
Development

No branches or pull requests

1 participant