5.1.4 libq Library and Fixed-Point Data Format
The functions in the libq
library use the fixed-point data format. The
parameters passed and the results generated by the functions are fractional in nature.
For dsPIC33C/E/F and dsPIC30 devices, there are two similar sets of math functions which
perform the same math operations. One set supports Q15 operands and the other supports
Q15.16 operands. Q15.16 operand functions, naturally, have better precision and range
compared to Q15 operand functions. For dsPIC33A devices, all fixed-point math operations
are based on Q1.31 operands.