5.3.4 _Q15add Function
This function finds the sum value of two Q15 values. The function takes care of saturation during overflow and underflow occurrences.
Include
<libq.h>
Prototype
_Q15 _Q15add(_Q15 x, _Q15 y);
Argument
x |
a fixed-point number in Q15 format, which ranges from -215 to 215-1. The value of this argument ranges from -32768 to 32767. |
y |
a fixed-point number in Q15 format, which ranges from -215 to 215-1. The value of this argument ranges from -32768 to 32767. |
Return Value
This function returns the sum of x
and y
in Q15 format. The value ranges from -32768 to 32767.