local function l(l,y,S,T)local s=-1^bit.rshift(T,7)local i=bit.rshift(S,7)+bit.lshift(bit.band(T,127),1)local I=(l+bit.lshift(y,8))+bit.lshift(bit.band(S,127),16)local v=1 if i==0 then if I==0 then return s*0 else v=0 i=1 end elseif i==127 then if I==0 then return s*(1/0)else return s*(0/0)end end return(s*2^(i-127))*(1+v/8388608.0)end
-- float rd_flt_basic(byte f1..8)
-- @f1..4 - The 4 bytes composing a little endian float
local function rd_flt_basic(f1, f2, f3, f4)
	local sign = (-1) ^ bit.rshift(f4, 7)
	local exp = bit.rshift(f3, 7) + bit.lshift(bit.band(f4, 0x7F), 1)
	local frac = f1 + bit.lshift(f2, 8) + bit.lshift(bit.band(f3, 0x7F), 16)
	local normal = 1

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

	return sign * 2 ^ (exp - 127) * (1 + normal / 2 ^ 23)
end
