10 lines
No EOL
206 B
Text
10 lines
No EOL
206 B
Text
import "EMBED/u32_to_bits" as to_bits
|
|
|
|
def main(u32 i) -> field:
|
|
bool[32] bits = to_bits(i)
|
|
field res = 0
|
|
for u32 j in 0..32 do
|
|
u32 exponent = 32 - j - 1
|
|
res = res + 2 ** exponent
|
|
endfor
|
|
return res |