-
Notifications
You must be signed in to change notification settings - Fork 1
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
DataInt/isCompact #28
Comments
Hm. I suspect that the inverse might be more appropriate. The implementation and behavior of DataInt/isExtended is much more similar to DataInt/isNormal. Both would perform an inequality check and return true when DataInt.Body/isEmpty. |
This is the moment when you wish computers worked at the bit level so you could reasonably use DataInt<U1> and call DataInt/isNormal instead of introducing a new concept. Like, I could call it DataInt/isNormal(Bit.self) or something to that effect. Alternatively, I could add a bitwise view but I have done that twice and removed it twice already. |
Perhaps some conveniences is enough: body.last?.msb != appendix |
Asking whether the last bit in the body extends the bit pattern is another useful query. It is not complicated, but it is quite wordy so it might deserves a name. It's currently simpler to go through DataInt/entropy(), which is obviously a roundabout way of doing it.
The text was updated successfully, but these errors were encountered: