Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/ethereum/research
/ bit_length
Method
bit_length
binius/binary_fields.py:98–99 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
96
return
'<'
+str(self.value)+
'>'
97
98
def
bit_length(self):
99
return
1 << (self.value.bit_length() - 1).bit_length()
100
101
def
to_bytes(self, length, byteorder):
102
assert length >= (self.bit_length() + 7) // 8
Callers
15
to_bytes
Method · 0.95
next_power_of_two
Function · 0.80
reverse_bit_order
Function · 0.80
compute_size
Function · 0.80
verify_packed_binius_proof
Function · 0.80
log2
Function · 0.80
get_branch
Function · 0.80
binmul
Function · 0.80
inv
Method · 0.80
log2
Function · 0.80
reverse_bit_order
Function · 0.80
compress
Function · 0.80
Calls
no outgoing calls
Tested by
1
compute_size
Function · 0.64