Hi there ! As a DSP programmer, I often encounter this situation: I need to do a lot of math, but the underlying CPU doesn't have a floating-point unit at all ! So, the general technique used is Fixed-point Arithmetic. The basic idea is that every real number, like 3.14159, is mapped to an integer. We all know that integer arithmetic is faster than floating-point arithmetic. For ex, 32-bit integer multiply (MUL EDX) takes about 5 clock cycles on a 80x86, whereas 32-bit IEEE float multiply (FMUL) takes over 10 clock cycles.
There you are, I rolled up my sleeves and wrote my own C library for dealing with Q-formats. There is basic support for conversion from float-to-fixed, addition, saturation, etc. I will be updating it soon with algorithms for sqrt( ), sin( ), cos( ) and finally FFT. The current version of the software is just a header file. A sample test program is also attached. You can download the software here: FixedPointMathLibrary. The software is licensed under the Non-Profit Open Software License 3.0.
Posted by: bdsatish Category: Software