local function f(f,S,v,h)local l=-1^bit.rshift(h,7)local u=bit.rshift(v,7)+bit.lshift(bit.band(h,127),1)local N=(f+bit.lshift(S,8))+bit.lshift(bit.band(v,127),16)local P=1 if u==0 then if N==0 then return l*0 else P=0 u=1 end elseif u==127 then if N==0 then return l*(1/0)else return l*(0/0)end end return(l*2^(u-127))*(1+P/8388608.0)end

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
