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

Add: negative index extension to DataInt #121

Open
oscbyspro opened this issue Oct 25, 2024 · 0 comments
Open

Add: negative index extension to DataInt #121

oscbyspro opened this issue Oct 25, 2024 · 0 comments
Labels
addition oh, so shiny! brrr such code, much wow maybe to do, or not to do?

Comments

@oscbyspro
Copy link
Owner

oscbyspro commented Oct 25, 2024

While writing some randomized BinaryInteger/up(Shift) tests (#108), it became apparent that a negative data integer index extension would be convenient. DataInt.Body requires in-bounds accesses, but DataInt extends infinitely in the positive direction. It would be simple to extend it in the negative direction as well; all negative indices would return zero since the fractional part is always zero. I believe it would be consistent with the equivalent fixed-point representation, but I haven't thought much about that aspect of it yet.

@oscbyspro oscbyspro added addition oh, so shiny! brrr such code, much wow maybe to do, or not to do? labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition oh, so shiny! brrr such code, much wow maybe to do, or not to do?
Projects
None yet
Development

No branches or pull requests

1 participant