31.2 Fixed-Point Types

Input and output data for most functions in this library is represented in 16-bit fractional numbers, in Q15 format. This is the most commonly used data format for signal processing. Some function may use other data formats internally for increased precision of the intermediate results. The Q15 data type used by the DSP functions is specified as a signed 16-bit integer, typedefed as int16 in the <dsplib_def.h> header files supplied with the library.

Note that within C code care must be taken not to confuse fixed-point values with integers. To the C compiler, objects used by these routines are integers, not fixed-point, and any arithmetic performed on those objects in C will be done as integers. Fixed-point values have been declared as integer types only because the standard C language does not include intrinsic support for fixed-point data types.