35:24 Of course float2fix cant use left shift for multiplication since a is floating-point value. However fix2float can use right shift by 15 instead of dividing by 32768.0 since a is still an integer.
@douglasfanucchi3 ай бұрын
I don't think you could divide like that because your bits would not be organized as a floating point should be. Separated by sign bit, mantissa and fractional numbers
@onurertek24662 жыл бұрын
Thank you for this video. It helps me a lot.
@varunnagpal22587 ай бұрын
27:30 I think it int2fix and fix2int macros may not be correct. Doesn't int2fix requires right shift by 15 (divide by 2^15) since you are shifting binary point to the left by 15 index positions ? Similarly fix2int would require left shift by 15 (multiply by 2^15) since you are shifting binary point towards right by 15 index positions ? For example int2fix(32768) should be 1 and fix2int(1) should be 32768
@douglasfanucchi3 ай бұрын
Aparently your idea of conversion is "what this bits represents into the other data type" instead of "how to reach the same value representation on the other data type, which has different bits organization", and the last interpretation of conversion seems more correct