-
Notifications
You must be signed in to change notification settings - Fork 725
Description
Feature Request
Describe the Feature Request
Implement a u252 type
When I am doing bit packing on felt252 (which is the most optimal size) I cannot perform bitwise operations or a division (both are required for unpacking) due to the nature of the felt.
The only alternative right now is to infer into a u256 to performs such operations, but it comes with a trade off of efficiency related to the nature of u256.
Having a u252 would be the ideal solution for a such purpose, giving the ability to infer from and to felt252.
Note: I expect the Bounded::max() to be Prime - 1 and not 2**252 - 1 to ease the conversion.
Describe Preferred Solution
Similar to other unsigned integers
Additional Context
If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)
- Yes
- No