Advertisement
Guest User

llvm is lelijk

a guest
Apr 23rd, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. def float_to_dirty_hex(f):
  2.     single_precision_rep = struct.pack('>f', f)
  3.     single_precision_val = struct.unpack(">f", a)
  4.     double_val = struct.pack('>d', single_precision_val)
  5.     double_hex = "0x" + double_val
  6.     return double_hex
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement