Floating point conversion from Fixed point algorithm

Posted by Viks on Stack Overflow See other posts from Stack Overflow or by Viks
Published on 2010-04-18T05:12:30Z Indexed on 2010/04/18 5:23 UTC
Read the original article Hit count: 545

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about fixed-point

Related posts about floating-point