Floating point conversion from Fixed point algorithm
- by Viks
Hi,
I have an application which is using 24 bit fixed point calculation.I am porting it to a hardware which does support floating point, so for speed optimization I need to convert all fixed point based calculation to floating point based calculation.
For this code snippet, It is calculating mantissa
for(i=0;i<8207;i++)
{
// Do n^8/7 calculation and store
// it in mantissa and exponent, scaled to
// fixed point precision.
}
So since this calculation, does convert an integer to mantissa and exponent scaled to fixed point precision(23 bit). When I tried converting it to float, by dividing the mantissa part by precision bits and subtracting the exponent part by precision bit, it really does'
t work.
Please help suggesting a better way of doing it.