Skip to content
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

log2 numeric type #15

Open
mvirts opened this issue Aug 2, 2022 · 0 comments
Open

log2 numeric type #15

mvirts opened this issue Aug 2, 2022 · 0 comments

Comments

@mvirts
Copy link

mvirts commented Aug 2, 2022

New numeric type that only stores the next lower power of 2

print(log2(16))
16
print(log2(19))
16
print(log2(9))
8

it would still participate in math operations like a normal integer, but would only store the exponent.

Could also introduce types in other bases (8,10,16,64)

alternate names
'sinking point' sink2
'point blank' pb2
'exponent 2' xp2
'just the point' jtp2
'mantissaless float' mf2
'one float' of2

math.log2 specialization would be easy to implement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant