-
Notifications
You must be signed in to change notification settings - Fork 4
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
Make a list of invariants that maintainers are suppossed to uphold #26
Comments
This is a good idea and I thought that this already existed but can't find it myself.
These properties are of course propagated to |
Add to that
Before I got into writing these algorithms I thought that left or right shifts more than or equal to the bitwidth should return 0 instead of erroring. I realize now that having the invariant allows for certain optimizations and prevents corner cases around
I'm thinking that we should include the reasoning to why these invariants are in public documentation, because only two months ago I thought some were ridiculous. |
Some of my functions rely on the unused bits of inputs being cleared. I currently assume that all functions (except maybe for functions that allow access to the raw
Digit
s) will not produce ApInts with unused bits. Are there any other invariants that should be upheld, because we should document it and put it in lib.rs or mod.rs?The text was updated successfully, but these errors were encountered: