2020-08-27 02:14 PM
Hello
I was wondering about nubering in q15 fixed point
I am guessing that in 1.15, 1 (msb) is responsible for sign and 15 bits are for magnitude
(I could be wrong)
However what does 9.7 mean ? does it mean 9 bits are for whole numbers and 7 bits represent fraction ?
Solved! Go to Solution.
2020-08-27 03:05 PM
>>However what does 9.7 mean ? does it mean 9 bits are for whole numbers and 7 bits represent fraction ?
Yes,
float f = (float)q / 128.0f;
float f = (float)q * (1.0f / 128.0f);
Figure range +255.992 to -256.0
2020-08-27 03:05 PM
>>However what does 9.7 mean ? does it mean 9 bits are for whole numbers and 7 bits represent fraction ?
Yes,
float f = (float)q / 128.0f;
float f = (float)q * (1.0f / 128.0f);
Figure range +255.992 to -256.0
2020-08-28 03:11 PM
will that conversion actually work ?
I am now testing CMSIS rfft and generated int16 sine
now I am passing this int 16 sine to rfft_q15 because sign bit is still msb and that should more or less work
the I am getting back (I believe ) 9.7 which I try to covert to normal int but does not behave as expected for some reasons