# Why we sometime use some values of fixed point and floating point both in dsp?

I have been writing kernels for a communication dsp device, which uses cmac/cmad operation on fixed and floating point numbers. I am not very clear why both types is used in the same operation.

• usually because of external requirements, or because of that's the kind of data you have, or because of numerical stability or... Well, why does one use fixed or floating point? the same applies here. May 14 at 12:59
• i think it depends on what parts are available to you. if you're using a SHArC, you got both fixed and float. if you're using a Blackfin, you got only fixed and you'll have to adapt to it. May 14 at 17:19
• And if you're using a mix of code from various sources, you may be bound to the types because that's what was originally assumed. May 14 at 17:42

One reason would be for the difference in how the quantization error signals are generated: a fixed point quantization error is a fixed level for all inputs within the allowable range between underflow and overflow ($$-2^{b-1}$$ to +$$2^{b-1}-1$$ for example for a signed fixed precision number with $$b$$ bits given here as signed integers, the peak to peak error is bound to be $$b$$). Floating point numbers in contrast have a quantization error that is proportional to the exponent: very large floating point numbers will have a very large peak to peak error in comparison to very small floating point numbers. This can cause stability issues in applications of pole cancellation where the fixed point solution can provide an exact cancellation while the floating point solution could have a residual error. Another application of fixed point is in the way it allows overflow and underflow conditions to wrap rather than create an underflow/overflow error as in floating point. See this recent post discussion how a CIC filter needs to be implemented in fixed point for these reasons.