generated from eigerco/beerus
-
Notifications
You must be signed in to change notification settings - Fork 101
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
feat: add pow2 and pow10 utilizing const arrays #323
Labels
enhancement
Enhancement of the code, not introducing new features.
Comments
milancermak
added
the
enhancement
Enhancement of the code, not introducing new features.
label
Aug 6, 2024
can i take this up |
Hey @PavitraAgarwal21! |
Is this issue still open? I'd like to complete it, but can't find a way to apply for it on onlydust |
Hey @oluwa-peski! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Describe the Feature Request
Cairo 2.7.0 brought back the use of
dw
in const array. In Cairo0, it was used by a lot of projects to have the most efficient implementation of power of 2 and power of 10 since instead of looping it's just a lookup table.pow2 and pow10 are the most commonly used powers - for example, the former is used in Alexandria as well for bitshifting, the latter is often used for defi applications as we deal with powers of ERC20.decimals there.
Describe Preferred Solution
Something like:
And similarly for
pow2
.Related Code
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)
The text was updated successfully, but these errors were encountered: