You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a crate ordered with a trait ArbitraryOrd for things like this where it would be "useful" to have an ordering, but there isn't any (or there are multiple) sensible orderings for the type.
I'd prefer you add an optional dependency on that, which implements the ArbitraryOrd trait.
Yes, but u5 was intended to be analagous to u8, u16, etc., which pretend to be integers even though they are actually integers mod 2^n. We never took a principled approach to its API but if we did it would have implemented arithmetic ops in the "ordinary" way where they behaved like integers except in cases of overflow and underflow. We manually simulated field arithmetic using this type by using bit operations.
Fe32 directly represents a field element in an unordered field, where there is no "overflow" or "underflow", and where no matter how you defined an ordering, x + 1 > x could be true at most half the time, etc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #187 .
Add derived
Ordtrait toFe32, and tests.Implementation is trivial (derived), but this can be useful.