local function A(A,L,D,T,h,R,E,S)local U=bit.rshift(S,7)local m=bit.lshift(bit.band(S,127),4)+bit.rshift(E,4)local V=bit.band(E,15)*2.8147497671066e+14 local b=1 V=(((((V+R*1099511627776.0)+h*4294967296.0)+T*16777216.0)+D*65536.0)+L*256.0)+A if m==0 then if V==0 then return U*0 else b=0 m=1 end elseif m==2047 then if V==0 then return U*(1/0)else return U*(0/0)end end return(-1^U*2^(m-1023))*(b+V/4.5035996273705e+15)end

local function rd_dbl_basic(f1, f2, f3, f4, f5, f6, f7, f8)
	local sign = 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 (-1) ^ sign * 2 ^ (exp - 1023) * (normal + frac / 2 ^ 52)
end
