5.3 <libq.h> Mathematical Functions

The header file libq.h consists of macro definitions and various functions that calculate fixed-point mathematical operations.

Q15 Functions: Many of these functions use fixed-point Q15 (1.15) format. For each function, the entire range may not be used.

Q16 Functions: Many of these functions use fixed-point Q16 (15.16) format. For each function, the entire range may not be used.

Q31 Functions: Many of these functions use fixed-point Q31 (1.31) format. For each function, the entire range may not be used.

Note: Fixed-point functions using Q15 or Q16 notation are applicable to dsPIC33C/E/F and dsPIC30F devices. Fixed-point functions using Q31 notation are applicable to dsPIC33A devices exclusively.