# Pastebin AOtNE8ef local sign,frac,exp=string.format("%a",v):match("(%-?)0x1%.?(%x-)p%+?([%d-]+)") exp = tonumber(exp, 16) frac = tonumber(frac, 16) local bOne = 0x00 if sign == "-" then bitOne = ba(bOne, 0x80) end bOne = bOne + ba(brs(exp, 1), 0x7F) local bTwo = bls(ba(exp, 0x0F), 4) bTwo = bTwo + ba(brs(frac, 48), 0x0F) return sc(tsf.tags.DOUBLE) .. encodeNumberToBytes(ba(frac, 0xFFFFFFFFFFFF), 6) .. sc(bTwo) .. sc(bOne)