local function g(g,T,X,E,a,s,c,O)local B=-1^bit.rshift(O,7)local z=bit.lshift(bit.band(O,127),4)+bit.rshift(c,4)local H=bit.band(c,15)*2.8147497671066e+14 local Z=1 H=(((((H+s*1099511627776.0)+a*4294967296.0)+E*16777216.0)+X*65536.0)+T*256.0)+g if z==0 then if H==0 then return B*0 else Z=0 z=1 end elseif z==2047 then if H==0 then return B*(1/0)else return B*(0/0)end end return(B*2^(z-1023))*(Z+H/4.5035996273705e+15)end
-- double rd_dbl_basic(byte f1..8)
-- @f1..8 - The 8 bytes composing a little endian double
local function rd_dbl_basic(f1, f2, f3, f4, f5, f6, f7, f8)
	local sign = (-1) ^ bit.rshift(f8, 7)
	local exp = bit.lshift(bit.band(f8, 0x7F), 4) + bit.rshift(f7, 4)
	local frac = bit.band(f7, 0x0F) * 2 ^ 48
	local normal = 1

	frac = frac + (f6 * 2 ^ 40) + (f5 * 2 ^ 32) + (f4 * 2 ^ 24) + (f3 * 2 ^ 16) + (f2 * 2 ^ 8) + f1 -- help

	if exp == 0 then
		if frac == 0 then
			return sign * 0
		else
			normal = 0
			exp = 1
		end
	elseif exp == 0x7FF then
		if frac == 0 then
			return sign * (1 / 0)
		else
			return sign * (0 / 0)
		end
	end

	return sign * 2 ^ (exp - 1023) * (normal + frac / 2 ^ 52)
end
