Commit 0b79a3e7 authored by Kittisak Maneewong's avatar Kittisak Maneewong

Edit Converter

parent 80647659
......@@ -4,4 +4,4 @@ def double(v):
sign=1 if v[0]=='0' else -1
e=sum([int(v[i])*(2**(11-i)) for i in range(1,12)])
x=1+sum([int(v[i])*(2**(11-i)) for i in range(12,64)])
return sign*x*2**(e-1023)
print(sign*x*2**(e-1023))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment