fix.5c revision 03b705cf
1/*
2 * Convert CSC fix point values to floats
3 */
4
5real fixval (int fix)
6{
7 int exp = fix >> 9;
8 int mant = fix & ((1 << 9) - 1);
9 real ret;
10 if (exp == 0x7)
11 return 1.0;
12 ret = (2 ** -exp) * mant / (1 << 9);
13 return ret;
14}
15