Comment on Exact UNORM8 to float by FordPerfect
There's also a somewhat clumsy option of intBitsToFloat(floatBitsToInt(float(x)0x10101p-24f)+(x>0)). In denormals-are-zero environment, plain intBitsToFloat(floatBitsToInt(float(x)0x10101p-24f)+1) probably "works" as well. The constant is just 1/255 rounded down.
评论
?
参与讨论