Skip to content

log2 numeric type #15

@mvirts

Description

@mvirts

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions