kirgizz
Member level 2
Hello,
I've got a problem with data format conversion on ADSP 21262 which can process both formats, fixed and floating point data. I give you an example for it:
The floating point number is: 200.15 (f15=200.25).
The DSP represents it as (1).564453125*2^^7 (S=0, E=134, M=.564453125) in floating point format.
I can get the integer part by r12=fix f15.
Here is the most exciting thing: how can I get the real fractional part (=.25) of the number?
Doing
r4= mant f15; //manissa from f15
r5= lshift r4 by 1; //removing hidden bit
results in r5=0.564453125 (as unsigned fractional)
Do anyone have an idea?
Thank you in advance
I've got a problem with data format conversion on ADSP 21262 which can process both formats, fixed and floating point data. I give you an example for it:
The floating point number is: 200.15 (f15=200.25).
The DSP represents it as (1).564453125*2^^7 (S=0, E=134, M=.564453125) in floating point format.
I can get the integer part by r12=fix f15.
Here is the most exciting thing: how can I get the real fractional part (=.25) of the number?
Doing
r4= mant f15; //manissa from f15
r5= lshift r4 by 1; //removing hidden bit
results in r5=0.564453125 (as unsigned fractional)
Do anyone have an idea?
Thank you in advance