Created
November 16, 2017 15:05
-
-
Save cr1901/5f6e378cdf06dea387cfd2eec9db5172 to your computer and use it in GitHub Desktop.
Get Unique ARM Constants
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
import itertools | |
valid = itertools.product(range(0,256), [4**i for i in range(0,16)]) | |
const = [] | |
for k, j in valid: | |
const.append(k*j) | |
a = list(set(const)) | |
print(len(a)) | |
b = [] | |
for i in a: | |
if i < 2**32: | |
b.append(i) | |
print(sort(b)) | |
print(len(b)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment